Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use relative install paths for plugin shared libraries and media files #984

Merged
merged 2 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ if (DOXYGEN_FOUND)
COMMENT "Generating API documentation with Doxygen" VERBATIM)

install(FILES ${CMAKE_BINARY_DIR}/doc/${PROJECT_NAME_LOWER}.tag.xml
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/gz/${PROJECT_NAME_LOWER}_${PROJECT_VERSION_MINOR})
DESTINATION share/gz/${PROJECT_NAME_LOWER}_${PROJECT_VERSION_MINOR})
endif()
4 changes: 2 additions & 2 deletions ogre/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ gz_build_tests(TYPE UNIT
ENVIRONMENT GZ_RENDERING_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX})

# Note that plugins are currently being installed in 2 places: /lib and the engine-plugins dir
install(TARGETS ${ogre_target} DESTINATION ${GZ_RENDERING_ENGINE_INSTALL_DIR})
install(TARGETS ${ogre_target} DESTINATION ${GZ_RENDERING_ENGINE_RELATIVE_INSTALL_DIR})

if(WIN32)
# tests needs .dll in the same directory
Expand All @@ -66,7 +66,7 @@ if (WIN32)
${GZ_RENDERING_ENGINE_INSTALL_DIR}\/${unversioned})")
else()
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink ${versioned} ${unversioned})
INSTALL(FILES ${PROJECT_BINARY_DIR}/${unversioned} DESTINATION ${GZ_RENDERING_ENGINE_INSTALL_DIR})
INSTALL(FILES ${PROJECT_BINARY_DIR}/${unversioned} DESTINATION ${GZ_RENDERING_ENGINE_RELATIVE_INSTALL_DIR})
endif()

add_subdirectory(media)
4 changes: 2 additions & 2 deletions ogre/src/media/fonts/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
file(GLOB files "*ttf" "*png" "*fontdef")

install(FILES ${files} DESTINATION ${GZ_RENDERING_RESOURCE_PATH}/ogre/media/fonts)
install(DIRECTORY liberation-sans DESTINATION ${GZ_RENDERING_RESOURCE_PATH}/ogre/media/fonts)
install(FILES ${files} DESTINATION ${GZ_RENDERING_RELATIVE_RESOURCE_PATH}/ogre/media/fonts)
install(DIRECTORY liberation-sans DESTINATION ${GZ_RENDERING_RELATIVE_RESOURCE_PATH}/ogre/media/fonts)
2 changes: 1 addition & 1 deletion ogre/src/media/materials/programs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
file(GLOB files "*.glsl")

install(FILES ${files} DESTINATION ${GZ_RENDERING_RESOURCE_PATH}/ogre/media/materials/programs)
install(FILES ${files} DESTINATION ${GZ_RENDERING_RELATIVE_RESOURCE_PATH}/ogre/media/materials/programs)

2 changes: 1 addition & 1 deletion ogre/src/media/materials/scripts/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
file(GLOB files "*.material" "*.compositor")

install(FILES ${files} DESTINATION ${GZ_RENDERING_RESOURCE_PATH}/ogre/media/materials/scripts)
install(FILES ${files} DESTINATION ${GZ_RENDERING_RELATIVE_RESOURCE_PATH}/ogre/media/materials/scripts)

2 changes: 1 addition & 1 deletion ogre/src/media/materials/textures/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
file(GLOB files "*.png")

install(FILES ${files} DESTINATION ${GZ_RENDERING_RESOURCE_PATH}/ogre/media/materials/textures)
install(FILES ${files} DESTINATION ${GZ_RENDERING_RELATIVE_RESOURCE_PATH}/ogre/media/materials/textures)
2 changes: 1 addition & 1 deletion ogre/src/media/rtshaderlib150/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ SGXLib_NormalMapLighting.glsl
SGXLib_PerPixelLighting.glsl
)

install(FILES ${files} DESTINATION ${GZ_RENDERING_RESOURCE_PATH}/ogre/media/rtshaderlib150)
install(FILES ${files} DESTINATION ${GZ_RENDERING_RELATIVE_RESOURCE_PATH}/ogre/media/rtshaderlib150)

6 changes: 3 additions & 3 deletions ogre2/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ set (versioned ${CMAKE_SHARED_LIBRARY_PREFIX}${PROJECT_NAME_LOWER}-${engine_name
set (unversioned ${CMAKE_SHARED_LIBRARY_PREFIX}${PROJECT_NAME_NO_VERSION_LOWER}-${engine_name}${CMAKE_SHARED_LIBRARY_SUFFIX})

# Note that plugins are currently being installed in 2 places: /lib and the engine-plugins dir
install(TARGETS ${ogre2_target} DESTINATION ${GZ_RENDERING_ENGINE_INSTALL_DIR})
install(TARGETS ${ogre2_target} DESTINATION ${GZ_RENDERING_ENGINE_RELATIVE_INSTALL_DIR})

if (WIN32)
# disable MSVC inherit via dominance warning
Expand All @@ -82,7 +82,7 @@ if (WIN32)
${GZ_RENDERING_ENGINE_INSTALL_DIR}\/${unversioned})")
else()
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink ${versioned} ${unversioned})
INSTALL(FILES ${PROJECT_BINARY_DIR}/${unversioned} DESTINATION ${GZ_RENDERING_ENGINE_INSTALL_DIR})
INSTALL(FILES ${PROJECT_BINARY_DIR}/${unversioned} DESTINATION ${GZ_RENDERING_ENGINE_RELATIVE_INSTALL_DIR})
endif()

if (NOT (APPLE OR WIN32))
Expand All @@ -100,4 +100,4 @@ gz_build_tests(TYPE UNIT
LIB_DEPS ${ogre2_target}
ENVIRONMENT GZ_RENDERING_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX})

install(DIRECTORY "media" DESTINATION ${GZ_RENDERING_RESOURCE_PATH}/ogre2)
install(DIRECTORY "media" DESTINATION ${GZ_RENDERING_RELATIVE_RESOURCE_PATH}/ogre2)
4 changes: 2 additions & 2 deletions optix/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ gz_build_tests(TYPE UNIT
ENVIRONMENT GZ_RENDERING_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX})

# Note that plugins are currently being installed in 2 places: /lib and the engine-plugins dir
install(TARGETS ${optix_target} DESTINATION ${GZ_RENDERING_ENGINE_INSTALL_DIR})
install(TARGETS ${optix_target} DESTINATION ${GZ_RENDERING_ENGINE_RELATIVE_INSTALL_DIR})

set (versioned ${CMAKE_SHARED_LIBRARY_PREFIX}${PROJECT_NAME_LOWER}-${engine_name}${CMAKE_SHARED_LIBRARY_SUFFIX})
set (unversioned ${CMAKE_SHARED_LIBRARY_PREFIX}${PROJECT_NAME_NO_VERSION_LOWER}-${engine_name}${CMAKE_SHARED_LIBRARY_SUFFIX})
Expand All @@ -59,7 +59,7 @@ if (WIN32)
${GZ_RENDERING_ENGINE_INSTALL_DIR}\/${unversioned})")
else()
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink ${versioned} ${unversioned})
INSTALL(FILES ${PROJECT_BINARY_DIR}/${unversioned} DESTINATION ${GZ_RENDERING_ENGINE_INSTALL_DIR})
INSTALL(FILES ${PROJECT_BINARY_DIR}/${unversioned} DESTINATION ${GZ_RENDERING_ENGINE_RELATIVE_INSTALL_DIR})
endif()

if("${CUDA_VERSION}" VERSION_LESS "9")
Expand Down
2 changes: 1 addition & 1 deletion src/base/media/materials/textures/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
file(GLOB files "*.png")

install(FILES ${files} DESTINATION ${GZ_RENDERING_RESOURCE_PATH}/media/materials/textures)
install(FILES ${files} DESTINATION ${GZ_RENDERING_RELATIVE_RESOURCE_PATH}/media/materials/textures)