Skip to content

Commit

Permalink
Fix cpack build and enable during CI pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi-Armstrong committed Jan 16, 2025
1 parent 200782b commit 1d2e8be
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unstable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ jobs:
vcs-file: dependencies_unstable.repos
upstream-args: --cmake-args -DCMAKE_BUILD_TYPE=Release
target-path: target_ws/src
target-args: --cmake-args -DCMAKE_BUILD_TYPE=Debug -DTESSERACT_ENABLE_TESTING=ON
target-args: --cmake-args -DCMAKE_BUILD_TYPE=Debug -DTESSERACT_ENABLE_TESTING=ON -DTESSERACT_PACKAGE=ON
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_command_language" "tesseract_time_parameterization" "tesseract_motion_planners" "tesseract_process_managers" "tesseract_task_composer")
declare -a StringArray=("tesseract_command_language" "tesseract_examples" "tesseract_motion_planners" "tesseract_task_composer" "tesseract_time_parameterization")

# Iterate the packages using for loop
for val in ${StringArray[@]}; do
Expand Down
41 changes: 41 additions & 0 deletions tesseract_examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,44 @@ if(TESSERACT_ENABLE_TESTING)
add_run_tests_target(ENABLE ${TESSERACT_ENABLE_RUN_TESTING})
add_subdirectory(test)
endif()

if(TESSERACT_PACKAGE)
cpack(
VERSION ${pkg_extracted_version}
MAINTAINER_NAME ${pkg_extracted_maintainer_name}
MAINTAINER_EMAIL ${pkg_extracted_maintainer_email}
DESCRIPTION ${pkg_extracted_description}
LICENSE_FILE ${CMAKE_CURRENT_LIST_DIR}/../LICENSE
README_FILE ${CMAKE_CURRENT_LIST_DIR}/../README.md
LINUX_DEPENDS
"libconsole-bridge-dev"
"libpcl-dev"
"${TESSERACT_PACKAGE_PREFIX}tesseract-common"
"${TESSERACT_PACKAGE_PREFIX}tesseract-collision"
"${TESSERACT_PACKAGE_PREFIX}tesseract-environment"
"${TESSERACT_PACKAGE_PREFIX}tesseract-command-language"
"${TESSERACT_PACKAGE_PREFIX}tesseract-motion-planners"
"${TESSERACT_PACKAGE_PREFIX}tesseract-task-composer"
"${TESSERACT_PACKAGE_PREFIX}trajopt-sqp"
"${TESSERACT_PACKAGE_PREFIX}trajopt-ifopt"
WINDOWS_DEPENDS
"console-bridge"
"pcl"
"${TESSERACT_PACKAGE_PREFIX}tesseract-common"
"${TESSERACT_PACKAGE_PREFIX}tesseract-collision"
"${TESSERACT_PACKAGE_PREFIX}tesseract-environment"
"${TESSERACT_PACKAGE_PREFIX}tesseract-command-language"
"${TESSERACT_PACKAGE_PREFIX}tesseract-motion-planners"
"${TESSERACT_PACKAGE_PREFIX}tesseract-task-composer"
"${TESSERACT_PACKAGE_PREFIX}trajopt-sqp"
"${TESSERACT_PACKAGE_PREFIX}trajopt-ifopt")

if(UNIX AND TESSERACT_PACKAGE_SOURCE)
cpack_debian_source_package(
CHANGLELOG ${CMAKE_CURRENT_LIST_DIR}/CHANGELOG.rst
UPLOAD ${TESSERACT_PACKAGE_SOURCE_UPLOAD}
DPUT_HOST ${TESSERACT_PACKAGE_SOURCE_DPUT_HOST}
DEBIAN_INCREMENT ${TESSERACT_PACKAGE_SOURCE_DEBIAN_INCREMENT}
DISTRIBUTIONS ${TESSERACT_PACKAGE_SOURCE_DISTRIBUTIONS})
endif()
endif()
2 changes: 2 additions & 0 deletions tesseract_task_composer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE TESSERACT_TASK_COMPOSER_PLUGI

# Examples
if(TESSERACT_ENABLE_EXAMPLES)
message("Build task composer examples components")
list(APPEND SUPPORTED_COMPONENTS examples)
add_subdirectory(examples)
endif()

Expand Down
31 changes: 26 additions & 5 deletions tesseract_task_composer/examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,30 @@ target_cxx_version(${PROJECT_NAME}_raster_example PRIVATE VERSION ${TESSERACT_CX
target_include_directories(${PROJECT_NAME}_raster_example PRIVATE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>")
list(APPEND Examples ${PROJECT_NAME}_raster_example)

install(
# Configure Components
configure_component(
COMPONENT examples
NAMESPACE tesseract
TARGETS ${Examples}
EXPORT ${PROJECT_NAME}-targets
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
DEPENDENCIES
console_bridge
tesseract_environment
tesseract_command_language
tesseract_visualization)

if(TESSERACT_PACKAGE)
cpack_component(
COMPONENT examples
VERSION ${pkg_extracted_version}
DESCRIPTION "Tesseract task composer examples components"
LINUX_DEPENDS
"libconsole-bridge-dev"
"${TESSERACT_PACKAGE_PREFIX}tesseract-environment"
"${TESSERACT_PACKAGE_PREFIX}tesseract-command-language"
"${TESSERACT_PACKAGE_PREFIX}tesseract-visualization"
WINDOWS_DEPENDS
"console-bridge"
"${TESSERACT_PACKAGE_PREFIX}tesseract-environment"
"${TESSERACT_PACKAGE_PREFIX}tesseract-command-language"
"${TESSERACT_PACKAGE_PREFIX}tesseract-visualization")
endif()

0 comments on commit 1d2e8be

Please sign in to comment.