Skip to content

Commit

Permalink
Add CMakeLists.txt (Qt6 only)
Browse files Browse the repository at this point in the history
  • Loading branch information
dg0yt committed Aug 17, 2024
1 parent 03dbd40 commit 67fd005
Showing 1 changed file with 87 additions and 0 deletions.
87 changes: 87 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
cmake_minimum_required(VERSION 3.16...3.29)

project(CloudLogOffline VERSION 1.1.6 LANGUAGES CXX)

include(GNUInstallDirs)

set(CMAKE_CXX_STANDARD 11)
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 Positioning Quick Sql Svg Widgets Xml)

add_executable(CloudLogOffline WIN32
src/adiftools.cpp
src/cabrillotools.cpp
src/cloudlogmanager.cpp
src/csvtools.cpp
src/dbmanager.cpp
src/logtools.cpp
src/main.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(CloudLogOffline PRIVATE ${headers})

target_compile_definitions(CloudLogOffline PRIVATE GIT_VERSION="${PROJECT_VERSION}")

qt_add_resources(CloudLogOffline 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
)

target_link_libraries(CloudLogOffline
PRIVATE
Qt::GuiPrivate
Qt::Positioning
Qt::Quick
Qt::Sql
Qt::Svg
Qt::Xml
)
if(NOT ANDROID AND NOT IOS)
target_link_libraries(CloudLogOffline PRIVATE Qt::Widgets) # Cf. main.cpp
endif()

install(TARGETS CloudLogOffline)

0 comments on commit 67fd005

Please sign in to comment.