mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-02 03:06:43 +00:00
Fix OSGPlugins_LIB_DIR on the MacOS build
Moves auto-detection of OSGPlugins_LIB_DIR into FindOSGPlugins.cmake. This should hopefully fix the error in the MacOS build.
This commit is contained in:
parent
5c0214142b
commit
e265d0bc2b
2 changed files with 11 additions and 8 deletions
|
@ -316,14 +316,6 @@ endif()
|
||||||
if(OPENMW_USE_SYSTEM_OSG)
|
if(OPENMW_USE_SYSTEM_OSG)
|
||||||
find_package(OpenSceneGraph 3.3.4 REQUIRED ${USED_OSG_COMPONENTS})
|
find_package(OpenSceneGraph 3.3.4 REQUIRED ${USED_OSG_COMPONENTS})
|
||||||
if(OSG_STATIC)
|
if(OSG_STATIC)
|
||||||
unset(OSGPlugins_LIB_DIR)
|
|
||||||
foreach(OSGDB_LIB ${OSGDB_LIBRARY})
|
|
||||||
# Skip library type names
|
|
||||||
if(EXISTS ${OSGDB_LIB} AND NOT IS_DIRECTORY ${OSGDB_LIB})
|
|
||||||
get_filename_component(OSG_LIB_DIR ${OSGDB_LIB} DIRECTORY)
|
|
||||||
list(APPEND OSGPlugins_LIB_DIR "${OSG_LIB_DIR}/osgPlugins-${OPENSCENEGRAPH_VERSION}")
|
|
||||||
endif()
|
|
||||||
endforeach(OSGDB_LIB)
|
|
||||||
find_package(OSGPlugins REQUIRED COMPONENTS ${USED_OSG_PLUGINS})
|
find_package(OSGPlugins REQUIRED COMPONENTS ${USED_OSG_PLUGINS})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -15,6 +15,17 @@
|
||||||
include(LibFindMacros)
|
include(LibFindMacros)
|
||||||
include(Findosg_functions)
|
include(Findosg_functions)
|
||||||
|
|
||||||
|
if (NOT OSGPlugins_LIB_DIR)
|
||||||
|
unset(OSGPlugins_LIB_DIR)
|
||||||
|
foreach(OSGDB_LIB ${OSGDB_LIBRARY})
|
||||||
|
# Skip library type names
|
||||||
|
if(EXISTS ${OSGDB_LIB} AND NOT IS_DIRECTORY ${OSGDB_LIB})
|
||||||
|
get_filename_component(OSG_LIB_DIR ${OSGDB_LIB} DIRECTORY)
|
||||||
|
list(APPEND OSGPlugins_LIB_DIR "${OSG_LIB_DIR}/osgPlugins-${OPENSCENEGRAPH_VERSION}")
|
||||||
|
endif()
|
||||||
|
endforeach(OSGDB_LIB)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (NOT OSGPlugins_LIB_DIR)
|
if (NOT OSGPlugins_LIB_DIR)
|
||||||
set(_mode WARNING)
|
set(_mode WARNING)
|
||||||
if (OSGPlugins_FIND_REQUIRED)
|
if (OSGPlugins_FIND_REQUIRED)
|
||||||
|
|
Loading…
Reference in a new issue