Skip to content

Commit 28c9e72

Browse files
Levi ArmstrongLevi-Armstrong
authored andcommitted
Extract package name and version from package.xml
1 parent bcafca8 commit 28c9e72

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

tesseract_python/CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
cmake_minimum_required(VERSION 3.5.0)
2-
project(tesseract_python)
2+
3+
# Extract package name and version
4+
find_package(cmake_common_scripts REQUIRED)
5+
extract_package_metadata(pkg)
6+
project(${pkg_extracted_name} VERSION ${pkg_extracted_version})
37

48
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
59

@@ -19,7 +23,6 @@ else()
1923
add_compile_options(/bigobj)
2024
endif()
2125

22-
find_package(cmake_common_scripts REQUIRED)
2326
find_package(tesseract_motion_planners REQUIRED)
2427
find_package(tesseract_common REQUIRED)
2528
find_package(tesseract_geometry REQUIRED)

tesseract_python/package.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
<maintainer email="wason@wasontech.com">John Wason</maintainer>
77
<license>Apache 2.0</license>
88
<author >John Wason</author>
9-
9+
10+
<build_depend>cmake_common_scripts</build_depend>
1011
<depend>trajopt</depend>
1112
<depend>tesseract_motion_planners</depend>
1213
<depend>tesseract_common</depend>

tesseract_viewer_python/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
cmake_minimum_required(VERSION 3.5.0)
2-
project(tesseract_python_viewer)
2+
3+
# Extract package name and version
4+
find_package(cmake_common_scripts REQUIRED)
5+
extract_package_metadata(pkg)
6+
project(${pkg_extracted_name} VERSION ${pkg_extracted_version})
37

48
if(NOT PYTHON_VERSION)
59
set(PYTHON_VERSION $ENV{ROS_PYTHON_VERSION})

tesseract_viewer_python/package.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<license>Apache 2.0</license>
88
<author >John Wason</author>
99

10+
<build_depend>cmake_common_scripts</build_depend>
1011
<depend>trajopt</depend>
1112
<depend>tesseract_collision</depend>
1213
<depend>tesseract_motion_planners</depend>

0 commit comments

Comments
 (0)