CMakeLists.txt 754 B

123456789101112131415161718192021
  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)
  5. file(GLOB RAY_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/objects/*.cpp)
  6. target_include_directories(rayonnement PUBLIC include)
  7. target_sources(rayonnement PRIVATE ${RAY_HEADERS} ${RAY_SOURCES})
  8. target_link_libraries(rayonnement LodePNG)
  9. # Second we build the main executable
  10. add_executable(dorayme main.cpp)
  11. target_include_directories(rayonnement PUBLIC include ${LODEPNG_INCLUDE_FOLDER})
  12. target_link_libraries(dorayme rayonnement)
  13. if (COVERALLS)
  14. set(COVERAGE_SRCS ${RAY_HEADERS} ${RAY_SOURCES} ${COVERAGE_SRCS} PARENT_SCOPE)
  15. endif()