2017-08-12 20:58:09 +02:00
|
|
|
# We need to keep this code into separate directory so CMake will execute it after all other subdirectories install code
|
|
|
|
# Otherwise we can't fix Mac bundle dependencies since binaries wouldn't be there when this code executed
|
|
|
|
if(APPLE)
|
2022-08-30 16:29:00 +02:00
|
|
|
set(bundleDir "\${CMAKE_INSTALL_PREFIX}/${APP_BUNDLE_DIR}")
|
|
|
|
set(bundleContentsDir "${bundleDir}/Contents")
|
|
|
|
|
2017-08-12 20:58:09 +02:00
|
|
|
if(ENABLE_LAUNCHER)
|
2022-08-30 16:29:00 +02:00
|
|
|
# cross-compiled Qt 5 builds macdeployqt for target platform instead of host
|
|
|
|
if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL CMAKE_SYSTEM_PROCESSOR)
|
|
|
|
# deploy Qt dylibs with macdeployqt
|
|
|
|
find_program(TOOL_MACDEPLOYQT NAMES macdeployqt PATHS ${qt_base_dir}/bin)
|
|
|
|
if(NOT TOOL_MACDEPLOYQT)
|
|
|
|
message(FATAL_ERROR "Could not find macdeployqt")
|
|
|
|
endif()
|
|
|
|
install(CODE "
|
|
|
|
execute_process(COMMAND
|
|
|
|
\"${TOOL_MACDEPLOYQT}\" \"${bundleDir}\" -verbose=2
|
|
|
|
)
|
|
|
|
")
|
|
|
|
else()
|
|
|
|
# simulate macdeployqt behavior, main Qt libs are copied by conan
|
|
|
|
get_target_property(qmakePath Qt5::qmake IMPORTED_LOCATION)
|
|
|
|
execute_process(COMMAND
|
|
|
|
"${qmakePath}" -query QT_INSTALL_PLUGINS
|
|
|
|
OUTPUT_VARIABLE qtPluginsDir
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
|
|
)
|
|
|
|
install(DIRECTORY
|
|
|
|
${qtPluginsDir}/
|
|
|
|
DESTINATION ${APP_BUNDLE_DIR}/Contents/PlugIns
|
|
|
|
)
|
|
|
|
install(CODE "
|
|
|
|
file(WRITE ${bundleContentsDir}/Resources/qt.conf
|
|
|
|
\"[Paths]\nPlugins = PlugIns\"
|
|
|
|
)
|
|
|
|
")
|
2017-08-12 20:58:09 +02:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2022-08-30 16:29:00 +02:00
|
|
|
# deploy other dylibs with conan
|
2017-08-12 20:58:09 +02:00
|
|
|
install(CODE "
|
2022-08-30 16:29:00 +02:00
|
|
|
execute_process(COMMAND
|
|
|
|
conan imports \"${CMAKE_SOURCE_DIR}\" --install-folder \"${CMAKE_SOURCE_DIR}/conan-generated\" --import-folder \"${bundleContentsDir}\"
|
|
|
|
)
|
|
|
|
file(REMOVE \"${bundleContentsDir}/conan_imports_manifest.txt\")
|
|
|
|
")
|
2017-08-12 20:58:09 +02:00
|
|
|
endif(APPLE)
|
2017-08-16 13:52:39 +02:00
|
|
|
|
|
|
|
# This will likely only work for Vcpkg
|
|
|
|
if(WIN32)
|
|
|
|
if(ENABLE_LAUNCHER)
|
|
|
|
# Temporary ugly fix for Qt deployment since windeployqt broken in Vcpkg
|
2021-02-14 23:21:00 +02:00
|
|
|
|
2019-06-20 13:06:42 +02:00
|
|
|
#there are some weird issues with variables used in path not evaluated properly when trying to remove code duplication from below lines
|
|
|
|
if(EXISTS ${CMAKE_BINARY_DIR}/../../vcpkg) #current path to vcpkg main folder on appveyor CI
|
|
|
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8) #64 bit build
|
|
|
|
install(CODE "
|
|
|
|
file(COPY ${CMAKE_BINARY_DIR}/../../vcpkg/installed/x64-windows/plugins/bearer DESTINATION \${CMAKE_INSTALL_PREFIX})
|
|
|
|
file(COPY ${CMAKE_BINARY_DIR}/../../vcpkg/installed/x64-windows/plugins/iconengines DESTINATION \${CMAKE_INSTALL_PREFIX})
|
|
|
|
file(COPY ${CMAKE_BINARY_DIR}/../../vcpkg/installed/x64-windows/plugins/imageformats DESTINATION \${CMAKE_INSTALL_PREFIX})
|
|
|
|
file(COPY ${CMAKE_BINARY_DIR}/../../vcpkg/installed/x64-windows/plugins/platforminputcontexts DESTINATION \${CMAKE_INSTALL_PREFIX})
|
|
|
|
file(COPY ${CMAKE_BINARY_DIR}/../../vcpkg/installed/x64-windows/plugins/platforms DESTINATION \${CMAKE_INSTALL_PREFIX})
|
|
|
|
")
|
|
|
|
else()
|
|
|
|
install(CODE "
|
|
|
|
file(COPY ${CMAKE_BINARY_DIR}/../../vcpkg/installed/x86-windows/plugins/bearer DESTINATION \${CMAKE_INSTALL_PREFIX})
|
|
|
|
file(COPY ${CMAKE_BINARY_DIR}/../../vcpkg/installed/x86-windows/plugins/iconengines DESTINATION \${CMAKE_INSTALL_PREFIX})
|
|
|
|
file(COPY ${CMAKE_BINARY_DIR}/../../vcpkg/installed/x86-windows/plugins/imageformats DESTINATION \${CMAKE_INSTALL_PREFIX})
|
|
|
|
file(COPY ${CMAKE_BINARY_DIR}/../../vcpkg/installed/x86-windows/plugins/platforminputcontexts DESTINATION \${CMAKE_INSTALL_PREFIX})
|
|
|
|
file(COPY ${CMAKE_BINARY_DIR}/../../vcpkg/installed/x86-windows/plugins/platforms DESTINATION \${CMAKE_INSTALL_PREFIX})
|
|
|
|
")
|
|
|
|
endif()
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
else() #not appveyor build - lines below do not work properly
|
2019-06-20 13:06:42 +02:00
|
|
|
install(CODE "
|
2017-08-16 13:52:39 +02:00
|
|
|
execute_process(
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_BINARY_DIR}/bin/\${BUILD_TYPE}/bearer \${CMAKE_INSTALL_PREFIX}/bearer
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_BINARY_DIR}/bin/\${BUILD_TYPE}/iconengines \${CMAKE_INSTALL_PREFIX}/iconengines
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_BINARY_DIR}/bin/\${BUILD_TYPE}/imageformats \${CMAKE_INSTALL_PREFIX}/imageformats
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_BINARY_DIR}/bin/\${BUILD_TYPE}/platforminputcontexts \${CMAKE_INSTALL_PREFIX}/platforminputcontexts
|
2019-06-20 13:06:42 +02:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_BINARY_DIR}/bin/\${BUILD_TYPE}/platforms \${CMAKE_INSTALL_PREFIX}/platforms)
|
|
|
|
")
|
|
|
|
endif()
|
2017-08-16 13:52:39 +02:00
|
|
|
endif()
|
|
|
|
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
|
|
|
|
#TODO: check if some equivalent of block below can be used for above block (easy qt dependencies copy)
|
|
|
|
if(ENABLE_LUA)
|
2022-05-26 07:55:20 +02:00
|
|
|
install_vcpkg_imported_tgt(luajit::luajit)
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
endif()
|
|
|
|
|
|
|
|
#LuaJIT will not be copied automatically by not meeting criteria for this block of code
|
2017-08-16 13:52:39 +02:00
|
|
|
install(CODE "
|
|
|
|
if(\"\${BUILD_TYPE}\" STREQUAL \"Debug\")
|
|
|
|
set(dirs \"${CMAKE_PREFIX_PATH}/debug/bin/\")
|
|
|
|
else()
|
|
|
|
set(dirs \"${CMAKE_PREFIX_PATH}/bin/\")
|
|
|
|
endif()
|
|
|
|
set(BU_CHMOD_BUNDLE_ITEMS ON)
|
|
|
|
include(BundleUtilities)
|
|
|
|
fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/VCMI_Client.exe\" \"\" \"\${dirs}\")
|
|
|
|
|
|
|
|
" COMPONENT Runtime)
|
|
|
|
endif(WIN32)
|