add GMPXX support (work in progress)

This commit is contained in:
Laurent Rineau 2018-04-03 17:22:45 +02:00
parent 0e61c629fc
commit 1384d24b99
1 changed files with 13 additions and 4 deletions

View File

@ -17,8 +17,17 @@ if(CGAL_SetupGMP_included OR CGAL_DISABLE_GMP)
endif() endif()
set(CGAL_SetupGMP_included TRUE) set(CGAL_SetupGMP_included TRUE)
find_package(GMP) find_package(GMP REQUIRED)
find_package(MPFR) find_package(MPFR REQUIRED)
if(NOT DEFINED WITH_GMPXX)
option(CGAL_WITH_GMPXX "Use CGAL with GMPXX: use C++ classes of GNU MP instead of CGAL wrappers" OFF)
endif()
set(CGAL_GMPXX_find_package_keyword QUIET)
if(WITH_GMPXX OR CGAL_WITH_GMPXX)
set(CGAL_GMPXX_find_package_keyword REQUIRED)
endif()
find_package(GMPXX ${CGAL_GMPXX_find_package_keyword})
#.rst: #.rst:
# Provided Functions # Provided Functions
@ -45,6 +54,6 @@ function(use_CGAL_GMP_support target)
return() return()
endif() endif()
target_include_directories(${target} SYSTEM ${keyword} ${GMP_INCLUDE_DIR} ${MPFR_INCLUDE_DIR}) target_include_directories(${target} SYSTEM ${keyword} ${GMP_INCLUDE_DIR} ${GMPXX_INCLUDE_DIR} ${MPFR_INCLUDE_DIR})
target_link_libraries(${target} ${keyword} ${GMP_LIBRARIES} ${MPFR_LIBRARIES}) target_link_libraries(${target} ${keyword} ${GMP_LIBRARIES} ${GMPXX_LIBRARIES} ${MPFR_LIBRARIES})
endfunction() endfunction()