CMakeLists.txt 980 B

1234567891011121314151617181920212223242526272829303132
  1. cmake_minimum_required(VERSION 3.10)
  2. project(reflex2q3 CXX)
  3. set(OBJ_SRC "src/planes.cpp" "src/brushdef.cpp" "src/oopless-parser.cpp" "src/EntityConverter.cpp")
  4. add_library(objects OBJECT ${OBJ_SRC})
  5. add_executable(reflex2q3 src/main.cpp)
  6. add_executable(runtests test/catch.cpp)
  7. target_link_libraries(reflex2q3 objects)
  8. target_link_libraries(runtests objects)
  9. set(CMAKE_CXX_STANDARD 11)
  10. set(CMAKE_CXX_STANDARD_REQUIRED True)
  11. find_package(PkgConfig)
  12. pkg_check_modules(EIGEN eigen3)
  13. if ( NOT EIGEN_FOUND) #use local
  14. message ( WARNING "Install eigen3 using your package manager. If using git eigen3 or a non-standard install location, ensure environment variable EIGEN3_INCLUDE_DIR is set." )
  15. include_directories ( "$ENV{EIGEN3_INCLUDE_DIR}" )
  16. find_package(Eigen3 REQUIRED NO_MODULE)
  17. endif ( NOT EIGEN_FOUND)
  18. include_directories(
  19. ${EIGEN_INCLUDE_DIRS} #set by pkg_check_modules
  20. "lib/Catch/single_include/catch2"
  21. "lib/cxxopts/include"
  22. "include"
  23. "test"
  24. )