summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorManuel Bentele2020-09-09 17:32:57 +0200
committerManuel Bentele2020-09-16 07:37:56 +0200
commit55d94d412d4269d93e9c71a2ce59d1b9631b8957 (patch)
tree27ef4827a02635d2c9dd84b2949079b424a3a90d /CMakeLists.txt
parentAdded CMake files to build xloop kernel modules and xlosetup utility (diff)
downloadxloop-55d94d412d4269d93e9c71a2ce59d1b9631b8957.tar.gz
xloop-55d94d412d4269d93e9c71a2ce59d1b9631b8957.tar.xz
xloop-55d94d412d4269d93e9c71a2ce59d1b9631b8957.zip
Renamed files from loop to xloop and generate package only in Release mode
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt42
1 files changed, 22 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3a9f07a..ba17bf4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,26 +8,28 @@ if(NOT CMAKE_BUILD_TYPE)
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)
+if(NOT CMAKE_BUILD_TYPE MATCHES Debug)
+ 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)
+endif()
# add subprojects
add_subdirectory(kernel)