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/crashreporter | |
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/crashreporter')
-rw-r--r-- | src/crashreporter/CMakeLists.txt | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/crashreporter/CMakeLists.txt b/src/crashreporter/CMakeLists.txt index 57043f6ff..eb68418dc 100644 --- a/src/crashreporter/CMakeLists.txt +++ b/src/crashreporter/CMakeLists.txt @@ -49,11 +49,16 @@ if(NOT BUILD_LIBRARIES_ONLY) # 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) - 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 ${CRASHREPORTER_EXECUTABLE} POST_BUILD + COMMAND "${MACDEPLOYQT_EXECUTABLE}" + "$<TARGET_FILE_DIR:${CRASHREPORTER_EXECUTABLE}>/../.." + -qmldir=${CMAKE_SOURCE_DIR}/src/gui + -always-overwrite + COMMENT "Running macdeployqt..." + ) endif() endif() |