Skip to content

Commit

Permalink
generate Debian package
Browse files Browse the repository at this point in the history
  • Loading branch information
christianrauch committed Sep 15, 2024
1 parent 31f2abb commit e766b71
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
19 changes: 18 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS YES)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "qtcreator (>=${PROJECT_VERSION_MAJOR})")
set(CPACK_DEBIAN_DEBUGINFO_PACKAGE ON)


include(CPack)
7 changes: 7 additions & 0 deletions cpack_config.txt
Original file line number Diff line number Diff line change
@@ -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()

0 comments on commit e766b71

Please sign in to comment.