Skip to content

Commit ab59de8

Browse files
committed
use catkni_python_setup, convert packge.xml to format3
1 parent b3582e2 commit ab59de8

File tree

2 files changed

+22
-11
lines changed

2 files changed

+22
-11
lines changed

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ if(cv_bridge_VERSION VERSION_LESS "1.11.13")
3838
add_definitions("-DCV_BRIDGE_CVT_COLOR_FOR_DISPLAY_OPTION_IS_NOT_SUPPORTED")
3939
endif()
4040

41+
catkin_python_setup()
42+
4143
# generate the dynamic_reconfigure config file
4244
generate_dynamic_reconfigure_options(
4345
cfg/DiscreteFourierTransform.cfg
@@ -412,6 +414,12 @@ install(DIRECTORY launch test scripts
412414
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
413415
USE_SOURCE_PERMISSIONS)
414416

417+
file(GLOB PROGRAM_FILES scripts/*.py)
418+
catkin_install_python(PROGRAMS
419+
${PROGRAM_FILES}
420+
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
421+
)
422+
415423
## test
416424
if(CATKIN_ENABLE_TESTING)
417425
find_package(rostest REQUIRED)

package.xml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<package>
2+
<package format="3">
33
<name>opencv_apps</name>
44
<version>2.0.2</version>
55
<description>
@@ -18,6 +18,9 @@
1818

1919
<buildtool_depend>catkin</buildtool_depend>
2020

21+
<buildtool_depend condition="$ROS_PYTHON_VERSION == 2">python-setuptools</buildtool_depend>
22+
<buildtool_depend condition="$ROS_PYTHON_VERSION == 3">python3-setuptools</buildtool_depend>
23+
2124
<build_depend>cv_bridge</build_depend>
2225
<build_depend>dynamic_reconfigure</build_depend>
2326
<build_depend>g++-static</build_depend>
@@ -29,16 +32,16 @@
2932
<build_depend>std_msgs</build_depend>
3033
<build_depend>std_srvs</build_depend>
3134

32-
<run_depend>cv_bridge</run_depend>
33-
<run_depend>dynamic_reconfigure</run_depend>
34-
<run_depend>image_transport</run_depend>
35-
<run_depend>image_view</run_depend>
36-
<run_depend>message_runtime</run_depend>
37-
<run_depend>nodelet</run_depend>
38-
<run_depend>roscpp</run_depend>
39-
<run_depend>sensor_msgs</run_depend>
40-
<run_depend>std_msgs</run_depend>
41-
<run_depend>std_srvs</run_depend>
35+
<exec_depend>cv_bridge</exec_depend>
36+
<exec_depend>dynamic_reconfigure</exec_depend>
37+
<exec_depend>image_transport</exec_depend>
38+
<exec_depend>image_view</exec_depend>
39+
<exec_depend>message_runtime</exec_depend>
40+
<exec_depend>nodelet</exec_depend>
41+
<exec_depend>roscpp</exec_depend>
42+
<exec_depend>sensor_msgs</exec_depend>
43+
<exec_depend>std_msgs</exec_depend>
44+
<exec_depend>std_srvs</exec_depend>
4245

4346
<test_depend>roslaunch</test_depend>
4447
<test_depend>rostest</test_depend>

0 commit comments

Comments
 (0)