1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-07 12:54:00 +00:00

Use OSG_PLUGIN_PREFIX instead of CMAKE_SHARED_MODULE_PREFIX

Logic to generate it copied from OSG's CMake instead of guessed.
This commit is contained in:
AnyOldName3 2024-01-12 23:49:53 +00:00
parent 62f5c46f25
commit e0eb3feb89

View File

@ -41,7 +41,14 @@ endif (GIT_CHECKOUT)
list (APPEND COMPONENT_FILES "${OpenMW_BINARY_DIR}/${VERSION_CPP_FILE}")
# OSG plugin checker
list(TRANSFORM USED_OSG_PLUGINS PREPEND "${CMAKE_SHARED_MODULE_PREFIX}" OUTPUT_VARIABLE USED_OSG_PLUGIN_FILENAMES)
# Helpfully, OSG doesn't export this to its CMake config as it doesn't have one
set(OSG_PLUGIN_PREFIX "")
if (CYGWIN)
SET(OSG_PLUGIN_PREFIX "cygwin_")
elseif(MINGW)
SET(OSG_PLUGIN_PREFIX "mingw_")
endif()
list(TRANSFORM USED_OSG_PLUGINS PREPEND "${OSG_PLUGIN_PREFIX}" OUTPUT_VARIABLE USED_OSG_PLUGIN_FILENAMES)
list(TRANSFORM USED_OSG_PLUGIN_FILENAMES APPEND "${CMAKE_SHARED_MODULE_SUFFIX}")
list(TRANSFORM USED_OSG_PLUGIN_FILENAMES PREPEND "\"" OUTPUT_VARIABLE USED_OSG_PLUGIN_FILENAMES_FORMATTED)
list(TRANSFORM USED_OSG_PLUGIN_FILENAMES_FORMATTED APPEND "\"")