forked from mirror/openmw-tes3mp
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)
|
find_package(OpenSceneGraph 3.3.4 REQUIRED osgDB osgViewer osgText osgGA osgAnimation osgParticle osgUtil osgFX)
|
||||||
include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS})
|
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)
|
get_filename_component(OSG_LIB_DIR ${OSGDB_LIBRARY} DIRECTORY)
|
||||||
set(OSGPlugins_LIB_DIR "${OSG_LIB_DIR}/osgPlugins-${OPENSCENEGRAPH_VERSION}")
|
set(OSGPlugins_LIB_DIR "${OSG_LIB_DIR}/osgPlugins-${OPENSCENEGRAPH_VERSION}")
|
||||||
|
|
||||||
if(OSG_STATIC)
|
if(OSG_STATIC)
|
||||||
add_definitions(-DOSG_LIBRARY_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})
|
list(APPEND OPENSCENEGRAPH_LIBRARIES ${OSGPlugins_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -740,15 +750,6 @@ if (APPLE)
|
||||||
" COMPONENT Runtime)
|
" COMPONENT Runtime)
|
||||||
|
|
||||||
set(ABSOLUTE_PLUGINS "")
|
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})
|
foreach (PLUGIN_NAME ${USED_OSG_PLUGINS})
|
||||||
set(PLUGIN_ABS "${OSGPlugins_LIB_DIR}/${PLUGIN_NAME}.so")
|
set(PLUGIN_ABS "${OSGPlugins_LIB_DIR}/${PLUGIN_NAME}.so")
|
||||||
|
|
|
@ -142,14 +142,15 @@ target_link_libraries(openmw
|
||||||
if (ANDROID)
|
if (ANDROID)
|
||||||
set (OSG_PLUGINS
|
set (OSG_PLUGINS
|
||||||
-Wl,--whole-archive
|
-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
|
target_link_libraries(openmw
|
||||||
EGL
|
EGL
|
||||||
android
|
android
|
||||||
|
|
Loading…
Reference in a new issue