|
|
|
@ -381,19 +381,15 @@ if (WIN32)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
# Apple bundling
|
|
|
|
|
# TODO REWRITE!
|
|
|
|
|
if (APPLE)
|
|
|
|
|
set(MISC_FILES
|
|
|
|
|
${APP_BUNDLE_DIR}/Contents/MacOS/openmw.cfg
|
|
|
|
|
${APP_BUNDLE_DIR}/Contents/MacOS/plugins.cfg)
|
|
|
|
|
|
|
|
|
|
set(OGRE_PLUGINS
|
|
|
|
|
${APP_BUNDLE_DIR}/Contents/Plugins/*)
|
|
|
|
|
|
|
|
|
|
#install(FILES ${MISC_FILES} DESTINATION ../MacOS)
|
|
|
|
|
#install(DIRECTORY "${APP_BUNDLE_DIR}/Contents/Plugins" DESTINATION ..)
|
|
|
|
|
#install(DIRECTORY "${APP_BUNDLE_DIR}/Contents/Resources/resources" DESTINATION ../Resources)
|
|
|
|
|
install(DIRECTORY "${APP_BUNDLE_DIR}" DESTINATION . COMPONENT Runtime)
|
|
|
|
|
install(DIRECTORY "${APP_BUNDLE_DIR}" USE_SOURCE_PERMISSIONS DESTINATION . COMPONENT Runtime)
|
|
|
|
|
set(CPACK_GENERATOR "DragNDrop")
|
|
|
|
|
# set(CPACK_BUNDLE_PLIST "${CMAKE_SOURCE_DIR}/files/mac/Info.plist")
|
|
|
|
|
# set(CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/files/mac/openmw.icns")
|
|
|
|
@ -406,12 +402,24 @@ set(CPACK_PACKAGE_VERSION_PATCH ${OPENMW_VERSION_RELEASE})
|
|
|
|
|
set(APPS "\${CMAKE_INSTALL_PREFIX}/${APP_BUNDLE_NAME}")
|
|
|
|
|
set(PLUGINS "")
|
|
|
|
|
|
|
|
|
|
foreach(plugin ${USED_OGRE_PLUGINS})
|
|
|
|
|
set(PLUGINS ${PLUGINS} "\${CMAKE_INSTALL_PREFIX}/${APP_BUNDLE_NAME}/Contents/Plugins/${plugin}.dylib")
|
|
|
|
|
# Scan Plugins dir for *.dylibs
|
|
|
|
|
file(GLOB ALL_PLUGINS "${APP_BUNDLE_DIR}/Contents/Plugins/*.dylib")
|
|
|
|
|
|
|
|
|
|
foreach(PLUGIN ${ALL_PLUGINS})
|
|
|
|
|
get_filename_component(PLUGIN_FILENAME ${PLUGIN} NAME)
|
|
|
|
|
set(PLUGINS ${PLUGINS} "\${CMAKE_INSTALL_PREFIX}/${APP_BUNDLE_NAME}/Contents/Plugins/${PLUGIN_FILENAME}")
|
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
|
|
#For now, search unresolved dependencies only in default system paths, so if you put unresolveable (i.e. with @executable_path in id name) lib or framework somewhere else, it would fail
|
|
|
|
|
set(DIRS "")
|
|
|
|
|
|
|
|
|
|
# Overriding item resolving during installation, it needed if
|
|
|
|
|
# some library already has be "fixed up", i.e. its id name contains @executable_path,
|
|
|
|
|
# but library is not embedded in bundle. For example, it's Ogre.framework from Ogre SDK.
|
|
|
|
|
# Current implementation of GetPrerequsities/BundleUtilities doesn't handle that case.
|
|
|
|
|
#
|
|
|
|
|
# Current limitations:
|
|
|
|
|
# 1. Handles only frameworks, not simple libs
|
|
|
|
|
INSTALL(CODE "
|
|
|
|
|
set(CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES})
|
|
|
|
|
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
|
|
|
|