-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
56 lines (46 loc) · 1.02 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
cmake_minimum_required(VERSION 3.18)
project("Rasterizer" LANGUAGES CXX C)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CUDA_STANDARD 17)
set(CMAKE_CUDA_STANDARD_REQUIRED ON)
set(THIRD_PARTY_DIR "${CMAKE_CURRENT_LIST_DIR}/3rd")
set(INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/include")
configure_file(
"${INCLUDE_DIR}/cmake_in"
"${INCLUDE_DIR}/cmake_in.h"
)
# <dependencies>
add_subdirectory("${THIRD_PARTY_DIR}/glfw")
# </dependencies>
# <global_includes>
include_directories(${THIRD_PARTY_DIR})
include_directories("${THIRD_PARTY_DIR}/glad/include")
include_directories("${THIRD_PARTY_DIR}/glm")
include_directories(${INCLUDE_DIR})
# </global_includes>
add_subdirectory("src")
# <app>
set(TARGET_NAME "demo")
add_executable(
${TARGET_NAME}
"main.cpp"
"${THIRD_PARTY_DIR}/glad/src/glad.c"
)
target_link_libraries(
${TARGET_NAME}
PRIVATE
"rasterizer"
"glfw"
)
set(TARGET_NAME "test")
add_executable(
${TARGET_NAME}
"test.cpp"
)
target_link_libraries(
${TARGET_NAME}
PRIVATE
"rasterizer"
)
# </app>