Skip to content

Commit

Permalink
CPack Update (#693)
Browse files Browse the repository at this point in the history
  • Loading branch information
marip8 authored Jan 18, 2022
1 parent ab607da commit 414749e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .run-cpack
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ echo " artifact_dir: $artifact_dir"
echo " artifact_ext: $artifact_ext"
echo " build_dir: $build_dir"

declare -a StringArray=("tesseract_collision" "tesseract_common" "tesseract_environment" "tesseract_geometry" "tesseract_kinematics" "tesseract_scene_graph" "tesseract_support" "tesseract_urdf" "tesseract_visualization")
declare -a StringArray=("tesseract_collision" "tesseract_common" "tesseract_environment" "tesseract_geometry" "tesseract_kinematics" "tesseract_scene_graph" "tesseract_support" "tesseract_urdf" "tesseract_visualization" "tesseract_state_solver")

# Iterate the packages using for loop
for val in ${StringArray[@]}; do
Expand Down
24 changes: 19 additions & 5 deletions tesseract_common/cmake/tesseract_macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -151,22 +151,36 @@ macro(tesseract_cpack)
TESSERACT_PACKAGE_NAME
${PROJECT_NAME})
set(CPACK_GENERATOR "DEB;TXZ")
set(CPACK_PACKAGE_FILE_NAME
"${TESSERACT_PACKAGE_PREFIX}${TESSERACT_PACKAGE_NAME}_${CMAKE_SYSTEM_PROCESSOR}_linux_${ARG_VERSION}")

if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
set(DEB_ARCH "amd64")
else()
set(DEB_ARCH ${CMAKE_SYSTEM_PROCESSOR})
endif()

set(CPACK_PACKAGE_FILE_NAME "${TESSERACT_PACKAGE_PREFIX}${TESSERACT_PACKAGE_NAME}_${DEB_ARCH}_linux_${ARG_VERSION}")
set(CPACK_DEBIAN_PACKAGE_NAME "${TESSERACT_PACKAGE_PREFIX}${TESSERACT_PACKAGE_NAME}")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${DEB_ARCH})
set(CPACK_DEBIAN_PACKAGE_MAINTAINER ${ARG_MAINTAINER})
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${ARG_DESCRIPTION})
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS=ON)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "${ARG_LINUX_DEPENDS}")
string(
REPLACE ";"
","
CPACK_DEBIAN_PACKAGE_DEPENDS
"${ARG_LINUX_DEPENDS}")
elseif(WIN32)
set(CPACK_GENERATOR "NuGet;TXZ")
set(CPACK_PACKAGE_FILE_NAME
"${TESSERACT_PACKAGE_PREFIX}${TESSERACT_PACKAGE_NAME}_${CMAKE_SYSTEM_PROCESSOR}_windows_${ARG_VERSION}")
set(CPACK_NUGET_PACKAGE_NAME
"${TESSERACT_PACKAGE_PREFIX}${TESSERACT_PACKAGE_NAME}_${CMAKE_SYSTEM_PROCESSOR}_windows")
set(CPACK_NUGET_PACKAGE_DESCRIPTION ${ARG_DESCRIPTION})
set(CPACK_NUGET_PACKAGE_DEPENDENCIES "${ARG_WINDOWS_DEPENDS}")
string(
REPLACE ";"
","
CPACK_NUGET_PACKAGE_DEPENDENCIES
"${ARG_WINDOWS_DEPENDS}")
endif()
include(CPack)
endmacro()

0 comments on commit 414749e

Please sign in to comment.