Skip to content

Commit

Permalink
Always preserve source permissions in vendor packages (#647)
Browse files Browse the repository at this point in the history
In vendor packages where we're installing an executable, we use
USE_SOURCE_PERMISSIONS to make sure that the executable permissions on
the binaries are maintained when the external project's staging
directory is recursively installed to the final installation directory.

In most of our vendor packages, we aren't using that flag where we don't
expect an executable binary to be installed. However, for reasons I
won't go into here, some systems use executable permissions on shared
object libraries as well. The linker seems to handle this on our behalf,
but we're losing the permissions during the recursive copy operation if
we don't use this flag.

Signed-off-by: Scott K Logan <logans@cottsay.net>
  • Loading branch information
cottsay authored Feb 12, 2021
1 parent a490495 commit a17fee9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions rviz_assimp_vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ macro(build_assimp)
${CMAKE_CURRENT_BINARY_DIR}/assimp_install/
DESTINATION
${CMAKE_INSTALL_PREFIX}/opt/rviz_assimp_vendor
USE_SOURCE_PERMISSIONS
)
endmacro()

Expand Down
3 changes: 3 additions & 0 deletions rviz_ogre_vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ macro(build_freetype)
${CMAKE_CURRENT_BINARY_DIR}/freetype_install/
DESTINATION
${CMAKE_INSTALL_PREFIX}/opt/rviz_ogre_vendor
USE_SOURCE_PERMISSIONS
)
endmacro()

Expand Down Expand Up @@ -97,6 +98,7 @@ macro(build_zlib)
${CMAKE_CURRENT_BINARY_DIR}/zlib-install/
DESTINATION
${CMAKE_INSTALL_PREFIX}/opt/rviz_ogre_vendor
USE_SOURCE_PERMISSIONS
)
endmacro()

Expand Down Expand Up @@ -198,6 +200,7 @@ macro(build_ogre)
${CMAKE_CURRENT_BINARY_DIR}/ogre_install/
DESTINATION
${CMAKE_INSTALL_PREFIX}/opt/rviz_ogre_vendor
USE_SOURCE_PERMISSIONS
)
endmacro()

Expand Down

0 comments on commit a17fee9

Please sign in to comment.