|
|
|
@ -668,11 +668,15 @@ if (APPLE)
|
|
|
|
|
set(ABSOLUTE_PLUGINS ${PLUGIN_ABS} ${ABSOLUTE_PLUGINS})
|
|
|
|
|
endforeach ()
|
|
|
|
|
|
|
|
|
|
install(CODE "
|
|
|
|
|
set(BU_CHMOD_BUNDLE_ITEMS ON)
|
|
|
|
|
include(BundleUtilities)
|
|
|
|
|
" COMPONENT Runtime)
|
|
|
|
|
|
|
|
|
|
# installs used plugins in bundle at given path (bundle_path must be relative to ${CMAKE_INSTALL_PREFIX})
|
|
|
|
|
# and returns list of install paths for all installed plugins
|
|
|
|
|
function (install_plugins_for_bundle bundle_path plugins_var)
|
|
|
|
|
set(RELATIVE_PLUGIN_INSTALL_BASE "${bundle_path}/Contents/Frameworks")
|
|
|
|
|
install(DIRECTORY ${ABSOLUTE_PLUGINS} DESTINATION ${RELATIVE_PLUGIN_INSTALL_BASE} COMPONENT Runtime)
|
|
|
|
|
|
|
|
|
|
set(PLUGINS "")
|
|
|
|
|
set(PLUGIN_INSTALL_BASE "\${CMAKE_INSTALL_PREFIX}/${RELATIVE_PLUGIN_INSTALL_BASE}")
|
|
|
|
@ -680,7 +684,13 @@ if (APPLE)
|
|
|
|
|
foreach (PLUGIN ${ABSOLUTE_PLUGINS})
|
|
|
|
|
get_filename_component(PLUGIN_RELATIVE ${PLUGIN} NAME)
|
|
|
|
|
get_filename_component(PLUGIN_RELATIVE_WE ${PLUGIN} NAME_WE)
|
|
|
|
|
set(PLUGINS ${PLUGINS} "${PLUGIN_INSTALL_BASE}/${PLUGIN_RELATIVE}/${PLUGIN_RELATIVE_WE}")
|
|
|
|
|
|
|
|
|
|
set(PLUGIN_DYLIB_IN_BUNDLE "${PLUGIN_INSTALL_BASE}/${PLUGIN_RELATIVE}/${PLUGIN_RELATIVE_WE}")
|
|
|
|
|
set(PLUGINS ${PLUGINS} "${PLUGIN_DYLIB_IN_BUNDLE}")
|
|
|
|
|
|
|
|
|
|
install(CODE "
|
|
|
|
|
copy_resolved_framework_into_bundle(\"${PLUGIN}/${PLUGIN_RELATIVE_WE}\" \"${PLUGIN_DYLIB_IN_BUNDLE}\")
|
|
|
|
|
" COMPONENT Runtime)
|
|
|
|
|
endforeach ()
|
|
|
|
|
|
|
|
|
|
set(${plugins_var} ${PLUGINS} PARENT_SCOPE)
|
|
|
|
@ -700,6 +710,7 @@ if (APPLE)
|
|
|
|
|
# Current limitations:
|
|
|
|
|
# 1. Handles only frameworks, not simple libs
|
|
|
|
|
INSTALL(CODE "
|
|
|
|
|
cmake_policy(SET CMP0009 OLD)
|
|
|
|
|
set(CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES})
|
|
|
|
|
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
|
|
|
|
set(CMAKE_SYSTEM_FRAMEWORK_PATH ${CMAKE_SYSTEM_FRAMEWORK_PATH})
|
|
|
|
@ -731,9 +742,6 @@ if (APPLE)
|
|
|
|
|
endif()
|
|
|
|
|
endfunction(gp_resolve_item_override)
|
|
|
|
|
|
|
|
|
|
cmake_policy(SET CMP0009 OLD)
|
|
|
|
|
set(BU_CHMOD_BUNDLE_ITEMS ON)
|
|
|
|
|
include(BundleUtilities)
|
|
|
|
|
fixup_bundle(\"${OPENMW_APP}\" \"${PLUGINS}\" \"${DIRS}\")
|
|
|
|
|
fixup_bundle(\"${OPENCS_APP}\" \"${OPENCS_PLUGINS}\" \"${DIRS}\")
|
|
|
|
|
" COMPONENT Runtime)
|
|
|
|
|