-
Notifications
You must be signed in to change notification settings - Fork 54
/
CMakeLists.txt
115 lines (99 loc) · 2.84 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
cmake_minimum_required(VERSION 3.16.0)
project(RaidFinder VERSION 2.7.1 LANGUAGES CXX)
add_compile_definitions(VERSION="2.7.1")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
include_directories(Externals/nlohmann)
include(EmbedTranslations)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
find_package(Qt6 COMPONENTS Core LinguistTools Network Widgets REQUIRED)
set(PROJECT_TS
i18n/RaidFinder_de.ts
i18n/RaidFinder_es.ts
i18n/RaidFinder_fr.ts
i18n/RaidFinder_it.ts
i18n/RaidFinder_ja.ts
i18n/RaidFinder_ko.ts
i18n/RaidFinder_pt.ts
i18n/RaidFinder_tw.ts
i18n/RaidFinder_zh.ts
)
set(PROJECT_QRC
Externals/QDarkStyleSheet/qdarkstyle/dark/style.qrc
resources.qrc
)
set(PROJECT_UI
Forms/Controls/IVFilter.ui
Forms/MainWindow.ui
Forms/Profile/ProfileEditor.ui
Forms/Profile/ProfileManager.ui
Forms/Tools/DenMap.ui
Forms/Tools/EncounterLookup.ui
Forms/Tools/IVCalculator.ui
Forms/Tools/Settings.ui
)
set(PROJECT_SOURCES
Core/Generator/RaidGenerator.cpp
Core/Loader/DenLoader.cpp
Core/Loader/PersonalLoader.cpp
Core/Loader/ProfileLoader.cpp
Core/Results/Den.cpp
Core/Results/PersonalInfo.cpp
Core/Results/Profile.cpp
Core/Results/Raid.cpp
Core/StateFilter.cpp
Core/Util/IVChecker.cpp
Core/Util/Nature.cpp
Core/Util/Translator.cpp
Forms/Controls/CheckList.cpp
Forms/Controls/IVFilter.cpp
Forms/Controls/Label.cpp
Forms/Controls/TableView.cpp
Forms/Controls/TextBox.cpp
Forms/MainWindow.cpp
Forms/Profile/ProfileEditor.cpp
Forms/Profile/ProfileManager.cpp
Forms/Tools/DenMap.cpp
Forms/Tools/EncounterLookup.cpp
Forms/Tools/IVCalculator.cpp
Forms/Tools/Settings.cpp
Models/ProfileModel.cpp
Models/StateModel.cpp
main.cpp
)
qt_add_translation(PROJECT_QM ${PROJECT_TS} OPTIONS -nounfinished -removeidentical)
embed_translations(PROJECT_I18N ${PROJECT_QM})
if (WIN32)
add_executable(RaidFinder
WIN32
${PROJECT_I18N}
${PROJECT_QRC}
${PROJECT_UI}
${PROJECT_SOURCES}
appicon.rc
)
elseif (APPLE)
set(MACOSX_BUNDLE_ICON_FILE raidfinder.icns)
set(APP_ICON_MACOSX ${CMAKE_CURRENT_SOURCE_DIR}/Resources/Images/raidfinder.icns)
set_source_files_properties(${APP_ICON_MACOSX} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
add_executable(RaidFinder
MACOSX_BUNDLE
${PROJECT_I18N}
${PROJECT_QRC}
${PROJECT_UI}
${PROJECT_SOURCES}
${APP_ICON_MACOSX}
)
else ()
add_executable(RaidFinder
${PROJECT_I18N}
${PROJECT_QRC}
${PROJECT_UI}
${PROJECT_SOURCES}
)
endif ()
target_link_libraries(RaidFinder PRIVATE Qt6::Core Qt6::Network Qt6::Widgets)