CMakeLists.txt 795 B

123456789101112131415161718192021222324252627
  1. cmake_minimum_required(VERSION 3.0)
  2. project(Rasterizer LANGUAGES CXX)
  3. set(CMAKE_CXX_STANDARD 17)
  4. set(CMAKE_CXX_STANDARD_REQUIRED ON)
  5. set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
  6. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -g")
  7. set(SOURCES src/main.cpp
  8. src/cimg_fb.cpp
  9. src/obj_loader.cpp
  10. src/mesh.cpp
  11. src/object.cpp
  12. include/obj_loader.hpp
  13. include/uv.hpp
  14. include/mesh.hpp
  15. include/object.hpp
  16. )
  17. add_executable(rasterizer ${SOURCES})
  18. target_include_directories(rasterizer PRIVATE ${CMAKE_SOURCE_DIR}/include)
  19. include_directories(rasterizer ${CMAKE_SOURCE_DIR}/deps)
  20. #find_package(OpenCV REQUIRED)
  21. #include_directories(rasterizer ${OpenCV_INCLUDE_DIRS})
  22. #target_link_libraries(rasterizer ${OpenCV_LIBS})