mirror of https://github.com/CGAL/cgal
the mandatory libs need an particular order, and we simplify with a macro
This commit is contained in:
parent
656b09f242
commit
b5a4e941fd
|
|
@ -13,7 +13,7 @@ if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
|
|||
endif()
|
||||
|
||||
# CGAL and its components
|
||||
find_package( CGAL QUIET COMPONENTS Core GMP MPFR MPFI RS3 )
|
||||
find_package( CGAL QUIET COMPONENTS Core MPFI RS3)
|
||||
|
||||
if ( NOT CGAL_FOUND )
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,6 @@
|
|||
message(STATUS "Configure libCGALCore")
|
||||
|
||||
use_lib( GMP )
|
||||
use_lib( MPFR )
|
||||
if (GMPXX_FOUND)
|
||||
use_lib( GMPXX )
|
||||
endif()
|
||||
use_mandatory_libs()
|
||||
|
||||
include_directories (${CGAL_3RD_PARTY_INCLUDE_DIRS})
|
||||
|
||||
|
|
|
|||
|
|
@ -57,11 +57,7 @@ if( QT4_FOUND )
|
|||
|
||||
# message(STATUS "Additional input files: ${additional_files}")
|
||||
|
||||
use_lib( GMP )
|
||||
use_lib( MPFR )
|
||||
if (GMPXX_FOUND)
|
||||
use_lib( GMPXX )
|
||||
endif()
|
||||
use_mandatory_libs()
|
||||
|
||||
include_directories( ${CGAL_3RD_PARTY_INCLUDE_DIRS} ${CGAL_Qt4_3RD_PARTY_INCLUDE_DIRS} )
|
||||
|
||||
|
|
|
|||
|
|
@ -344,6 +344,21 @@ if( NOT CGAL_MACROS_FILE_INCLUDED )
|
|||
|
||||
endmacro()
|
||||
|
||||
macro( use_mandatory_libs )
|
||||
|
||||
# Comment: This is subject to be changed in the future
|
||||
# - either more specific (giving precise include_dir- and link-order)
|
||||
# - or even less specific if order becomes less relevant
|
||||
# Eric Berberich 2012/06/29
|
||||
|
||||
use_component( MPFR )
|
||||
use_component( GMP )
|
||||
if (GMPXX_FOUND)
|
||||
use_component( GMPXX )
|
||||
endif()
|
||||
|
||||
endmacro()
|
||||
|
||||
|
||||
function( cgal_setup_module_path )
|
||||
# Avoid to modify the modules path twice
|
||||
|
|
|
|||
|
|
@ -22,18 +22,10 @@ if(NOT USE_CGAL_FILE_INCLUDED)
|
|||
set( CGAL_LIBRARIES )
|
||||
|
||||
foreach ( component ${CGAL_REQUESTED_COMPONENTS} )
|
||||
|
||||
use_component( ${component} )
|
||||
|
||||
endforeach()
|
||||
|
||||
# these two and a half are mandatory
|
||||
use_component( GMP )
|
||||
use_component( MPFR )
|
||||
if (GMPXX_FOUND)
|
||||
use_component( GMPXX )
|
||||
endif()
|
||||
|
||||
use_mandatory_libs()
|
||||
|
||||
include_directories( "${CMAKE_CURRENT_BINARY_DIR}" )
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,6 @@
|
|||
message(STATUS "Configure libCGAL")
|
||||
|
||||
use_lib( GMP )
|
||||
use_lib( MPFR)
|
||||
if (GMPXX_FOUND)
|
||||
use_lib( GMPXX )
|
||||
endif()
|
||||
use_mandatory_libs()
|
||||
|
||||
include_directories (${CGAL_3RD_PARTY_INCLUDE_DIRS})
|
||||
|
||||
|
|
|
|||
|
|
@ -38,11 +38,7 @@ if( QT3_FOUND )
|
|||
|
||||
include(Qt3Macros-patched)
|
||||
|
||||
use_lib( GMP )
|
||||
use_lib( MPFR )
|
||||
if (GMPXX_FOUND)
|
||||
use_lib( GMPXX )
|
||||
endif()
|
||||
use_mandatory_libs()
|
||||
|
||||
include_directories( ${CGAL_3RD_PARTY_INCLUDE_DIRS} ${CGAL_Qt3_3RD_PARTY_INCLUDE_DIRS} )
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue