mirror of https://github.com/CGAL/cgal
Fix FindMPFR.cmake and FindGMP.cmake: if CGAL_AUTO_LINK_ENABLED is false,
the library is found only if *_LIBRARIES is set.
This commit is contained in:
parent
c590fe94c5
commit
55c19faa28
|
|
@ -10,8 +10,23 @@
|
|||
include(CGAL_FindPackageHandleStandardArgs)
|
||||
include(CGAL_GeneratorSpecificSettings)
|
||||
|
||||
if(GMP_INCLUDE_DIR)
|
||||
set(GMP_in_cache TRUE)
|
||||
else()
|
||||
set(GMP_in_cache FALSE)
|
||||
endif()
|
||||
if( CGAL_AUTO_LINK_ENABLED )
|
||||
if(NOT GMP_LIBRARIES_DIR)
|
||||
set(GMP_in_cache FALSE)
|
||||
endif()
|
||||
else()
|
||||
if(NOT GMP_LIBRARIES)
|
||||
set(GMP_in_cache FALSE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Is it already configured?
|
||||
if (GMP_INCLUDE_DIR AND GMP_LIBRARIES_DIR )
|
||||
if (GMP_in_cache)
|
||||
|
||||
set(GMP_FOUND TRUE)
|
||||
|
||||
|
|
@ -55,6 +70,10 @@ else()
|
|||
include( GMPConfig OPTIONAL )
|
||||
endif()
|
||||
|
||||
find_package_handle_standard_args(GMP "DEFAULT_MSG" GMP_INCLUDE_DIR GMP_LIBRARIES_DIR)
|
||||
if(CGAL_AUTO_LINK_ENABLED)
|
||||
find_package_handle_standard_args(GMP "DEFAULT_MSG" GMP_LIBRARIES_DIR GMP_INCLUDE_DIR)
|
||||
else()
|
||||
find_package_handle_standard_args(GMP "DEFAULT_MSG" GMP_LIBRARIES GMP_INCLUDE_DIR)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -10,8 +10,23 @@
|
|||
include(CGAL_FindPackageHandleStandardArgs)
|
||||
include(CGAL_GeneratorSpecificSettings)
|
||||
|
||||
if(MPFR_INCLUDE_DIR)
|
||||
set(MPFR_in_cache TRUE)
|
||||
else()
|
||||
set(MPFR_in_cache FALSE)
|
||||
endif()
|
||||
if( CGAL_AUTO_LINK_ENABLED )
|
||||
if(NOT MPFR_LIBRARIES_DIR)
|
||||
set(MPFR_in_cache FALSE)
|
||||
endif()
|
||||
else()
|
||||
if(NOT MPFR_LIBRARIES)
|
||||
set(MPFR_in_cache FALSE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Is it already configured?
|
||||
if (MPFR_INCLUDE_DIR AND MPFR_LIBRARIES_DIR )
|
||||
if (MPFR_in_cache)
|
||||
|
||||
set(MPFR_FOUND TRUE)
|
||||
|
||||
|
|
@ -54,8 +69,12 @@ else()
|
|||
if ( NOT MPFR_INCLUDE_DIR OR NOT MPFR_LIBRARIES_DIR )
|
||||
include( MPFRConfig OPTIONAL )
|
||||
endif()
|
||||
|
||||
find_package_handle_standard_args(MPFR "DEFAULT_MSG" MPFR_INCLUDE_DIR MPFR_LIBRARIES_DIR)
|
||||
|
||||
|
||||
if(CGAL_AUTO_LINK_ENABLED)
|
||||
find_package_handle_standard_args(MPFR "DEFAULT_MSG" MPFR_LIBRARIES_DIR MPFR_INCLUDE_DIR)
|
||||
else()
|
||||
find_package_handle_standard_args(MPFR "DEFAULT_MSG" MPFR_LIBRARIES MPFR_INCLUDE_DIR)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue