Skip to content

Commit

Permalink
Use CMAKE_STAGING_PREFIX for staging OGRE installation (#861)
Browse files Browse the repository at this point in the history
To maintain build/install phasing correctly, this vendor package is
installing the external project to a staging location, which is then
recursively copied to the final location during the vendor package's
installation phase.

The mechanism by which we're currently telling the external project
where to install to gives it the impression that that will be the final
destination, and it embeds such paths in places like pkgconfig files.

The CMAKE_STAGING_PREFIX can be used to override all of the `install()`
operations' targets while still telling the project where it will
eventually end up, which is pretty much exactly what we're trying to do.

Signed-off-by: Scott K Logan <logans@cottsay.net>
  • Loading branch information
cottsay committed Jun 10, 2022
1 parent 3584a29 commit 47e91ee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rviz_ogre_vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ macro(build_ogre)
-DOGRE_CONFIG_THREADS:STRING=0
-DOGRE_RESOURCEMANAGER_STRICT:STRING=2
-DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON
-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/ogre_install
-DCMAKE_STAGING_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/ogre_install
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}/opt/rviz_ogre_vendor
-DOGRE_BUILD_LIBS_AS_FRAMEWORKS:BOOL=OFF
-DOGRE_BUILD_COMPONENT_PYTHON:BOOL=FALSE
-DOGRE_BUILD_COMPONENT_JAVA:BOOL=FALSE
Expand All @@ -201,7 +202,7 @@ macro(build_ogre)
DIRECTORY
${CMAKE_CURRENT_BINARY_DIR}/ogre_install/
DESTINATION
${CMAKE_INSTALL_PREFIX}/opt/rviz_ogre_vendor
opt/rviz_ogre_vendor
USE_SOURCE_PERMISSIONS
)
endmacro()
Expand Down

0 comments on commit 47e91ee

Please sign in to comment.