Skip to content

Commit

Permalink
use catkin_install_python for noetic
Browse files Browse the repository at this point in the history
  • Loading branch information
k-okada committed Nov 2, 2021
1 parent bcbc8c0 commit 5d80d4a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
20 changes: 17 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,25 @@ catkin_package(
)


install(PROGRAMS bin/rosget bin/appmaster
catkin_install_python(PROGRAMS bin/rosget bin/appmaster
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
install(DIRECTORY launch scripts test
install(DIRECTORY launch test
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
USE_SOURCE_PERMISSIONS)
USE_SOURCE_PERMISSIONS
PATTERN *.py EXCLUDE)
file(GLOB_RECURSE TEST_FILES
RELATIVE "${PROJECT_SOURCE_DIR}"
"test/*.py")
foreach(TEST_FILE ${TEST_FILES})
get_filename_component(DIR ${TEST_FILE} DIRECTORY)
catkin_install_python(PROGRAMS ${TEST_FILE}
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/${DIR})
endforeach()
file(GLOB SCRIPTS_FILES
RELATIVE "${PROJECT_SOURCE_DIR}"
"${PROJECT_SOURCE_DIR}/scripts/*")
catkin_install_python(PROGRAMS ${SCRIPTS_FILES}
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/scripts)

if(CATKIN_ENABLE_TESTING)
find_package(rostest)
Expand Down
2 changes: 1 addition & 1 deletion bin/rosget
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python

import subprocess
import sys
Expand Down

0 comments on commit 5d80d4a

Please sign in to comment.