diff --git a/apps/opencs/CMakeLists.txt b/apps/opencs/CMakeLists.txt index 17b3375f5..8be1fa4d3 100644 --- a/apps/opencs/CMakeLists.txt +++ b/apps/opencs/CMakeLists.txt @@ -233,7 +233,11 @@ if(OSG_STATIC) add_library(openmw_cs_osg_plugins INTERFACE) foreach(_plugin ${USED_OSG_PLUGINS}) string(TOUPPER ${_plugin} _plugin_uc) - list(APPEND _osg_plugins_static_files $) + if (${_plugin_uc}_LIBRARY MATCHES "[/.]") + list(APPEND _osg_plugins_static_files ${${_plugin_uc}_LIBRARY}) + else() + list(APPEND _osg_plugins_static_files $) + endif() target_link_libraries(openmw_cs_osg_plugins INTERFACE ${${_plugin_uc}_LIBRARY}) endforeach() # We use --whole-archive because OSG plugins use registration. diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt index 1c11825ef..dda517c44 100644 --- a/apps/openmw/CMakeLists.txt +++ b/apps/openmw/CMakeLists.txt @@ -148,7 +148,11 @@ if(OSG_STATIC) add_library(openmw_osg_plugins INTERFACE) foreach(_plugin ${USED_OSG_PLUGINS}) string(TOUPPER ${_plugin} _plugin_uc) - list(APPEND _osg_plugins_static_files $) + if (${_plugin_uc}_LIBRARY MATCHES "[/.]") + list(APPEND _osg_plugins_static_files ${${_plugin_uc}_LIBRARY}) + else() + list(APPEND _osg_plugins_static_files $) + endif() target_link_libraries(openmw_osg_plugins INTERFACE ${${_plugin_uc}_LIBRARY}) endforeach() # We use --whole-archive because OSG plugins use registration.