From 20d64189fa88a70d566462c5d0511cc67efea268 Mon Sep 17 00:00:00 2001 From: Bart Kessels Date: Fri, 14 Oct 2022 04:26:44 +0000 Subject: [PATCH] Support Qt6 when packaging MacOS --- packaging/macos/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packaging/macos/CMakeLists.txt b/packaging/macos/CMakeLists.txt index 2e0e099..4ad9ba1 100644 --- a/packaging/macos/CMakeLists.txt +++ b/packaging/macos/CMakeLists.txt @@ -12,7 +12,12 @@ set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES MACOSX_BUNDLE_INFO_STRING set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES MACOSX_BUNDLE_LONG_VERSION_STRING ${CMAKE_PROJECT_VERSION}) set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES MACOSX_BUNDLE_SHORT_VERSION_STRING ${CMAKE_PROJECT_VERSION_MAJOR}) -get_target_property(qmake_executable Qt5::qmake IMPORTED_LOCATION) +if (use_qt6) + get_target_property(qmake_executable Qt::qmake IMPORTED_LOCATION) +else() + get_target_property(qmake_executable Qt5::qmake IMPORTED_LOCATION) +endif() + get_filename_component(_qt_bin_dir "${qmake_executable}" DIRECTORY) find_program(MACDEPLOYQT_BIN macdeployqt HINT "${_qt_bin_dir}")