mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-21 06:09:42 +00:00
Move USED_OSG_PLUGINS to the top of the CMakeLists to be used by all platforms
This commit is contained in:
parent
b0d4c8740c
commit
50bcb65ee0
2 changed files with 19 additions and 17 deletions
|
@ -223,13 +223,23 @@ endif()
|
|||
find_package(OpenSceneGraph 3.3.4 REQUIRED osgDB osgViewer osgText osgGA osgAnimation osgParticle osgUtil osgFX)
|
||||
include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS})
|
||||
|
||||
set(USED_OSG_PLUGINS
|
||||
osgdb_bmp
|
||||
osgdb_dds
|
||||
osgdb_jpeg
|
||||
osgdb_osg
|
||||
osgdb_png
|
||||
osgdb_serializers_osg
|
||||
osgdb_tga
|
||||
)
|
||||
|
||||
get_filename_component(OSG_LIB_DIR ${OSGDB_LIBRARY} DIRECTORY)
|
||||
set(OSGPlugins_LIB_DIR "${OSG_LIB_DIR}/osgPlugins-${OPENSCENEGRAPH_VERSION}")
|
||||
|
||||
if(OSG_STATIC)
|
||||
add_definitions(-DOSG_LIBRARY_STATIC)
|
||||
|
||||
find_package(OSGPlugins REQUIRED COMPONENTS osgdb_png osgdb_tga osgdb_dds osgdb_jpeg)
|
||||
find_package(OSGPlugins REQUIRED COMPONENTS ${USED_OSG_PLUGINS})
|
||||
list(APPEND OPENSCENEGRAPH_LIBRARIES ${OSGPlugins_LIBRARIES})
|
||||
endif()
|
||||
|
||||
|
@ -740,15 +750,6 @@ if (APPLE)
|
|||
" COMPONENT Runtime)
|
||||
|
||||
set(ABSOLUTE_PLUGINS "")
|
||||
set(USED_OSG_PLUGINS
|
||||
osgdb_bmp
|
||||
osgdb_dds
|
||||
osgdb_jpeg
|
||||
osgdb_osg
|
||||
osgdb_png
|
||||
osgdb_serializers_osg
|
||||
osgdb_tga
|
||||
)
|
||||
|
||||
foreach (PLUGIN_NAME ${USED_OSG_PLUGINS})
|
||||
set(PLUGIN_ABS "${OSGPlugins_LIB_DIR}/${PLUGIN_NAME}.so")
|
||||
|
|
|
@ -142,14 +142,15 @@ target_link_libraries(openmw
|
|||
if (ANDROID)
|
||||
set (OSG_PLUGINS
|
||||
-Wl,--whole-archive
|
||||
${OSG_PLUGINS_DIR}/libosgdb_dds.a
|
||||
${OSG_PLUGINS_DIR}/libosgdb_bmp.a
|
||||
${OSG_PLUGINS_DIR}/libosgdb_tga.a
|
||||
${OSG_PLUGINS_DIR}/libosgdb_gif.a
|
||||
${OSG_PLUGINS_DIR}/libosgdb_jpeg.a
|
||||
${OSG_PLUGINS_DIR}/libosgdb_png.a
|
||||
-Wl,--no-whole-archive
|
||||
)
|
||||
foreach(PLUGIN_NAME ${USED_OSG_PLUGINS})
|
||||
set(OSG_PLUGINS ${OSG_PLUGINS} ${OSG_PLUGINS_DIR}/lib${PLUGIN_NAME}.a)
|
||||
endforeach()
|
||||
|
||||
set (OSG_PLUGINS
|
||||
${OSG_PLUGINS} -Wl,--no-whole-archive
|
||||
)
|
||||
|
||||
target_link_libraries(openmw
|
||||
EGL
|
||||
android
|
||||
|
|
Loading…
Reference in a new issue