-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
97 lines (84 loc) · 2.58 KB
/
Copy pathCMakeLists.txt
File metadata and controls
97 lines (84 loc) · 2.58 KB
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
cmake_minimum_required(VERSION 3.16)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(APP_NAME Sapla)
set(CORE_NAME core)
set(APP_OUTPUT Sapla)
set(SOURCES
main.cpp
)
set(CORELIB
core.cpp help.cpp
game.cpp styles.cpp
log.cpp menu.cpp
settings.cpp
resources.qrc
plugins/getPlugins.cpp
base/font.cpp
base/parseMd.cpp
base/markdown.cpp
base/rectIt.cpp
base/svgRend.cpp
base/svgUtils.cpp
base/svgWid.hpp
base/flowlayout.cpp
wids/ovrlWrap.cpp
wids/listWid.cpp
wids/svgBtn.cpp
wids/svgPic.cpp
wids/schdInfWid.cpp
items/cardIt.cpp
items/progress.cpp
items/treeItem.cpp
items/scheduleInfTxt.cpp
items/multiprogress.cpp
items/deckProgress.cpp
notes/note.cpp
notes/schedule.cpp
notes/template.cpp
notes/decks.cpp
notes/eximport.cpp
notes/getNotes.cpp
notes/cardList.cpp
notes/pile.hpp
notes/filter.cpp
notes/noteTree.cpp
notes/features/features.cpp
notes/features/builtinFeats.cpp
notes/features/defaultFeats.cpp
notes/features/hideShuffFeats.cpp
notes/features/secretFeat.cpp
scenes/baseScn.cpp
scenes/gameScn.cpp
scenes/homeScn.cpp
scenes/winScn.cpp
scenes/browseScn.cpp
scenes/pluginView.cpp
scenes/xtra/lineEdit2.hpp
scenes/xtra/deckOpts.cpp
scenes/xtra/browseInfo.cpp
)
# Do not complain about 'not used directly' things (as they are used, just indirectly)
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU")
add_compile_options(-Wno-unused-include-directive)
endif()
project(${APP_NAME} LANGUAGES CXX)
find_package(Qt6 REQUIRED COMPONENTS Core Svg Widgets)
add_library(${CORE_NAME} SHARED ${CORELIB})
set_target_properties(${CORE_NAME} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)
target_include_directories(${CORE_NAME} PUBLIC ${CMAKE_SOURCE_DIR})
target_link_libraries(${CORE_NAME} PRIVATE Qt6::Core Qt6::Svg Qt6::Widgets)
add_executable(${APP_NAME} ${SOURCES})
set_target_properties(${APP_NAME} PROPERTIES OUTPUT_NAME ${APP_OUTPUT})
target_link_libraries(${APP_NAME} PRIVATE Qt6::Core Qt6::Svg Qt6::Widgets)
target_link_libraries(${APP_NAME} PRIVATE core)
add_subdirectory(plugins/builtin)
option(BUILD_PLUGINS "Build plugins" ON)
if (BUILD_PLUGINS)
add_subdirectory(plugins/grid)
add_subdirectory(plugins/winter)
endif()
add_custom_command(TARGET ${APP_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E echo " \\> Successfully built to \\\"$<TARGET_FILE:${APP_NAME}>\\\"!"
COMMAND ${CMAKE_COMMAND} -E echo " \\> Plugins built are located in \\\"${CMAKE_BINARY_DIR}/outPlugs/\\\""
)