-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
88 lines (70 loc) · 1.72 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
cmake_minimum_required(VERSION 3.0.1)
project(LDBox VERSION 0.3.1)
option(BUILD_SHARED_LIBS "Build Shared Libraries" ON)
set(IMGUI_DIR vendor/imgui)
set (CMAKE_CXX_STANDARD 17)
file(GLOB LDBOX_SRC
"${CMAKE_CURRENT_LIST_DIR}/src/*.cpp"
"${CMAKE_CURRENT_LIST_DIR}/src/ui/*.cpp"
"${CMAKE_CURRENT_LIST_DIR}/src/core/*.cpp"
"${IMGUI_DIR}/*.cpp"
"${IMGUI_DIR}/backends/imgui_impl_sdl2.cpp"
"${IMGUI_DIR}/backends/imgui_impl_opengl3.cpp"
)
#SDL2
add_subdirectory(vendor/SDL)
include_directories(vendor/SDL/include)
link_directories(vendor/SDL/lib)
#spdlog
add_subdirectory(vendor/spdlog/)
link_directories(vendor/spdlog)
include_directories(vendor/spdlog/include)
#glad
add_subdirectory(vendor/glad/)
link_directories(vendor/glad)
include_directories(vendor/glad/include)
#cpr
add_subdirectory(vendor/cpr/)
link_directories(vendor/cpr)
include_directories(vendor/cpr/include)
#json
add_subdirectory(vendor/json/)
link_directories(vendor/json)
include_directories(vendor/json/include)
#curl
#set(HTTP_ONLY ON)
#set(CMAKE_USE_OPENSSL OFF)
#set(BUILD_CURL_EXE OFF)
#set(CURL_STATICLIB ON)
#set(CURL_ZLIB OFF)
#set(CMAKE_USE_LIBSSH2 OFF)
#add_subdirectory(vendor/curl/)
#link_directories(vendor/curl)
#include_directories(vendor/curl/include)
#glm
#add_subdirectory(vendor/glm)
#link_directories(vendor/glm)
#include_directories(vendor/glm)
add_executable(
LDBox
${LDBOX_SRC}
)
target_include_directories(
LDBox
PUBLIC
${IMGUI_DIR}
${IMGUI_DIR}/backends/
)
target_link_libraries(
LDBox PUBLIC
SDL2main
SDL2
spdlog
glad
cpr
nlohmann_json
# glm
)
add_test(
NAME LDBox
COMMAND LDBox)