mirror of https://github.com/CGAL/cgal
23 lines
586 B
CMake
23 lines
586 B
CMake
if(CGAL_SetupGMP_included OR CGAL_DISABLE_GMP)
|
|
return()
|
|
endif()
|
|
set(CGAL_SetupGMP_included TRUE)
|
|
|
|
find_package(GMP)
|
|
find_package(MPFR)
|
|
|
|
function(use_CGAL_GMP_support target)
|
|
if(ARGV1 STREQUAL INTERFACE)
|
|
set(keyword INTERFACE)
|
|
else()
|
|
set(keyword PUBLIC)
|
|
endif()
|
|
if(NOT GMP_FOUND OR NOT MPFR_FOUND)
|
|
message(FATAL_ERROR "CGAL requires GMP and MPFR.")
|
|
return()
|
|
endif()
|
|
|
|
target_include_directories(${target} SYSTEM ${keyword} ${GMP_INCLUDE_DIR} ${MPFR_INCLUDE_DIR})
|
|
target_link_libraries(${target} ${keyword} ${GMP_LIBRARIES} ${MPFR_LIBRARIES})
|
|
endfunction()
|