diff --git a/install/CMakeLists.txt b/install/CMakeLists.txt index 7278eb1db..98419b312 100644 --- a/install/CMakeLists.txt +++ b/install/CMakeLists.txt @@ -39,7 +39,7 @@ function(install_zenohc_lib configurations property_postfix package_name) get_target_property(staticlib_path zenohc::static IMPORTED_LOCATION_${property_postfix}) get_target_property(NATIVE_STATIC_LIBS zenohc::static INTERFACE_LINK_LIBRARIES) get_filename_component(STATICLIB ${staticlib_path} NAME) - install(FILES ${staticlib_path} DESTINATION ${CMAKE_INSTALL_LIBDIR} CONFIGURATIONS ${configurations} COMPONENT lib) + install(FILES ${staticlib_path} DESTINATION ${CMAKE_INSTALL_LIBDIR} CONFIGURATIONS ${configurations} COMPONENT dev) set(CMAKE_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/${package_name}") @@ -98,7 +98,7 @@ set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR}) set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) set(CPACK_COMPONENT_LIB_DESCRIPTION "The C client library for Eclipse zenoh") -set(CPACK_COMPONENT_DEV_DESCRIPTION "${CPACK_COMPONENT_LIB_DESCRIPTION} - cmake files") +set(CPACK_COMPONENT_DEV_DESCRIPTION "${CPACK_COMPONENT_LIB_DESCRIPTION} - zenoh-c static lib and cmake files") set(CPACK_COMPONENT_HEADERS_DESCRIPTION "${CPACK_COMPONENT_LIB_DESCRIPTION} - header files") set(CPACK_COMPONENT_LIB_GROUP "lib") set(CPACK_COMPONENT_HEADERS_GROUP "dev") @@ -107,9 +107,7 @@ set(CPACK_COMPONENT_HEADERS_DEPENDS lib) set(CPACK_COMPONENT_DEV_DEPENDS lib) set(CPACK_GENERATOR ZIP) -# set package name to format -. -# platform name doesn't matter for header-only library -set(CPACK_PACKAGE_NAME zenohc) +set(CPACK_CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR}) if(NOT CPACK_PACKAGE_VERSION) set(SEM_VER "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") @@ -122,9 +120,7 @@ if(NOT CPACK_PACKAGE_VERSION) endif() endif() -set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}") -set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}) set(CPACK_PROJECT_CONFIG_FILE "${CMAKE_CURRENT_SOURCE_DIR}/cpack_project_config.cmake") include(CPack) diff --git a/install/cpack_project_config.cmake b/install/cpack_project_config.cmake index 51c220aab..70bf7b9a1 100644 --- a/install/cpack_project_config.cmake +++ b/install/cpack_project_config.cmake @@ -1,6 +1,6 @@ +set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_CMAKE_SYSTEM_PROCESSOR}") if(CPACK_GENERATOR MATCHES "DEB") # DEB package - message(STATUS "Configure DEB packaging for Linux ${DEBARCH}") set(CPACK_DEBIAN_PACKAGE_MAINTAINER "ZettaScale Zenoh Team, ") set(CPACK_DEB_COMPONENT_INSTALL ON) set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) @@ -14,11 +14,6 @@ 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