| ------------------------------------------------------------------------ | r57847 | lrineau | 2010-08-06 14:11:31 +0200 (Fri, 06 Aug 2010) | 4 lines | | Turn cgal_setup_module_path into a CMake function. | Fix the CMake errors with CMake-2.6.0 and CMake-2.6.1 (VERSION_LESS if IF | has been introduced in CMake-2.6.2). | ------------------------------------------------------------------------ | r57816 | lrineau | 2010-08-05 15:56:57 +0200 (Thu, 05 Aug 2010) | 17 lines | | Clean the CMake configuration: | | - CGALConfig_install.cmake.source.in is removed. The variable | SOURCE_INSTALL/CGAL_SOURCE_INSTALL were unused, and probably not tested | for a long time (I found errors in | CGALConfig_install.cmake.source.in). This has been cleaned. | | - CGALConfig_install.cmake.fhs.in is renamed (no .fhs. in it). | | - The module path is now modified in a macro (defined in | CGAL_Macros.cmake), and the variable CGAL_CMAKE_MODULE_PATH is no | longer stored or used in CGALConfig.cmake (the reason is that is was | used as a path, where it is actually a list of paths). | | - The UseCGAL.cmake file only link with CGAL libraries that has been | configured. | | ------------------------------------------------------------------------
43 lines
1.6 KiB
CMake
43 lines
1.6 KiB
CMake
# This module setups the compiler for the MPFI library.
|
|
# It assumes that find_package(MPFI) was already called.
|
|
|
|
if( NOT CGAL_MPFI_SETUP )
|
|
|
|
if( MPFI_FOUND )
|
|
|
|
message( STATUS "MPFI include: ${MPFI_INCLUDE_DIR}" )
|
|
message( STATUS "MPFI libraries: ${MPFI_LIBRARIES}" )
|
|
message( STATUS "MPFI definitions: ${MPFI_DEFINITIONS}" )
|
|
|
|
try_run( MPFI_TEST_RESULT
|
|
COMPILED_MPFI_TEST
|
|
"${CMAKE_BINARY_DIR}"
|
|
"${CGAL_MODULES_DIR}/test_MPFI.cpp"
|
|
CMAKE_FLAGS
|
|
"-DINCLUDE_DIRECTORIES:
|
|
STRING=${MPFI_INCLUDE_DIR};${CGAL_3RD_PARTY_INCLUDE_DIRS}"
|
|
"-DLINK_LIBRARIES:
|
|
STRING=${MPFI_LIBRARIES};${CGAL_3RD_PARTY_LIBRARIES}"
|
|
"-DLINK_DIRECTORIES:
|
|
STRING=${MPFI_LIBRARIES_DIR};${CGAL_3RD_PARTY_LIBRARIES_DIRS}"
|
|
COMPILE_OUTPUT_VARIABLE MPFI_TEST_COMPILATION_OUTPUT
|
|
)
|
|
|
|
if( COMPILED_MPFI_TEST AND MPFI_TEST_RESULT EQUAL 0)
|
|
include_directories( ${MPFI_INCLUDE_DIR} )
|
|
link_directories( ${MPFI_LIBRARIES_DIR} )
|
|
add_definitions( ${MPFI_DEFINITIONS} "-DCGAL_USE_MPFI" )
|
|
link_libraries( ${MPFI_LIBRARIES} )
|
|
else( COMPILED_MPFI_TEST AND MPFI_TEST_RESULT EQUAL 0)
|
|
message( STATUS "MPFI was incorrectly configured on this system" )
|
|
message( STATUS
|
|
"Output of the failed MPFI test was:\n${MPFI_TEST_COMPILATION_OUTPUT}" )
|
|
message( STATUS "End of the MPFI test output" )
|
|
endif( COMPILED_MPFI_TEST AND MPFI_TEST_RESULT EQUAL 0)
|
|
|
|
endif( MPFI_FOUND )
|
|
|
|
set( CGAL_MPFI_SETUP TRUE )
|
|
|
|
endif( NOT CGAL_MPFI_SETUP )
|