-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
63 lines (51 loc) · 1.33 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
cmake_minimum_required(VERSION 3.20)
project(goodnight)
set(CMAKE_CXX_STANDARD 26)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
set(CMAKE_AUTORCC ON)
# Third Party Libraries
add_subdirectory(external/Lyra)
add_subdirectory(external/glaze)
### Dependencies for GUI
set(BUILD_SHARED_LIBS OFF)
set(RMLUI_SAMPLES ON)
set(RMLUI_SVG_PLUGIN OFF)
add_subdirectory(external/glfw)
add_subdirectory(external/lunasvg)
add_library(glfw::glfw ALIAS glfw)
add_library(opengl INTERFACE)
add_library(OpenGL::GL ALIAS opengl)
add_subdirectory(external/freetype)
add_library(Freetype::Freetype ALIAS freetype)
add_subdirectory(external/RmlUi)
# Base Library
add_library(goodnight-lib
src/goodnight.cpp src/placeholder-window.cpp
)
target_link_libraries(goodnight-lib
wevtapi Setupapi Newdev
)
target_include_directories(goodnight-lib
PUBLIC ./include
)
# CLI
add_executable(goodnight-cli
cli/cli.cpp resources/app.rc
)
target_link_libraries(goodnight-cli
goodnight-lib bfg::lyra
)
# GUI
add_executable(goodnight-gui
gui/gui.cpp resources/app.rc
)
target_include_directories(goodnight-gui
PRIVATE external/RmlUi/include external/
)
target_link_directories(goodnight-gui
PRIVATE external/prebuilts
)
target_link_libraries(goodnight-gui
goodnight-lib RmlUi::RmlUi freetype
rmlui_backend_GLFW_GL3 glfw3_mt dwmapi glaze::glaze
)