Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
cleanup links and dependencies
Browse files Browse the repository at this point in the history
SFCGAL does not directly depends an gmp and mpfr, so there is no need to
look for them, they are pulled by CGAL
  • Loading branch information
vmora committed Apr 10, 2018
1 parent 7320b6c commit 5a2369d
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 193 deletions.
30 changes: 0 additions & 30 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,32 +82,6 @@ if((${Boost_MAJOR_VERSION} EQUAL 1) AND (${Boost_MINOR_VERSION} EQUAL 60) AND ($
include_directories( patches/boost-1.60.0 )
endif()

#-- GMP (facultative) -------------------------------------
find_package( GMP )
if( ${GMP_FOUND} )
message( STATUS "GMP_INCLUDE_DIRS = ${GMP_INCLUDE_DIRS}" )
message( STATUS "GMP_LIBRARIES = ${GMP_LIBRARIES}" )
set( SFCGAL_WITH_GMP ON )
endif()



#-- MPFR (needs GMP) --------------------------------------
if( ${GMP_FOUND} )
find_package( MPFR )
if( ${MPFR_FOUND} )
message( STATUS "MPFR_INCLUDE_DIRS = ${MPFR_INCLUDE_DIRS}" )
message( STATUS "MPFR_LIBRARIES = ${MPFR_LIBRARIES}" )
set( SFCGAL_WITH_MPFR ON )
endif()
endif()

if( NOT ${GMP_FOUND} OR NOT ${MPFR_FOUND} )
message( WARNING "can't find GMP and MPFR, using default kernel" )
set( EPLU_USE_CARTESIAN_KERNEL ON )
endif()


#-- OpenScenegraph -----------------------------------------
if ( SFCGAL_WITH_OSG )
find_package( OpenSceneGraph COMPONENTS osgDB osgUtil )
Expand Down Expand Up @@ -143,14 +117,10 @@ endif()
include_directories( SYSTEM
${CGAL_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${MPFR_INCLUDE_DIRS}
${GMP_INCLUDE_DIRS}
)
link_directories(
${CGAL_LIBRARY_DIRS}
${Boost_LIBRARY_DIRS}
${MPFR_LIBRARY_DIRS}
${GMP_LIBRARY_DIRS}
)

#-- Warnings, frounding-math and gprof ------------------------------------------
Expand Down
48 changes: 0 additions & 48 deletions cmake/Modules/FindGMP.cmake

This file was deleted.

37 changes: 0 additions & 37 deletions cmake/Modules/FindMPFR.cmake

This file was deleted.

10 changes: 2 additions & 8 deletions example/CGAL-basic_manip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ GET_FILENAME_COMPONENT( EXAMPLE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME )
add_executable( example-${EXAMPLE_NAME}
main.cpp
)
target_link_libraries( example-${EXAMPLE_NAME}
SFCGAL
${CGAL_LIBRARIES}
${MPFR_LIBRARIES}
${GMP_LIBRARIES}
${Boost_LIBRARIES}
)
target_link_libraries( example-${EXAMPLE_NAME} SFCGAL)
set_target_properties( example-${EXAMPLE_NAME} PROPERTIES DEBUG_POSTFIX "d" )
install( TARGETS example-${EXAMPLE_NAME} DESTINATION bin )
install( TARGETS example-${EXAMPLE_NAME} DESTINATION bin )
10 changes: 2 additions & 8 deletions example/CGAL-cartesian_kernel/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ GET_FILENAME_COMPONENT( EXAMPLE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME )
add_executable( example-${EXAMPLE_NAME}
main.cpp
)
target_link_libraries( example-${EXAMPLE_NAME}
SFCGAL
${CGAL_LIBRARIES}
${MPFR_LIBRARIES}
${GMP_LIBRARIES}
${Boost_LIBRARIES}
)
target_link_libraries( example-${EXAMPLE_NAME} SFCGAL)
set_target_properties( example-${EXAMPLE_NAME} PROPERTIES DEBUG_POSTFIX "d" )
install( TARGETS example-${EXAMPLE_NAME} DESTINATION bin )
install( TARGETS example-${EXAMPLE_NAME} DESTINATION bin )
10 changes: 2 additions & 8 deletions example/CGAL-point_generator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ GET_FILENAME_COMPONENT( EXAMPLE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME )
add_executable( example-${EXAMPLE_NAME}
main.cpp
)
target_link_libraries( example-${EXAMPLE_NAME}
SFCGAL
${CGAL_LIBRARIES}
${MPFR_LIBRARIES}
${GMP_LIBRARIES}
${Boost_LIBRARIES}
)
target_link_libraries( example-${EXAMPLE_NAME} SFCGAL)
set_target_properties( example-${EXAMPLE_NAME} PROPERTIES DEBUG_POSTFIX "d" )
install( TARGETS example-${EXAMPLE_NAME} DESTINATION bin )
install( TARGETS example-${EXAMPLE_NAME} DESTINATION bin )
10 changes: 2 additions & 8 deletions example/CGAL-polygon_triangulation2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ GET_FILENAME_COMPONENT( EXAMPLE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME )
add_executable( example-${EXAMPLE_NAME}
main.cpp
)
target_link_libraries( example-${EXAMPLE_NAME}
SFCGAL
${CGAL_LIBRARIES}
${MPFR_LIBRARIES}
${GMP_LIBRARIES}
${Boost_LIBRARIES}
)
target_link_libraries( example-${EXAMPLE_NAME} SFCGAL)
set_target_properties( example-${EXAMPLE_NAME} PROPERTIES DEBUG_POSTFIX "d" )
install( TARGETS example-${EXAMPLE_NAME} DESTINATION bin )
install( TARGETS example-${EXAMPLE_NAME} DESTINATION bin )
10 changes: 2 additions & 8 deletions example/CGAL-triangulation2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ GET_FILENAME_COMPONENT( EXAMPLE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME )
add_executable( example-${EXAMPLE_NAME}
main.cpp
)
target_link_libraries( example-${EXAMPLE_NAME}
SFCGAL
${CGAL_LIBRARIES}
${MPFR_LIBRARIES}
${GMP_LIBRARIES}
${Boost_LIBRARIES}
)
target_link_libraries( example-${EXAMPLE_NAME} SFCGAL)
set_target_properties( example-${EXAMPLE_NAME} PROPERTIES DEBUG_POSTFIX "d" )
install( TARGETS example-${EXAMPLE_NAME} DESTINATION bin )
install( TARGETS example-${EXAMPLE_NAME} DESTINATION bin )
9 changes: 1 addition & 8 deletions example/SFCGAL-building/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@ GET_FILENAME_COMPONENT( EXAMPLE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME )
add_executable( example-${EXAMPLE_NAME}
main.cpp
)
target_link_libraries( example-${EXAMPLE_NAME}
SFCGAL
SFCGAL-osg
${CGAL_LIBRARIES}
${MPFR_LIBRARIES}
${GMP_LIBRARIES}
${Boost_LIBRARIES}
)
target_link_libraries( example-${EXAMPLE_NAME} SFCGAL SFCGAL-osg)
set_target_properties( example-${EXAMPLE_NAME} PROPERTIES DEBUG_POSTFIX "d" )
install( TARGETS example-${EXAMPLE_NAME} DESTINATION bin )
10 changes: 1 addition & 9 deletions example/SFCGAL-export-osg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@ GET_FILENAME_COMPONENT( EXAMPLE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME )
add_executable( example-${EXAMPLE_NAME}
main.cpp
)
target_link_libraries( example-${EXAMPLE_NAME}
SFCGAL
SFCGAL-osg
${CGAL_LIBRARIES}
${MPFR_LIBRARIES}
${GMP_LIBRARIES}
${OPENSCENEGRAPH_LIBRARIES}
${Boost_LIBRARIES}
)
target_link_libraries( example-${EXAMPLE_NAME} SFCGAL SFCGAL-osg)
set_target_properties( example-${EXAMPLE_NAME} PROPERTIES DEBUG_POSTFIX "d" )
install( TARGETS example-${EXAMPLE_NAME} DESTINATION bin )
10 changes: 2 additions & 8 deletions example/SFCGAL-offset/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ GET_FILENAME_COMPONENT( EXAMPLE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME )
add_executable( example-${EXAMPLE_NAME}
main.cpp
)
target_link_libraries( example-${EXAMPLE_NAME}
SFCGAL
${CGAL_LIBRARIES}
${MPFR_LIBRARIES}
${GMP_LIBRARIES}
${Boost_LIBRARIES}
)
target_link_libraries( example-${EXAMPLE_NAME} SFCGAL)
set_target_properties( example-${EXAMPLE_NAME} PROPERTIES DEBUG_POSTFIX "d" )
install( TARGETS example-${EXAMPLE_NAME} DESTINATION bin )
install( TARGETS example-${EXAMPLE_NAME} DESTINATION bin )
10 changes: 0 additions & 10 deletions src/config.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,6 @@

#include <SFCGAL/export.h>

/**
* indicates if GMP is available
*/
#cmakedefine SFCGAL_WITH_GMP
/**
* indicates if MPFR is available
*/
#cmakedefine SFCGAL_WITH_MPFR


/**
* indicates if OpenSceneGraph dependency is activated
*/
Expand Down
3 changes: 0 additions & 3 deletions test/bench/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
file( GLOB SFCGAL_BENCHS_SOURCES *.cpp )
add_executable( bench-SFCGAL ${SFCGAL_BENCHS_SOURCES} )
target_link_libraries( bench-SFCGAL SFCGAL)
if( SFCGAL_WITH_MPFR )
target_link_libraries( bench-SFCGAL ${MPFR_LIBRARIES} ${GMP_LIBRARIES} )
endif()
set_target_properties( bench-SFCGAL PROPERTIES DEBUG_POSTFIX "d" )
install( TARGETS bench-SFCGAL DESTINATION bin )

0 comments on commit 5a2369d

Please sign in to comment.