forked from eclipse-zenoh/zenoh-c
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cbe5783
commit 7292f65
Showing
2 changed files
with
69 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
if(CPACK_GENERATOR MATCHES "DEB") | ||
# DEB package | ||
if(NOT DEBARCH) | ||
execute_process( | ||
COMMAND dpkg --print-architecture | ||
OUTPUT_VARIABLE DEBARCH | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
) | ||
endif() | ||
message(STATUS "Configure DEB packaging for Linux ${DEBARCH}") | ||
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "ZettaScale Zenoh Team, <[email protected]>") | ||
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${DEBARCH}) | ||
set(CPACK_DEB_COMPONENT_INSTALL ON) | ||
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) | ||
set(CPACK_DEBIAN_LIB_PACKAGE_NAME ${CPACK_PACKAGE_NAME}) # avoid "-lib" suffix for "lib" package | ||
set(CPACK_DEBIAN_LIB_PACKAGE_DEPENDS "libc6 (>=2.12)") | ||
set(CPACK_DEBIAN_DEV_PACKAGE_DEPENDS "${CPACK_DEBIAN_LIB_PACKAGE_NAME} (=${CPACK_PACKAGE_VERSION})") | ||
endif() | ||
|
||
if(CPACK_GENERATOR MATCHES "RPM") | ||
# RPM package | ||
# rpmbuild should be installed | ||
# apt install rpm | ||
if(NOT RPMARCH) | ||
set(RPMARCH ${CMAKE_SYSTEM_PROCESSOR}) | ||
endif() | ||
message(STATUS "Configure RPM packaging for Linux ${RPMARCH}") | ||
set(CPACK_RPM_PACKAGE_ARCHITECTURE ${RPMARCH}) | ||
set(CPACK_RPM_COMPONENT_INSTALL ON) | ||
set(CPACK_RPM_FILE_NAME RPM-DEFAULT) | ||
set(CPACK_RPM_LIB_PACKAGE_NAME ${CPACK_PACKAGE_NAME}) # avoid "-lib" suffix for "lib" package | ||
set(CPACK_RPM_DEV_PACKAGE_REQUIRES "${CPACK_RPM_LIB_PACKAGE_NAME} = ${CPACK_PACKAGE_VERSION}") | ||
endif() |