CMakeLists.txt 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. cmake_minimum_required(VERSION 3.8)
  2. project(rainynite-core)
  3. set(CMAKE_CXX_STANDARD 17)
  4. set(CMAKE_CXX_STANDARD_REQUIRED ON)
  5. include(FindPkgConfig)
  6. pkg_check_modules(LIB2GEOM REQUIRED 2geom)
  7. find_package(Boost REQUIRED COMPONENTS filesystem system)
  8. find_package(FMT REQUIRED)
  9. set(CATCH_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/catch/" CACHE STRING "Path to Catch header library")
  10. set(RAPIDJSON_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/rapidjson/include/" CACHE STRING "Path to RapidJSON header library")
  11. include_directories(SYSTEM "${RAPIDJSON_INCLUDE_DIRS}")
  12. set(YAML_CPP_BUILD_TOOLS OFF CACHE BOOL "YAML: Enable testing and parse tools")
  13. set(YAML_CPP_BUILD_CONTRIB OFF CACHE BOOL "YAML: Enable contrib stuff in library")
  14. set(BUILD_SHARED_LIBS ON)
  15. add_subdirectory(thirdparty/yaml-cpp)
  16. find_package(geom_helpers REQUIRED)
  17. find_package(morphing REQUIRED)
  18. include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")
  19. enable_testing()
  20. add_subdirectory(tests)
  21. add_subdirectory(log)
  22. add_subdirectory(os)
  23. add_subdirectory(document)
  24. add_subdirectory(filters)
  25. add_subdirectory(time)
  26. add_subdirectory(renderers)
  27. export(
  28. EXPORT rainynite_core
  29. FILE "${CMAKE_CURRENT_BINARY_DIR}/rainynite_core-config.cmake"
  30. )
  31. install(
  32. EXPORT rainynite_core
  33. FILE "rainynite_core-config.cmake"
  34. DESTINATION "lib/cmake/rainynite_core"
  35. )
  36. install(
  37. DIRECTORY include/
  38. DESTINATION include
  39. )