-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
136 lines (121 loc) · 3.63 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
cmake_minimum_required(VERSION 3.29)
project(Glow VERSION 0.0.8)
option(
GLOW_TESTS
"Build tests"
OFF
)
option(
GLOW_EXAMPLES
"Build examples"
OFF
)
list(
APPEND
CMAKE_MODULE_PATH
"${PROJECT_SOURCE_DIR}/libs/cmake-modules/"
)
include(cmake-modules)
install_common()
install_wil(1.0.240122.1)
install_cppwinrt(2.0.240405.15)
install_webview2(1.0.2592.51)
install_ada(2.8.0)
install_json(3.11.3)
install_sqlite(3460000)
generate_cppwinrt()
release_info()
add_library(Glow)
add_library(
glow::glow
ALIAS
Glow
)
configure_file(
"${PROJECT_SOURCE_DIR}/src/config.hxx"
"${CMAKE_CURRENT_BINARY_DIR}/include/glow/config.hxx"
)
target_sources(
Glow
PRIVATE "${PROJECT_SOURCE_DIR}/src/app.cxx"
"${PROJECT_SOURCE_DIR}/src/coinitialize.cxx"
"${PROJECT_SOURCE_DIR}/src/colors.cxx"
"${PROJECT_SOURCE_DIR}/src/console.cxx"
"${PROJECT_SOURCE_DIR}/src/database.cxx"
"${PROJECT_SOURCE_DIR}/src/filesystem.cxx"
"${PROJECT_SOURCE_DIR}/src/gdiplus.cxx"
"${PROJECT_SOURCE_DIR}/src/gui.cxx"
"${PROJECT_SOURCE_DIR}/src/guid.cxx"
"${PROJECT_SOURCE_DIR}/src/notification.cxx"
"${PROJECT_SOURCE_DIR}/src/system.cxx"
"${PROJECT_SOURCE_DIR}/src/text.cxx"
"${PROJECT_SOURCE_DIR}/src/url.cxx"
"${PROJECT_SOURCE_DIR}/src/webview.cxx"
"${PROJECT_SOURCE_DIR}/src/window.cxx"
PRIVATE FILE_SET
HEADERS
BASE_DIRS
"${PROJECT_SOURCE_DIR}/src"
"${PROJECT_SOURCE_DIR}/include"
"${CMAKE_CURRENT_BINARY_DIR}/include"
FILES
"${PROJECT_SOURCE_DIR}/src/app.hxx"
"${PROJECT_SOURCE_DIR}/src/coinitialize.hxx"
"${PROJECT_SOURCE_DIR}/src/colors.hxx"
"${PROJECT_SOURCE_DIR}/src/console.hxx"
"${PROJECT_SOURCE_DIR}/src/database.hxx"
"${PROJECT_SOURCE_DIR}/src/filesystem.hxx"
"${PROJECT_SOURCE_DIR}/src/gdiplus.hxx"
"${PROJECT_SOURCE_DIR}/src/gui.hxx"
"${PROJECT_SOURCE_DIR}/src/guid.hxx"
"${PROJECT_SOURCE_DIR}/src/notification.hxx"
"${PROJECT_SOURCE_DIR}/src/position.hxx"
"${PROJECT_SOURCE_DIR}/src/random.hxx"
"${PROJECT_SOURCE_DIR}/src/system.hxx"
"${PROJECT_SOURCE_DIR}/src/text.hxx"
"${PROJECT_SOURCE_DIR}/src/url.hxx"
"${PROJECT_SOURCE_DIR}/src/webview.hxx"
"${PROJECT_SOURCE_DIR}/src/window.hxx"
"${PROJECT_SOURCE_DIR}/include/glow/glow.hxx"
"${CMAKE_CURRENT_BINARY_DIR}/include/glow/config.hxx"
)
target_include_directories(
Glow
PUBLIC "${PROJECT_SOURCE_DIR}/include"
"${CMAKE_CURRENT_BINARY_DIR}/include"
"${webview2_SOURCE_DIR}/build/native/include-winrt"
"${webview2_SOURCE_DIR}/build/native/include"
"${wil_SOURCE_DIR}/include"
)
target_link_directories(
Glow
PUBLIC
"${webview2_SOURCE_DIR}/build/native/x64"
)
target_link_libraries(
Glow
PRIVATE common::flags
PUBLIC common::features
common::definitions
ms::wil
ms::cppwinrt
ms::webview2
ada-url::ada
nlohmann::json
sqlite::sqlite
dwmapi.lib
Uxtheme.lib
Comctl32.lib
gdiplus.lib
windowscodecs.lib
ShLwApi.Lib
WebView2LoaderStatic.lib
WindowsApp.lib
)
if(GLOW_EXAMPLES)
add_subdirectory(examples)
endif()
if(GLOW_TESTS)
enable_testing()
add_subdirectory(tests)
endif()