CMakeLists.txt 893 B

12345678910111213141516171819
  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. set(RAY_HEADERS include/tuple.h include/math_helper.h include/colour.h include/canvas.h
  5. include/matrix.h include/transformation.h include/intersect.h include/intersection.h
  6. include/object.h include/ray.h include/sphere.h)
  7. set(RAY_SOURCES tuple.cpp math_helper.cpp colour.cpp canvas.cpp matrix.cpp transformation.cpp intersect.cpp
  8. objects/object.cpp objects/ray.cpp objects/sphere.cpp)
  9. target_include_directories(rayonnement PUBLIC include)
  10. target_sources(rayonnement PRIVATE ${RAY_HEADERS} ${RAY_SOURCES})
  11. target_link_libraries(rayonnement LodePNG)
  12. # Second we build the main executable
  13. add_executable(dorayme main.cpp)
  14. target_include_directories(rayonnement PUBLIC include ${LODEPNG_INCLUDE_FOLDER})
  15. target_link_libraries(dorayme rayonnement)