diff --git a/Core/src/CGALCore/CMakeLists.txt b/Core/src/CGALCore/CMakeLists.txt index 14bf0e5c5a9..e13ae96a9fd 100644 --- a/Core/src/CGALCore/CMakeLists.txt +++ b/Core/src/CGALCore/CMakeLists.txt @@ -1,9 +1,9 @@ message(STATUS "Configure libCGALCore") -use_lib( GMP "###") -use_lib( MPFR "###") +use_lib( GMP ) +use_lib( MPFR ) if (FOUND_GMPXX) - use_lib( GMPXX "###") + use_lib( GMPXX ) endif() include_directories (${CGAL_3RD_PARTY_INCLUDE_DIRS}) diff --git a/GraphicsView/src/CGALQt4/CMakeLists.txt b/GraphicsView/src/CGALQt4/CMakeLists.txt index e0819d136ad..b0ae63a76d2 100644 --- a/GraphicsView/src/CGALQt4/CMakeLists.txt +++ b/GraphicsView/src/CGALQt4/CMakeLists.txt @@ -57,10 +57,10 @@ if( QT4_FOUND ) # message(STATUS "Additional input files: ${additional_files}") - use_lib( GMP "###") - use_lib( MPFR "###") + use_lib( GMP ) + use_lib( MPFR ) if (FOUND_GMPXX) - use_lib( GMPXX "###") + use_lib( GMPXX ) endif() include_directories( ${CGAL_3RD_PARTY_INCLUDE_DIRS} ${CGAL_Qt4_3RD_PARTY_INCLUDE_DIRS} ) diff --git a/Installation/cmake/modules/CGAL_Macros.cmake b/Installation/cmake/modules/CGAL_Macros.cmake index 9345e885b89..e86f45d7ff5 100644 --- a/Installation/cmake/modules/CGAL_Macros.cmake +++ b/Installation/cmake/modules/CGAL_Macros.cmake @@ -204,26 +204,31 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) endmacro() - macro( use_lib lib usefile ) - # TODO: usefile should an optional parameter. - # -- Laurent Rineau, 2012/06/27 + macro( use_lib ) + + set (lib "${ARGV0}") + set (vlib ${CGAL_EXT_LIB_${lib}_PREFIX} ) if ( ${vlib}_FOUND AND (NOT TARGET CGAL OR WITH_${lib})) if ( NOT ${vlib}_SETUP ) # avoid double usage - - string( REGEX REPLACE "###" "" filename ${usefile}) - string( LENGTH "${filename}" length ) - - if ( "${length}" GREATER "0" ) + if ( "${ARGC}" EQUAL "2" ) - include( ${filename} ) - ####message (STATUS "Configured ${lib} from UseLIB-file: ${filename}") + set (usefile "${ARGV1}") - # UseLIB-file has to set ${vlib}_SETUP to TRUE - # TODO EBEB what about Qt4, Qt3, zlib? + string( LENGTH "${usefile}" length ) + + if ("${length}" GREATER "0") + + include( ${usefile} ) + ####message (STATUS "Configured ${lib} from UseLIB-file: ${usefile}") + + # UseLIB-file has to set ${vlib}_SETUP to TRUE + # TODO EBEB what about Qt4, Qt3, zlib? + + endif() else() @@ -307,7 +312,7 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) message( STATUS "External libraries are all used") foreach ( CGAL_3RD_PARTY_LIB ${CGAL_SUPPORTING_3RD_PARTY_LIBRARIES}) if (${CGAL_3RD_PARTY_LIB}_FOUND) - use_lib( ${CGAL_3RD_PARTY_LIB} "###${${CGAL_3RD_PARTY_LIB}_USE_FILE}") + use_lib( ${CGAL_3RD_PARTY_LIB} "${${CGAL_3RD_PARTY_LIB}_USE_FILE}") endif() endforeach() else() @@ -324,7 +329,7 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) if ( NOT CGAL_IGNORE_PRECONFIGURED_${component} AND ${vlib}_FOUND) ####message( STATUS "External library ${component} has been preconfigured") - use_lib( ${component} "###${${vlib}_USE_FILE}") + use_lib( ${component} "${${vlib}_USE_FILE}") else() @@ -332,7 +337,7 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) find_package( ${component} ) ####message( STATUS "External library ${vlib} after find") if (${vlib}_FOUND) - use_lib( ${component} "###${${vlib}_USE_FILE}") + use_lib( ${component} "${${vlib}_USE_FILE}") endif() endif() diff --git a/Installation/cmake/modules/CGAL_SetupDependencies.cmake b/Installation/cmake/modules/CGAL_SetupDependencies.cmake index c8eaa619d8f..ab600f841bb 100644 --- a/Installation/cmake/modules/CGAL_SetupDependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupDependencies.cmake @@ -31,7 +31,7 @@ foreach (lib ${CGAL_SUPPORTING_3RD_PARTY_LIBRARIES}) message( STATUS " ${lib} definitions: ${${vlib}_DEFINITIONS}" ) else() message( STATUS "${lib} has been configured") - use_lib( ${vlib} "###${${vlib}_USE_FILE}") + use_lib( ${vlib} "{${vlib}_USE_FILE}") endif() # TODO EBEB what about Qt3, Qt4, zlib etc? diff --git a/Installation/src/CGAL/CMakeLists.txt b/Installation/src/CGAL/CMakeLists.txt index cb5983b2e7d..8efa2ab922e 100644 --- a/Installation/src/CGAL/CMakeLists.txt +++ b/Installation/src/CGAL/CMakeLists.txt @@ -1,9 +1,9 @@ message(STATUS "Configure libCGAL") -use_lib( GMP "###") -use_lib( MPFR "###") +use_lib( GMP ) +use_lib( MPFR) if (FOUND_GMPXX) - use_lib( GMPXX "###") + use_lib( GMPXX ) endif() include_directories (${CGAL_3RD_PARTY_INCLUDE_DIRS}) diff --git a/Qt_widget/src/CGALQt3/CMakeLists.txt b/Qt_widget/src/CGALQt3/CMakeLists.txt index 00a9705af36..4d740fbff54 100644 --- a/Qt_widget/src/CGALQt3/CMakeLists.txt +++ b/Qt_widget/src/CGALQt3/CMakeLists.txt @@ -38,10 +38,10 @@ if( QT3_FOUND ) include(Qt3Macros-patched) - use_lib( GMP "###") - use_lib( MPFR "###") + use_lib( GMP ) + use_lib( MPFR ) if (FOUND_GMPXX) - use_lib( GMPXX "###") + use_lib( GMPXX ) endif() include_directories( ${CGAL_3RD_PARTY_INCLUDE_DIRS} ${CGAL_Qt3_3RD_PARTY_INCLUDE_DIRS} )