diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index af858037be1..d958e9c3998 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -523,8 +523,28 @@ set_special_prefix(QGLViewer QGLVIEWER) set_special_prefix(Coin3D COIN3D) # some libraries are essential (stl and Boost.Thread are treated in another way) -if(NOT CGAL_DISABLE_GMP) - list (INSERT CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES 0 GMP MPFR) +if(CGAL_DISABLE_GMP) + list(REMOVE_ITEM CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES GMP MPFR) + unset(CGAL_CONFIGURED_LIBRARIES) + unset(CGAL_CONFIGURED_LIBRARIES CACHE) + unset(GMP_FOUND) + unset(GMP_FOUND CACHE) + unset(GMPXX_FOUND) + unset(GMPXX_FOUND CACHE) + unset(MPFR_FOUND) + unset(MPFR_FOUND CACHE) + unset(WITH_CGAL_Core) + unset(WITH_CGAL_Core CACHE) + unset(WITH_GMP) + unset(WITH_GMP CACHE) + unset(WITH_GMPXX) + unset(WITH_GMPXX CACHE) + unset(WITH_MPFR) + unset(WITH_MPFR CACHE) +else() + list(APPEND CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES GMP MPFR) + # Where CMake is run several times, to avoid duplicates + list (REMOVE_DUPLICATES CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES) endif() hide_variable(CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES) diff --git a/Installation/cmake/modules/CGAL_SetupDependencies.cmake b/Installation/cmake/modules/CGAL_SetupDependencies.cmake index f179f4ad7e3..f4697fc332f 100644 --- a/Installation/cmake/modules/CGAL_SetupDependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupDependencies.cmake @@ -56,7 +56,7 @@ foreach (lib ${CGAL_SUPPORTING_3RD_PARTY_LIBRARIES}) if (${lib} STREQUAL "LEDA") # special case for LEDA - add a flag - message( STATUS "$LEDA cxx flags: ${LEDA_CXX_FLAGS}" ) + message( STATUS "LEDA cxx flags: ${LEDA_CXX_FLAGS}" ) uniquely_add_flags( CMAKE_CXX_FLAGS ${LEDA_CXX_FLAGS} ) endif() diff --git a/Installation/src/CMakeLists.txt b/Installation/src/CMakeLists.txt index 6caf13a6e13..b384261e951 100644 --- a/Installation/src/CMakeLists.txt +++ b/Installation/src/CMakeLists.txt @@ -128,8 +128,7 @@ foreach(package ${CGAL_CONFIGURED_PACKAGES}) cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_INCLUDE_DIRS "" ) cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_LIBRARIES "" ) cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_LIBRARIES_DIRS "" ) - - if (${CGAL_CONFIGURED_LIBRARY_NAME} STREQUAL "Core") + if (${CGAL_CONFIGURED_LIBRARY_NAME} STREQUAL "CGAL_Core") if (NOT CGAL_NO_CORE) configure_component( ${package}/src/${CGAL_CONFIGURED_LIBRARY_NAME} ${CGAL_CONFIGURED_LIBRARY_NAME}) else(NOT CGAL_NO_CORE)