diff options
author | Michael Schuster <michael@schuster.ms> | 2020-01-22 06:53:03 +0300 |
---|---|---|
committer | Michael Schuster <michael@schuster.ms> | 2020-06-07 15:39:42 +0300 |
commit | acb56be5288af3469575f13dc5b14da8f73ae890 (patch) | |
tree | 8f2b403894730edef6388b7a0f4cfd980605f6ac /src/gui/CMakeLists.txt | |
parent | 3ce88bb62ccd4e1767ef55374164b05cc4ec876d (diff) |
macOS: Use macdeployqt instead of the old admin/osx/macdeployqt.py
In order to build the new 2.7 releases (new QML dependencies) without manually
modifying the old Python script each time, rely on Qt's standard tool instead.
This should streamline the build systems for upcoming dependency changes.
Signed-off-by: Michael Schuster <michael@schuster.ms>
Diffstat (limited to 'src/gui/CMakeLists.txt')
-rw-r--r-- | src/gui/CMakeLists.txt | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 93f63450e..ed17270cb 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -389,12 +389,17 @@ install(TARGETS ${APPLICATION_EXECUTABLE} # currently it needs to be done because the code right above needs to be executed no matter # if building a bundle or not and the install_qt4_executable needs to be called afterwards if(BUILD_OWNCLOUD_OSX_BUNDLE AND NOT BUILD_LIBRARIES_ONLY) - get_target_property (QT_QMAKE_EXECUTABLE Qt5::qmake IMPORTED_LOCATION) - install(CODE " - message(STATUS \"Deploying (Qt) dependencies and fixing library paths...\") - execute_process(COMMAND \"${CMAKE_SOURCE_DIR}/admin/osx/macdeployqt.py\" ${CMAKE_INSTALL_PREFIX}/${OWNCLOUD_OSX_BUNDLE} ${QT_QMAKE_EXECUTABLE}) - execute_process(COMMAND \"${CMAKE_SOURCE_DIR}/admin/osx/macdeployqt.py\" ${CMAKE_INSTALL_PREFIX}/${OWNCLOUD_OSX_BUNDLE}/Contents/Frameworks/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app ${QT_QMAKE_EXECUTABLE}) - " COMPONENT RUNTIME) + get_target_property (QT_QMAKE_EXECUTABLE Qt5::qmake IMPORTED_LOCATION) + get_filename_component(QT_BIN_DIR "${QT_QMAKE_EXECUTABLE}" DIRECTORY) + find_program(MACDEPLOYQT_EXECUTABLE macdeployqt HINTS "${QT_BIN_DIR}") + + add_custom_command(TARGET ${APPLICATION_EXECUTABLE} POST_BUILD + COMMAND "${MACDEPLOYQT_EXECUTABLE}" + "$<TARGET_FILE_DIR:${APPLICATION_EXECUTABLE}>/../.." + -qmldir=${CMAKE_SOURCE_DIR}/src/gui + -always-overwrite + COMMENT "Running macdeployqt..." + ) endif() if(NOT BUILD_OWNCLOUD_OSX_BUNDLE AND NOT WIN32) |