mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-22 22:13:35 +02:00
[macOS] don't use macdeployqt together with Conan
This commit is contained in:
parent
35a6a24204
commit
d1ab611b4f
@ -4,19 +4,8 @@ if(APPLE_MACOS)
|
|||||||
set(bundleDir "\${CMAKE_INSTALL_PREFIX}/${APP_BUNDLE_DIR}")
|
set(bundleDir "\${CMAKE_INSTALL_PREFIX}/${APP_BUNDLE_DIR}")
|
||||||
set(bundleContentsDir "${bundleDir}/Contents")
|
set(bundleContentsDir "${bundleDir}/Contents")
|
||||||
|
|
||||||
if(ENABLE_LAUNCHER)
|
if(ENABLE_LAUNCHER OR ENABLE_EDITOR)
|
||||||
# cross-compiled Qt 5 builds macdeployqt for target platform instead of host
|
if(USING_CONAN)
|
||||||
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)
|
|
||||||
endif()
|
|
||||||
if(TOOL_MACDEPLOYQT)
|
|
||||||
install(CODE "
|
|
||||||
execute_process(COMMAND
|
|
||||||
\"${TOOL_MACDEPLOYQT}\" \"${bundleDir}\" -verbose=2
|
|
||||||
)
|
|
||||||
")
|
|
||||||
else()
|
|
||||||
# simulate macdeployqt behavior, main Qt libs are copied by conan
|
# simulate macdeployqt behavior, main Qt libs are copied by conan
|
||||||
get_target_property(qmakePath Qt5::qmake IMPORTED_LOCATION)
|
get_target_property(qmakePath Qt5::qmake IMPORTED_LOCATION)
|
||||||
execute_process(COMMAND
|
execute_process(COMMAND
|
||||||
@ -33,6 +22,19 @@ if(APPLE_MACOS)
|
|||||||
\"[Paths]\nPlugins = PlugIns\"
|
\"[Paths]\nPlugins = PlugIns\"
|
||||||
)
|
)
|
||||||
")
|
")
|
||||||
|
else()
|
||||||
|
# note: cross-compiled Qt 5 builds macdeployqt for target platform instead of host
|
||||||
|
# deploy Qt dylibs with macdeployqt
|
||||||
|
find_program(TOOL_MACDEPLOYQT NAMES macdeployqt PATHS ${qt_base_dir}/bin)
|
||||||
|
if(TOOL_MACDEPLOYQT)
|
||||||
|
install(CODE "
|
||||||
|
execute_process(COMMAND
|
||||||
|
\"${TOOL_MACDEPLOYQT}\" \"${bundleDir}\" -verbose=2
|
||||||
|
)
|
||||||
|
")
|
||||||
|
else()
|
||||||
|
message(WARNING "macdeployqt not found, running cpack would result in broken package")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user