aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBart Ribbers <bribbers@disroot.org>2021-04-23 15:53:36 +0200
committerMagneFire <idanlcontact@gmail.com>2021-05-17 13:03:38 +0200
commitb3cf236b34c386a9cbff81ffc1631554bd60ee1b (patch)
tree77ffa5a21e36a10b8d79fddc020c51e9c4235fb8 /CMakeLists.txt
parente974ad13edb44d6705e3f934193f253bc631ff83 (diff)
Port to CMake
Qt is slowly deprecating QMake. They have stopped building Qt itself with QMake and moved Qt6 to CMake instead. Although QMake is still around, it's clear the focus has shifted and it would be good for applications to switch over to an alternative build system as well So hereby, switch the build system to CMake
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt25
1 files changed, 25 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..8a682c7
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,25 @@
+cmake_minimum_required(VERSION 3.6.0)
+
+project(asteroid-compass
+ VERSION 0.0.1
+ DESCRIPTION "Default compass app for AsteroidOS")
+
+find_package(ECM REQUIRED NO_MODULE)
+find_package(AsteroidApp REQUIRED)
+
+set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ASTEROID_MODULE_PATH})
+
+include(FeatureSummary)
+include(GNUInstallDirs)
+include(ECMQMLModules)
+include(AsteroidCMakeSettings)
+include(AsteroidTranslations)
+
+ecm_find_qmlmodule(QtSensors 5.3)
+
+add_subdirectory(src)
+
+build_translations(i18n)
+generate_desktop(${CMAKE_SOURCE_DIR} asteroid-compass)
+
+feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)