|
| 1 | +diff --git a/CMakeLists.txt b/CMakeLists.txt |
| 2 | +index f4d8fd4aa..286b80366 100644 |
| 3 | +--- a/CMakeLists.txt |
| 4 | ++++ b/CMakeLists.txt |
| 5 | +@@ -404,6 +404,8 @@ if (MSVC OR CMAKE_GENERATOR MATCHES Xcode) |
| 6 | + option(OGRE_PROJECT_FOLDERS "Organize project into project folders." TRUE) |
| 7 | + endif () |
| 8 | + |
| 9 | ++option(OGRE_MANGLE_NAME_OF_LIBRARIES_USED_BY_RVIZ "If enabled, append a unique name to OgreMain, OgreOverlay and OgreGLSupport." FALSE) |
| 10 | ++ |
| 11 | + # hide advanced options |
| 12 | + mark_as_advanced( |
| 13 | + OGRE_BUILD_RTSHADERSYSTEM_CORE_SHADERS |
| 14 | +diff --git a/Components/Overlay/CMakeLists.txt b/Components/Overlay/CMakeLists.txt |
| 15 | +index 64a2a4ed7..014e1a8a7 100644 |
| 16 | +--- a/Components/Overlay/CMakeLists.txt |
| 17 | ++++ b/Components/Overlay/CMakeLists.txt |
| 18 | +@@ -71,6 +71,10 @@ if(OGRE_BUILD_COMPONENT_OVERLAY_IMGUI) |
| 19 | + ${IMGUI_DIR}/imconfig.h) |
| 20 | + endif() |
| 21 | + |
| 22 | ++if(OGRE_MANGLE_NAME_OF_LIBRARIES_USED_BY_RVIZ) |
| 23 | ++ set_target_properties(OgreOverlay PROPERTIES OUTPUT_NAME OgreOverlay_rviz) |
| 24 | ++endif() |
| 25 | ++ |
| 26 | + generate_export_header(OgreOverlay |
| 27 | + EXPORT_MACRO_NAME _OgreOverlayExport |
| 28 | + EXPORT_FILE_NAME ${PROJECT_BINARY_DIR}/include/OgreOverlayPrerequisites.h) |
| 29 | +diff --git a/OgreMain/CMakeLists.txt b/OgreMain/CMakeLists.txt |
| 30 | +index 918f102ed..631a0225a 100644 |
| 31 | +--- a/OgreMain/CMakeLists.txt |
| 32 | ++++ b/OgreMain/CMakeLists.txt |
| 33 | +@@ -248,6 +248,11 @@ if (APPLE) |
| 34 | + set_target_properties(OgreMain PROPERTIES OUTPUT_NAME Ogre) |
| 35 | + endif() |
| 36 | + endif () |
| 37 | ++ |
| 38 | ++if(OGRE_MANGLE_NAME_OF_LIBRARIES_USED_BY_RVIZ) |
| 39 | ++ set_target_properties(OgreMain PROPERTIES OUTPUT_NAME OgreMain_rviz) |
| 40 | ++endif() |
| 41 | ++ |
| 42 | + target_link_libraries(OgreMain PUBLIC ${PLATFORM_LIBS} PRIVATE ${LIBRARIES} ${CMAKE_DL_LIBS}) |
| 43 | + |
| 44 | + # specify a precompiled header to use |
| 45 | +diff --git a/RenderSystems/GLSupport/CMakeLists.txt b/RenderSystems/GLSupport/CMakeLists.txt |
| 46 | +index 31c750729..e455d75ea 100644 |
| 47 | +--- a/RenderSystems/GLSupport/CMakeLists.txt |
| 48 | ++++ b/RenderSystems/GLSupport/CMakeLists.txt |
| 49 | +@@ -112,6 +112,10 @@ target_include_directories(OgreGLSupport PUBLIC |
| 50 | + "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/GLSL>" |
| 51 | + PRIVATE "$<BUILD_INTERFACE:${NATIVE_INCLUDES}>") |
| 52 | + |
| 53 | ++if(OGRE_MANGLE_NAME_OF_LIBRARIES_USED_BY_RVIZ) |
| 54 | ++ set_target_properties(OgreGLSupport PROPERTIES OUTPUT_NAME OgreGLSupport_rviz) |
| 55 | ++endif() |
| 56 | ++ |
| 57 | + set_property(TARGET OgreGLSupport PROPERTY POSITION_INDEPENDENT_CODE ON) |
| 58 | + generate_export_header(OgreGLSupport |
| 59 | + EXPORT_MACRO_NAME _OgreGLExport |
0 commit comments