Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
nicmorais committed Jul 15, 2023
0 parents commit 7795639
Show file tree
Hide file tree
Showing 31 changed files with 1,376 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# C++ objects and libs
*.slo
*.lo
*.o
*.a
*.la
*.lai
*.so
*.so.*
*.dll
*.dylib

# Qt-es
object_script.*.Release
object_script.*.Debug
*_plugin_import.cpp
/.qmake.cache
/.qmake.stash
*.pro.user
*.pro.user.*
*.qbs.user
*.qbs.user.*
*.moc
moc_*.cpp
moc_*.h
qrc_*.cpp
ui_*.h
*.qmlc
*.jsc
Makefile*
*build-*
*.qm
*.prl

# Qt unit tests
target_wrapper.*

# QtCreator
*.autosave

# QtCreator Qml
*.qmlproject.user
*.qmlproject.user.*

# QtCreator CMake
CMakeLists.txt.user*

# QtCreator 4.8< compilation database
compile_commands.json

# QtCreator local machine specific files for imported projects
*creator.user*

*_qmlcache.qrc
49 changes: 49 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
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)

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
)

set_property(TARGET qompass PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
${CMAKE_CURRENT_SOURCE_DIR}/android)

target_link_libraries(qompass
PRIVATE Qt6::Quick
Qt6::Sensors
)

qt_add_resources(qompass
"main"
PREFIX
"/"
FILES
images/degrees_indicator.png
images/north_indicator.png
)

install(TARGETS qompass
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
Loading

0 comments on commit 7795639

Please sign in to comment.