Created
January 12, 2018 14:36
-
-
Save hugoledoux/c5be7c204f2d7962eae1339521b5bf4f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| project( arggh ) | |
| cmake_minimum_required (VERSION 3.2) | |
| add_definitions(-std=c++11) | |
| set(CMAKE_CXX_FLAGS "-O2") | |
| set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true ) | |
| if ( COMMAND cmake_policy ) | |
| cmake_policy( SET CMP0003 NEW ) | |
| endif() | |
| # CGAL | |
| find_package( CGAL QUIET COMPONENTS core ) | |
| if ( CGAL_FOUND ) | |
| include( ${CGAL_USE_FILE} ) | |
| message(STATUS "CGAL found") | |
| message(STATUS ${CGAL_LIBRARIES}) | |
| message(STATUS ${CGAL_3RD_PARTY_LIBRARIES}) | |
| else() | |
| message(SEND_ERROR "arggh requires the CGAL library") | |
| return() | |
| endif() | |
| # Eigen | |
| find_package(Eigen3) | |
| include( ${EIGEN3_USE_FILE} ) | |
| # Boost | |
| find_package( Boost REQUIRED COMPONENTS filesystem) | |
| if ( NOT Boost_FOUND ) | |
| message(SEND_ERROR "arggh requires the Boost library") | |
| return() | |
| endif() | |
| include_directories( ${GEOS_INCLUDE_DIR} ) | |
| add_executable(arggh plane.cpp) | |
| target_link_libraries(arggh ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ${GEOS_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} ) | |
| install(TARGETS arggh DESTINATION bin) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment