CMakeLists.txt 870 B

12345678910111213141516171819202122
  1. # To simplify testing, the app is build in two passes,
  2. # First most is build as a library
  3. add_library(rayonnement STATIC)
  4. file(GLOB RAY_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/include/*.h ${CMAKE_CURRENT_SOURCE_DIR}/pattern/*.h)
  5. file(GLOB RAY_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/shapes/*.cpp
  6. ${CMAKE_CURRENT_SOURCE_DIR}/worldbuilder/*.cpp)
  7. target_include_directories(rayonnement PUBLIC include pattern)
  8. target_sources(rayonnement PRIVATE ${RAY_HEADERS} ${RAY_SOURCES})
  9. target_link_libraries(rayonnement LodePNG)
  10. # Second we build the main executable
  11. add_executable(dorayme main.cpp)
  12. target_include_directories(rayonnement PUBLIC include ${LODEPNG_INCLUDE_FOLDER})
  13. target_link_libraries(dorayme rayonnement)
  14. if (COVERALLS)
  15. set(COVERAGE_SRCS ${RAY_HEADERS} ${RAY_SOURCES} ${COVERAGE_SRCS} PARENT_SCOPE)
  16. endif()