Skip to content

Commit 7795639

Browse files
committed
Initial commit
0 parents  commit 7795639

31 files changed

+1376
-0
lines changed

.gitignore

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# C++ objects and libs
2+
*.slo
3+
*.lo
4+
*.o
5+
*.a
6+
*.la
7+
*.lai
8+
*.so
9+
*.so.*
10+
*.dll
11+
*.dylib
12+
13+
# Qt-es
14+
object_script.*.Release
15+
object_script.*.Debug
16+
*_plugin_import.cpp
17+
/.qmake.cache
18+
/.qmake.stash
19+
*.pro.user
20+
*.pro.user.*
21+
*.qbs.user
22+
*.qbs.user.*
23+
*.moc
24+
moc_*.cpp
25+
moc_*.h
26+
qrc_*.cpp
27+
ui_*.h
28+
*.qmlc
29+
*.jsc
30+
Makefile*
31+
*build-*
32+
*.qm
33+
*.prl
34+
35+
# Qt unit tests
36+
target_wrapper.*
37+
38+
# QtCreator
39+
*.autosave
40+
41+
# QtCreator Qml
42+
*.qmlproject.user
43+
*.qmlproject.user.*
44+
45+
# QtCreator CMake
46+
CMakeLists.txt.user*
47+
48+
# QtCreator 4.8< compilation database
49+
compile_commands.json
50+
51+
# QtCreator local machine specific files for imported projects
52+
*creator.user*
53+
54+
*_qmlcache.qrc

CMakeLists.txt

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
cmake_minimum_required(VERSION 3.16)
2+
3+
if(NOT QOMPASS_VERSION)
4+
message(WARNING "Notice: QOMPASS_VERSION variable was not set. Defaulting to 0.1")
5+
set(QOMPASS_VERSION "0.1")
6+
endif()
7+
8+
project(qompass VERSION ${QOMPASS_VERSION} LANGUAGES CXX)
9+
10+
set(CMAKE_AUTOMOC ON)
11+
set(CMAKE_AUTORCC ON)
12+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
13+
14+
find_package(Qt6 6.2 REQUIRED COMPONENTS Quick Sensors)
15+
16+
configure_file(main.cpp.in main.cpp @ONLY)
17+
18+
qt_add_executable(qompass
19+
${CMAKE_BINARY_DIR}/main.cpp
20+
)
21+
22+
qt_add_qml_module(qompass
23+
URI qompass
24+
VERSION 1.0
25+
QML_FILES Main.qml
26+
)
27+
28+
set_property(TARGET qompass PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
29+
${CMAKE_CURRENT_SOURCE_DIR}/android)
30+
31+
target_link_libraries(qompass
32+
PRIVATE Qt6::Quick
33+
Qt6::Sensors
34+
)
35+
36+
qt_add_resources(qompass
37+
"main"
38+
PREFIX
39+
"/"
40+
FILES
41+
images/degrees_indicator.png
42+
images/north_indicator.png
43+
)
44+
45+
install(TARGETS qompass
46+
BUNDLE DESTINATION .
47+
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
48+
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
49+
)

0 commit comments

Comments
 (0)