summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Beroset <beroset@ieee.org>2022-05-21 14:37:14 -0400
committerMagneFire <dgriet@gmail.com>2022-05-22 22:43:10 +0200
commit252a4a0f0c91c4c40eb148920b86a1ad08c71ff1 (patch)
treefbe118ba2c8a50f0228c4b2ad09427a368e9fb76
parent4455b8a54126750da5cdb1e9eb7da8869835e700 (diff)
Add commands to generate installable .ipk file
This adds generation of an .ipk file if the user requests the build target "package".
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt13
1 files changed, 12 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0392cbb..d577637 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.6.0)
+cmake_minimum_required(VERSION 3.20)
project(asteroid-helloworld
VERSION 0.0.1
@@ -20,3 +20,14 @@ add_subdirectory(src)
generate_desktop(${CMAKE_SOURCE_DIR} asteroid-helloworld)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
+
+set(CPACK_GENERATOR "DEB")
+string(TOLOWER "${CMAKE_PROJECT_NAME}" lcproject_name)
+set(CPACK_DEBIAN_FILE_NAME "${lcproject_name}-${CMAKE_PROJECT_VERSION}.ipk")
+set(CPACK_STRIP_FILES TRUE)
+set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE armv7vehf-neon)
+if (NOT CPACK_PACKAGE_CONTACT)
+ set(CPACK_PACKAGE_CONTACT bogus@example.org)
+ message(WARNING "No package contact specified: using ${CPACK_PACKAGE_CONTACT}")
+endif()
+include(CPack)