-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
50 lines (43 loc) · 1.17 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
cmake_minimum_required (VERSION 3.15)
project (GraphicsProject)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_COMPILE_WARNING_AS_ERROR ON)
include(cmake/dependencies.cmake)
add_library(graphics STATIC
src/Camera.hpp
src/Camera.cpp
src/Application.hpp
src/Application.cpp
src/glError.hpp
src/glError.cpp
src/Shader.hpp
src/Shader.cpp
#src/Scene.hpp
#src/Scene.cpp
src/spheres.hpp
src/spheres.cpp
src/cylinders.hpp
src/cylinders.cpp
src/triangles.hpp
src/triangles.cpp
src/patches.hpp
src/patches.cpp
src/patch_shader_tri6.cpp
src/patch_shader_quad4.cpp
src/patch_shader_quad8.cpp
src/patch_shader_quad9.cpp
)
target_include_directories(graphics PUBLIC ${PROJECT_SOURCE_DIR}/src)
target_include_directories(graphics PUBLIC ${PROJECT_SOURCE_DIR}/src/imgui)
target_link_libraries(graphics PUBLIC glfw glm libglew_static imgui)
target_compile_definitions(graphics PUBLIC "-DGRAPHICS_DATA_DIR=\"${PROJECT_SOURCE_DIR}/data/\"")
if (GRAPHICS_BUILD_EXAMPLES)
add_subdirectory(examples)
endif()
if (GRAPHICS_BUILD_TESTS)
add_subdirectory(tests)
endif()
if (GRAPHICS_ENABLE_ASAN)
add_link_options(-fsanitize=address)
add_compile_options(-fsanitize=address)
endif()