-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
51 lines (40 loc) · 1.12 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
cmake_minimum_required(VERSION 3.16)
if(NOT QOMPASS_VERSION)
message(WARNING "Notice: QOMPASS_VERSION variable was not set. Defaulting to 0.1")
set(QOMPASS_VERSION "0.1")
endif()
project(qompass VERSION ${QOMPASS_VERSION} LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt6 6.2 REQUIRED COMPONENTS Quick Sensors Svg)
configure_file(main.cpp.in main.cpp @ONLY)
qt_add_executable(qompass
${CMAKE_BINARY_DIR}/main.cpp
)
qt_add_qml_module(qompass
URI qompass
VERSION 1.0
QML_FILES Main.qml Theme.qml
)
set_property(TARGET qompass PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
${CMAKE_CURRENT_SOURCE_DIR}/android)
target_link_libraries(qompass
PRIVATE Qt6::Quick
Qt6::Sensors
Qt6::Svg
)
qt_add_resources(qompass
"main"
PREFIX
"/"
FILES
images/degrees_indicator.svg
images/north_indicator.svg
images/degrees_indicator_dark_theme.svg
)
install(TARGETS qompass
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)