From e766b71f1267b4053ea5d5e1588c0e61f88f0f5b Mon Sep 17 00:00:00 2001 From: Christian Rauch Date: Sun, 15 Sep 2024 05:02:50 +0200 Subject: [PATCH] generate Debian package --- CMakeLists.txt | 19 ++++++++++++++++++- cpack_config.txt | 7 +++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 cpack_config.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 0cff8c24..eb036191 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,24 @@ option(BUILD_ROSTERMINAL "build with an integrated ROS terminal") add_subdirectory(src/project_manager) # generate plugin archive -set(CPACK_GENERATOR "ZIP") +set(CPACK_GENERATOR "ZIP;DEB") +set(CPACK_PACKAGE_NAME "qtcreator-plugin-ros") set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF) set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Qt Creator plugin for ROS workspaces") +set(CPACK_PACKAGE_DESCRIPTION "The ROS Qt Creator Plug-in is developed specifically for ROS to increase a developers' efficiency by simplifying tasks and creating a centralized location for ROS tools. Since it is built on top of the Qt Creator platform, users have access to all of its existing features like: syntax highlighting, code indexing, editors (C++ , Python, etc.), code completion, version control (Git, Subversion, etc.), debuggers (GDB, CDB, LLDB, etc.), and much more.") +set(CPACK_PROJECT_CONFIG_FILE ${CMAKE_SOURCE_DIR}/cpack_config.txt) +set(CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS + OWNER_READ OWNER_WRITE OWNER_EXECUTE + GROUP_READ GROUP_EXECUTE + WORLD_READ WORLD_EXECUTE +) + +# Debian +set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Christian Rauch ") +set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS YES) +set(CPACK_DEBIAN_PACKAGE_DEPENDS "qtcreator (>=${PROJECT_VERSION_MAJOR})") +set(CPACK_DEBIAN_DEBUGINFO_PACKAGE ON) + + include(CPack) diff --git a/cpack_config.txt b/cpack_config.txt new file mode 100644 index 00000000..24362619 --- /dev/null +++ b/cpack_config.txt @@ -0,0 +1,7 @@ +if(CPACK_GENERATOR MATCHES "ZIP") + set(CPACK_STRIP_FILES YES) + set(CPACK_PACKAGING_INSTALL_PREFIX "") +elseif(CPACK_GENERATOR MATCHES "DEB") + set(CPACK_STRIP_FILES NO) + set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/qt-creator/") +endif()