mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-10 06:39:49 +00:00
Merge branch 'osg-find-plugins-2' into 'master'
cmake/FindOSGPlugins: Support lib-prefixed plugins Closes #5792 See merge request OpenMW/openmw!544
This commit is contained in:
commit
a8014b4d97
@ -27,9 +27,12 @@ foreach(_library ${OSGPlugins_FIND_COMPONENTS})
|
||||
string(TOUPPER ${_library} _library_uc)
|
||||
set(_component OSGPlugins_${_library})
|
||||
|
||||
set(${_library_uc}_DIR ${OSGPlugins_LIB_DIR}) # to help function osg_find_library
|
||||
# On some systems, notably Debian and Ubuntu, the OSG plugins do not have
|
||||
# the usual "lib" prefix. We temporarily add the empty string to the list
|
||||
# of prefixes CMake searches for (via osg_find_library) to support these systems.
|
||||
set(_saved_lib_prefix ${CMAKE_FIND_LIBRARY_PREFIXES}) # save CMAKE_FIND_LIBRARY_PREFIXES
|
||||
set(CMAKE_FIND_LIBRARY_PREFIXES "") # search libraries with no prefix
|
||||
list(APPEND CMAKE_FIND_LIBRARY_PREFIXES "") # search libraries with no prefix
|
||||
set(${_library_uc}_DIR ${OSGPlugins_LIB_DIR}) # to help function osg_find_library
|
||||
osg_find_library(${_library_uc} ${_library}) # find it into ${_library_uc}_LIBRARIES
|
||||
set(CMAKE_FIND_LIBRARY_PREFIXES ${_saved_lib_prefix}) # restore prefix
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user