CMakeLists.txt 878 B

12345678910111213141516171819202122232425262728
  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 /usr/local/include)
  19. #target_link_libraries(rasterizer /usr/local/lib/libprofiler.a)
  20. include_directories(rasterizer ${CMAKE_SOURCE_DIR}/deps)
  21. #find_package(OpenCV REQUIRED)
  22. #include_directories(rasterizer ${OpenCV_INCLUDE_DIRS})
  23. #target_link_libraries(rasterizer ${OpenCV_LIBS})