This repository has been archived by the owner on Apr 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
101 lines (90 loc) · 2.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
add_subdirectory(freetype2)
if (NOT MSVC)
target_compile_options(freetype PRIVATE -Wno-implicit-fallthrough)
endif()
add_subdirectory(zeus)
set(ZEUS_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/zeus/include)
add_subdirectory(resources/fonts)
add_library(specter
lib/Button.cpp
lib/Control.cpp
lib/FileBrowser.cpp
lib/FontCache.cpp
lib/Icon.cpp
lib/Menu.cpp
lib/MessageWindow.cpp
lib/ModalWindow.cpp
lib/MultiLineTextView.cpp
lib/PathButtons.cpp
lib/RootView.cpp
lib/ScrollView.cpp
lib/Space.cpp
lib/SplitView.cpp
lib/Table.cpp
lib/TextField.cpp
lib/TextView.cpp
lib/Toolbar.cpp
lib/Tooltip.cpp
lib/View.cpp
lib/ViewResources.cpp
include/specter/Button.hpp
include/specter/Control.hpp
include/specter/FileBrowser.hpp
include/specter/FontCache.hpp
include/specter/IMenuNode.hpp
include/specter/IViewManager.hpp
include/specter/Icon.hpp
include/specter/Menu.hpp
include/specter/MessageWindow.hpp
include/specter/ModalWindow.hpp
include/specter/MultiLineTextView.hpp
include/specter/Node.hpp
include/specter/NodeSocket.hpp
include/specter/NumericField.hpp
include/specter/Outliner.hpp
include/specter/Panel.hpp
include/specter/PathButtons.hpp
include/specter/RootView.hpp
include/specter/ScrollView.hpp
include/specter/Space.hpp
include/specter/SplitView.hpp
include/specter/Table.hpp
include/specter/TextField.hpp
include/specter/TextView.hpp
include/specter/Toolbar.hpp
include/specter/Tooltip.hpp
include/specter/View.hpp
include/specter/ViewResources.hpp
include/specter/genie.hpp
include/specter/specter.hpp
)
if (MSVC)
target_compile_options(specter PRIVATE
# Enforce various standards compliant behavior.
$<$<COMPILE_LANGUAGE:CXX>:/permissive->
# Enable standard volatile semantics.
$<$<COMPILE_LANGUAGE:CXX>:/volatile:iso>
# Reports the proper value for the __cplusplus preprocessor macro.
$<$<COMPILE_LANGUAGE:CXX>:/Zc:__cplusplus>
# Use latest C++ standard.
$<$<COMPILE_LANGUAGE:CXX>:/std:c++latest>
)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# Flags for MSVC (not clang-cl)
target_compile_options(specter PRIVATE
# Allow constexpr variables to have explicit external linkage.
$<$<COMPILE_LANGUAGE:CXX>:/Zc:externConstexpr>
# Assume that new throws exceptions, allowing better code generation.
$<$<COMPILE_LANGUAGE:CXX>:/Zc:throwingNew>
)
endif()
endif()
target_link_libraries(specter PUBLIC
freetype
hecl-full
specter-fonts
zeus
UrdeLocales
)
target_include_directories(specter PUBLIC include freetype2/include)
target_atdna(specter atdna_FontCache.cpp include/specter/FontCache.hpp)