Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to leverage cmake components #373

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 70 additions & 6 deletions .cmake-format
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,22 @@ with section("parse"):
'configure_package': {
'pargs': {'nargs': 0},
'kwargs': {
'COMPONENT': '?',
'NAMESPACE': '?',
'TARGETS': '*',
'SUPPORTED_COMPONENTS': '*',
'DEPENDENCIES': '*',
'CFG_EXTRAS': '*',
}
},
'configure_component': {
'pargs': {'nargs': 0},
'kwargs': {
'COMPONENT': '?',
'NAMESPACE': '?',
'TARGETS': '*',
'DEPENDENCIES': '*',
'CFG_EXTRAS': '*',
}
},
'add_gtest_discover_tests': {
Expand Down Expand Up @@ -98,16 +112,66 @@ with section("parse"):
'EXCLUDE': '*',
}
},
'tesseract_cpack': {
'install_targets': {
'pargs': {'nargs': 0},
'kwargs': {
'VERSION': 1,
'MAINTAINER': 1,
'DESCRIPTION': 1,
'LICENSE_FILE': 1,
'README_FILE': 1,
'TARGETS': '*',
'COMPONENT': '?',
}
},
'cpack': {
'pargs': {'nargs': 0},
'kwargs': {
'VERSION': '?',
'MAINTAINER_NAME': '?',
'MAINTAINER_EMAIL': '?',
'VENDOR': '?',
'DESCRIPTION': '?',
'LICENSE_FILE': '?',
'README_FILE': '?',
'PACKAGE_PREFIX': '?',
'LINUX_BUILD_DEPENDS': '*',
'WINDOWS_BUILD_DEPENDS': '*',
'LINUX_DEPENDS': '*',
'WINDOWS_DEPENDS': '*',
}
},
'cpack_component_package': {
'pargs': {'nargs': 0},
'kwargs': {
'VERSION': '?',
'MAINTAINER_NAME': '?',
'MAINTAINER_EMAIL': '?',
'VENDOR': '?',
'DESCRIPTION': '?',
'LICENSE_FILE': '?',
'README_FILE': '?',
'PACKAGE_PREFIX': '?',
'COMPONENT_DEPENDS': '*',
}
},
'cpack_component': {
'pargs': {'nargs': 0},
'kwargs': {
'COMPONENT': '?',
'VERSION': '?',
'DESCRIPTION': '?',
'PACKAGE_PREFIX': '?',
'LINUX_BUILD_DEPENDS': '*',
'WINDOWS_BUILD_DEPENDS': '*',
'LINUX_DEPENDS': '*',
'WINDOWS_DEPENDS': '*',
'COMPONENT_DEPENDS': '*',
}
},
'cpack_debian_source_package': {
'pargs': {'nargs': 0},
'kwargs': {
'CHANGLELOG': '?',
'UPLOAD': '?',
'DPUT_HOST': '?',
'DEBIAN_INCREMENT': '?',
'DISTRIBUTIONS': '*',
}
},
}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
PUSH_DOCKER_IMAGE: ${{ github.ref == 'refs/heads/master' || github.event_name == 'release' }}
TESSERACT_VERSION: 0.18
TESSERACT_VERSION: 0.19
steps:
- name: Checkout repository
uses: actions/checkout@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/windows_dependencies.repos
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- git:
local-name: ros_industrial_cmake_boilerplate
uri: https://github.com/ros-industrial/ros_industrial_cmake_boilerplate.git
version: 0.4.7
version: 0.5.3
- git:
local-name: tesseract
uri: https://github.com/ros-industrial-consortium/tesseract.git
Expand All @@ -13,7 +13,7 @@
- git:
local-name: descartes_light
uri: https://github.com/swri-robotics/descartes_light.git
version: 0.3.1
version: 0.4.2
- git:
local-name: opw_kinematics
uri: https://github.com/Jmeyer1292/opw_kinematics.git
Expand Down
4 changes: 2 additions & 2 deletions dependencies.repos
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
- git:
local-name: ros_industrial_cmake_boilerplate
uri: https://github.com/ros-industrial/ros_industrial_cmake_boilerplate.git
version: 0.4.7
version: 0.5.3
- git:
local-name: trajopt
uri: https://github.com/tesseract-robotics/trajopt.git
version: 0.6.0
- git:
local-name: descartes_light
uri: https://github.com/swri-robotics/descartes_light.git
version: 0.3.1
version: 0.4.2
- git:
local-name: ifopt
uri: https://github.com/ethz-adrl/ifopt.git
Expand Down
33 changes: 26 additions & 7 deletions tesseract_command_language/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5.0)
cmake_minimum_required(VERSION 3.15.0)

# Extract package name and version
find_package(ros_industrial_cmake_boilerplate REQUIRED)
Expand Down Expand Up @@ -27,6 +27,9 @@ else()
endif()
endif()

# Load variable for clang tidy args, compiler options and cxx version
tesseract_variables()

initialize_code_coverage()
set(COVERAGE_EXCLUDE
/usr/*
Expand All @@ -35,9 +38,6 @@ set(COVERAGE_EXCLUDE
/*/gtest/*)
add_code_coverage_all_targets(EXCLUDE ${COVERAGE_EXCLUDE})

# Load variable for clang tidy args, compiler options and cxx version
tesseract_variables()

add_library(
${PROJECT_NAME}
src/poly/cartesian_waypoint_poly.cpp
Expand Down Expand Up @@ -79,7 +79,16 @@ target_code_coverage(
target_include_directories(${PROJECT_NAME} PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include>")

configure_package(NAMESPACE tesseract TARGETS ${PROJECT_NAME})
# Configure Package
configure_package(
NAMESPACE tesseract
TARGETS ${PROJECT_NAME}
DEPENDENCIES
console_bridge
tesseract_common
Eigen3
"Boost COMPONENTS serialization"
CFG_EXTRAS cmake/tesseract_command_language-extras.cmake)

# Mark header files for installation
install(
Expand All @@ -96,9 +105,10 @@ if(TESSERACT_ENABLE_TESTING)
endif()

if(TESSERACT_PACKAGE)
tesseract_cpack(
cpack(
VERSION ${pkg_extracted_version}
MAINTAINER <https://github.com/ros-industrial-consortium/tesseract>
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
Expand All @@ -112,4 +122,13 @@ if(TESSERACT_PACKAGE)
"Eigen3"
"boost-serialization"
"${TESSERACT_PACKAGE_PREFIX}tesseract-common")

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()

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
if(NOT TARGET console_bridge::console_bridge)
add_library(console_bridge::console_bridge INTERFACE IMPORTED)
set_target_properties(console_bridge::console_bridge PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
${console_bridge_INCLUDE_DIRS})
set_target_properties(console_bridge::console_bridge PROPERTIES INTERFACE_LINK_LIBRARIES ${console_bridge_LIBRARIES})
else()
get_target_property(CHECK_INCLUDE_DIRECTORIES console_bridge::console_bridge INTERFACE_INCLUDE_DIRECTORIES)
if(NOT ${CHECK_INCLUDE_DIRECTORIES})
set_target_properties(console_bridge::console_bridge PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
${console_bridge_INCLUDE_DIRS})
endif()
endif()
35 changes: 21 additions & 14 deletions tesseract_examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5.0)
cmake_minimum_required(VERSION 3.15.0)

# Extract package name and version
find_package(ros_industrial_cmake_boilerplate REQUIRED)
Expand All @@ -7,13 +7,20 @@ project(${pkg_extracted_name} VERSION ${pkg_extracted_version} LANGUAGES CXX)

find_package(tesseract_environment REQUIRED)
find_package(tesseract_command_language REQUIRED)
find_package(tesseract_motion_planners REQUIRED)
find_package(tesseract_task_composer REQUIRED)
find_package(tesseract_collision REQUIRED)
find_package(tesseract_common REQUIRED)
find_package(tesseract_support REQUIRED)
find_package(trajopt_sqp REQUIRED)
find_package(trajopt_ifopt REQUIRED)
find_package(
tesseract_motion_planners REQUIRED
COMPONENTS core simple
OPTIONAL_COMPONENTS
descartes
ompl
trajopt
trajopt_ifopt)
find_package(tesseract_collision REQUIRED COMPONENTS core)
find_package(
PCL REQUIRED
COMPONENTS core
Expand Down Expand Up @@ -141,17 +148,17 @@ configure_package(
${PROJECT_NAME}_puzzle_piece_auxillary_axes_example
${PROJECT_NAME}_puzzle_piece_example
${PROJECT_NAME}_scene_graph_example
DEPENDENCIES
tesseract_environment
tesseract_command_language
tesseract_motion_planners
tesseract_task_composer
tesseract_collision
tesseract_common
tesseract_support
trajopt_sqp
trajopt_ifopt
"PCL REQUIRED COMPONENTS core features filters io segmentation surface")
DEPENDENCIES
tesseract_environment
tesseract_command_language
tesseract_motion_planners
tesseract_task_composer
tesseract_collision
tesseract_common
tesseract_support
trajopt_sqp
trajopt_ifopt
"PCL REQUIRED COMPONENTS core features filters io segmentation surface")

if(TESSERACT_ENABLE_TESTING)
enable_testing()
Expand Down
Loading