Files
cgal/Installation/cmake/modules/CGAL_SetupGMP.cmake
T
Laurent Rineau 642bde884e Last minute big change: make GMP/MPFR an optional dependency.
Locally tested.

Just after that commit, I will create a fake release and trigger a
test suite with that modification.
2008-12-03 13:09:43 +00:00

49 lines
1.6 KiB
CMake

if ( NOT CGAL_GMP_SETUP )
find_package( GMP )
find_package( MPFR )
if( GMP_FOUND )
if( MPFR_FOUND )
include(CGAL_Macros)
message( STATUS "GMP include: ${GMP_INCLUDE_DIR}" )
message( STATUS "GMP libraries: ${GMP_LIBRARIES}" )
message( STATUS "GMP definitions: ${GMP_DEFINITIONS}" )
get_dependency_version(GMP)
message( STATUS "MPFR include: ${MPFR_INCLUDE_DIR}" )
message( STATUS "MPFR libraries: ${MPFR_LIBRARIES}" )
message( STATUS "MPFR definitions: ${MPFR_DEFINITIONS}" )
set( MPFR_DEPENDENCY_INCLUDE_DIR ${GMP_INCLUDE_DIR} )
get_dependency_version(MPFR)
set ( CGAL_USE_GMP 1 )
set ( CGAL_USE_MPFR 1 )
add_to_cached_list(CGAL_3RD_PARTY_INCLUDE_DIRS ${MPFR_INCLUDE_DIR} )
add_to_cached_list(CGAL_3RD_PARTY_LIBRARIES_DIRS ${MPFR_LIBRARIES_DIR} )
add_to_cached_list(CGAL_3RD_PARTY_DEFINITIONS ${MPFR_DEFINITIONS} )
add_to_cached_list(CGAL_3RD_PARTY_INCLUDE_DIRS ${GMP_INCLUDE_DIR} )
add_to_cached_list(CGAL_3RD_PARTY_LIBRARIES_DIRS ${GMP_LIBRARIES_DIR} )
add_to_cached_list(CGAL_3RD_PARTY_DEFINITIONS ${GMP_DEFINITIONS} )
if ( NOT MSVC )
add_to_cached_list(CGAL_3RD_PARTY_LIBRARIES ${MPFR_LIBRARIES} )
add_to_cached_list(CGAL_3RD_PARTY_LIBRARIES ${GMP_LIBRARIES} )
endif()
else( MPFR_FOUND )
message("CGAL GMP support needs MPFR. GMP will not be supported.")
endif( MPFR_FOUND )
endif( GMP_FOUND)
set( CGAL_GMP_SETUP TRUE )
endif()