CMakeLists.txt 628 B

123456789101112131415161718192021222324
  1. cmake_minimum_required(VERSION 3.1)
  2. include(ExternalProject)
  3. project(DoRayMe)
  4. set(CMAKE_CXX_STANDARD 11)
  5. # LodePNG don't make a .a or .so, so let's build a library here
  6. add_library(LodePNG STATIC)
  7. set(LODEPNG_INCLUDE_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/external/lodepng)
  8. target_sources(LodePNG PRIVATE external/lodepng/lodepng.cpp external/lodepng/lodepng.h)
  9. # Main app
  10. add_subdirectory(source)
  11. option(PACKAGE_TESTS "Build the tests" ON)
  12. if(PACKAGE_TESTS)
  13. enable_testing()
  14. include(GoogleTest)
  15. add_subdirectory("${PROJECT_SOURCE_DIR}/external/googletest" "external/googletest")
  16. add_subdirectory(tests)
  17. endif()