-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
73 lines (61 loc) · 1.88 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
cmake_minimum_required(VERSION 3.15)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake
CACHE STRING "Vcpkg toolchain file")
project(scene-sous-marine)
set(HEADER_FILES
utils/camera.h
utils/shader.h
utils/mesh.h
utils/model.h
utils/constants.h
utils/options.h
src/texture.h
src/post_processing.h
src/scene.h
src/shadowmap.h
src/caustics.h
src/transform.h
src/screen_pass.h
src/underwater.h
src/erosion.h
src/dilation.h
)
set(SOURCE_FILES
main.cpp
utils/shader.cpp
utils/options.cpp
src/texture.cpp
src/stb_impl.cpp
src/post_processing.cpp
src/scene.cpp
src/shadowmap.cpp
src/caustics.cpp
src/transform.cpp
src/screen_pass.cpp
src/underwater.cpp
src/erosion.cpp
src/dilation.cpp
)
add_executable(${PROJECT_NAME} ${HEADER_FILES} ${SOURCE_FILES})
find_package(glfw3 CONFIG REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE glfw)
find_package(glm REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE glm)
find_package(spdlog REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE spdlog::spdlog)
find_path(STB_INCLUDE_DIRS "stb.h")
target_include_directories(${PROJECT_NAME} PRIVATE ${STB_INCLUDE_DIRS})
find_package(glad CONFIG REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE glad::glad)
find_package(assimp CONFIG REQUIRED)
if (WIN32)
target_link_libraries(${PROJECT_NAME} PRIVATE assimp::assimp)
else()
target_link_libraries(${PROJECT_NAME} PRIVATE ${ASSIMP_LIBRARIES})
endif()
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
if(MSVC)
target_compile_options(${PROJECT_NAME} PRIVATE /W4)
else()
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -pedantic -Werror)
endif()