CMakeLists.txt 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. cmake_minimum_required(VERSION 2.6)
  2. project(609_Boolean)
  3. find_package(CGAL REQUIRED)
  4. set(CGAL_DONT_OVERRIDE_CMAKE_FLAGS TRUE CACHE BOOL "CGAL's CMAKE Setup is super annoying ")
  5. include(${CGAL_USE_FILE})
  6. # CGAL's monkeying with all of the flags. Rather than change the CGAL_USE_FILE
  7. # just get ride of this flag.
  8. if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
  9. remove_cxx_flag("-stdlib=libc++")
  10. endif()
  11. IF(MSVC)
  12. SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") ### Enable parallel compilation for Visual Studio
  13. SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR} )
  14. SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR} )
  15. ELSE(MSVC)
  16. SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") #### Libigl requires a modern C++ compiler that supports c++11
  17. SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "../" )
  18. ENDIF(MSVC)
  19. # This is absolutely necessary for Exact Construction
  20. # for some reason must come after cgal include. I think that it's overwriting
  21. # come flags like CXX_FLAGS
  22. #set(CMAKELISTS_SHARED_INCLUDED FALSE)
  23. include("../CMakeLists.shared")
  24. set(SOURCES
  25. ${PROJECT_SOURCE_DIR}/main.cpp
  26. )
  27. add_executable(${PROJECT_NAME}_bin ${SOURCES} ${SHARED_SOURCES})
  28. target_link_libraries(${PROJECT_NAME}_bin ${SHARED_LIBRARIES} ${CGAL_LIBRARIES})