wowlet/cmake/Deploy.cmake
dsc caa8731410 - Bumped to version 3.1.0
- Enables Apple M1 Rosetta support
- Fixes Apple Intel and M1 packaging issue(s)
- Update build docs
- Disable donation begging
- Mining: New background gfx for the QML widget
- Mining: fix segfault at wownerod right-click download
- remove (old) OpenPGP code (find a new impl. when needed)
2022-05-04 02:15:13 +02:00

24 lines
1.1 KiB
CMake

if(APPLE OR (WIN32 AND NOT STATIC))
add_custom_target(deploy)
get_target_property(_qmake_executable Qt5::qmake IMPORTED_LOCATION)
get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY)
if(APPLE AND NOT IOS)
find_program(MACDEPLOYQT_EXECUTABLE macdeployqt HINTS "${_qt_bin_dir}")
add_custom_command(TARGET deploy
POST_BUILD
COMMAND "${MACDEPLOYQT_EXECUTABLE}" "$<TARGET_FILE_DIR:wowlet>/../.." -always-overwrite -qmldir="${CMAKE_SOURCE_DIR}"
COMMENT "Running macdeployqt..."
)
# workaround for a Qt bug that requires manually adding libqsvg.dylib to bundle
find_file(_qt_svg_dylib "libqsvg.dylib" PATHS "${CMAKE_PREFIX_PATH}/plugins/imageformats" NO_DEFAULT_PATH)
if(_qt_svg_dylib)
add_custom_command(TARGET deploy
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${_qt_svg_dylib} $<TARGET_FILE_DIR:wowlet>/../PlugIns/imageformats/
COMMENT "Copying libqsvg.dylib"
)
endif()
endif()
endif()