-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
CMakeLists.txt
109 lines (90 loc) · 2.52 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
cmake_minimum_required(VERSION 3.16...3.29)
project(CloudLogOffline VERSION 1.1.6 LANGUAGES CXX)
include(GNUInstallDirs)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC ON)
set(minimum_qt_version "")
if(ANDROID OR IOS)
set(minimum_qt_version "6.5")
endif()
find_package(Qt6 ${minimum_qt_version} REQUIRED COMPONENTS Gui LinguistTools Positioning Quick Sql Svg Widgets Xml)
add_library(LibCloudLogOffline STATIC
src/adiftools.cpp
src/cabrillotools.cpp
src/cloudlogmanager.cpp
src/csvtools.cpp
src/dbmanager.cpp
src/logtools.cpp
src/maidenhead.cpp
src/migrationmanager.cpp
src/qrzmanager.cpp
src/qsomodel.cpp
src/repeatermodel.cpp
src/rigmanager.cpp
src/sharemanager.cpp
src/tools.cpp
src/translationmanager.cpp
)
# IDE convenience
file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/src/*.h")
target_sources(LibCloudLogOffline PRIVATE ${headers})
target_compile_definitions(LibCloudLogOffline PUBLIC GIT_VERSION="${PROJECT_VERSION}")
qt_add_resources(LibCloudLogOffline resources
FILES
# Qt6 qml
qml/AboutView.qml
qml/DatePicker.qml
qml/DrawerItem.qml
qml/ExportHeader.qml
qml/ExportView.qml
qml/IconButton.qml
qml/Main.qml
qml/PageDrawer.qml
qml/QRZView.qml
qml/QSOItem.qml
qml/QSOListView.qml
qml/QSOTextField.qml
qml/QSOView.qml
qml/QSOViewWrapper.qml
qml/RepeaterItem.qml
qml/RepeaterListView.qml
qml/SettingsSwitch.qml
qml/SettingsView.qml
qml/SvgImage.qml
qml/TimePicker.qml
# Other
fonts/fa-solid-900.ttf
fonts/LinLibertine_DR_G.ttf
fonts/Roboto-Regular.ttf
images/logo_circle.png
images/logo_circle.svg
images/logo_square.svg
)
qt_add_translations(LibCloudLogOffline
TS_FILES
translations/Armenian.ts
translations/English.ts
translations/German.ts
)
target_link_libraries(LibCloudLogOffline
PUBLIC
Qt::GuiPrivate
Qt::Positioning
Qt::Quick
Qt::Sql
Qt::Xml
PRIVATE
Qt::Svg
)
add_executable(CloudLogOffline WIN32 src/main.cpp)
target_link_libraries(CloudLogOffline PRIVATE LibCloudLogOffline)
if(NOT ANDROID AND NOT IOS)
target_link_libraries(CloudLogOffline PRIVATE Qt::Widgets) # Cf. main.cpp
endif()
install(TARGETS CloudLogOffline)
option(BUILD_TESTING "Build tests" ON)
if(BUILD_TESTING)
enable_testing()
add_subdirectory(tests)
endif()