summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorManuel Bentele2020-09-09 16:53:48 +0200
committerManuel Bentele2020-09-16 07:37:56 +0200
commit87c9cd859ca10ccbe109e09fe01a03b08932a887 (patch)
tree31bdd21158857dcecbf91d85b1e5ade62033d8f2 /CMakeLists.txt
parentAdded patched losetup utility to configure xloop devices (diff)
downloadxloop-87c9cd859ca10ccbe109e09fe01a03b08932a887.tar.gz
xloop-87c9cd859ca10ccbe109e09fe01a03b08932a887.tar.xz
xloop-87c9cd859ca10ccbe109e09fe01a03b08932a887.zip
Added CMake files to build xloop kernel modules and xlosetup utility
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt26
1 files changed, 26 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b136eca..3a9f07a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,6 +3,32 @@ cmake_minimum_required(VERSION 3.10)
# set the project name
project(xloop)
+if(NOT CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE "Debug")
+endif()
+
+# define packaging
+set(CPACK_GENERATOR "DEB")
+set(CPACK_SOURCE_GENERATOR "TGZ")
+set(CPACK_IGNORE_FILES "*.gitignore")
+set(CPACK_PACKAGE_NAME "xloop")
+set(CPACK_PACKAGE_DESCRIPTION "xloop Kernel modules and utility")
+set(CPACK_PACKAGE_VERSION_MAJOR 0)
+set(CPACK_PACKAGE_VERSION_MINOR 1)
+set(CPACK_PACKAGE_SECTION admin)
+set(CPACK_PACKAGE_VENDOR "University of Freiburg")
+set(CPACK_PACKAGE_CONTACT "Christian Rößler <christian.roessler@rz.uni-freiburg.de>")
+set(CPACK_PACKAGE_HOMEPAGE_URL "https://git.openslx.org/openslx-ng/xloop.git/")
+set(CPACK_PACKAGE_CHECKSUM SHA256)
+set(CPACK_STRIP_FILES TRUE)
+set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
+set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6")
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/package/deb/postinst "depmod -a\n")
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/package/deb/postrm "depmod -a\n")
+set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA ${CMAKE_CURRENT_BINARY_DIR}/package/deb/postinst
+ ${CMAKE_CURRENT_BINARY_DIR}/package/deb/postrm)
+include(CPack)
+
# add subprojects
add_subdirectory(kernel)
add_subdirectory(utils)