From 3cbc61634d8b30a34166630d254ad84e747038b7 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Mon, 25 Dec 2023 07:25:56 +0800 Subject: [PATCH] Fix Qt paths diff --git src/gui/CMakeLists.txt src/gui/CMakeLists.txt index 33a67ac1..6bac8fa0 100644 --- src/gui/CMakeLists.txt +++ src/gui/CMakeLists.txt @@ -253,8 +253,8 @@ elseif(APPLE) install(TARGETS ${PROJECT_NAME} BUNDLE DESTINATION ${CMAKE_INSTALL_PREFIX}) - set(QT_LIBS_DIR "${${QT_PREFIX}Widgets_DIR}/../..") - set(QT_PLUGINS_DIR "${QT_LIBS_DIR}/../plugins") + set(QT_LIBS_DIR "@qt_libs_dir@") + set(QT_PLUGINS_DIR "@qt_plugins_dir@") install(FILES "${QT_PLUGINS_DIR}/platforms/libqcocoa.dylib" DESTINATION "${MAC_BUNDLE_PATH}/Contents/plugins/platforms") @@ -275,23 +275,7 @@ DESTINATION "${MAC_BUNDLE_PATH}/Contents" FILES_MATCHING PATTERN "qtbase_*.qm") - if(EXISTS "/usr/local/bin/ffmpeg") - install(PROGRAMS - "/usr/local/bin/ffmpeg" - DESTINATION "${MAC_BUNDLE_PATH}/Contents/MacOS") - else() - message(WARNING "FFmpeg executable not copied!") - endif() - install(CODE " - include(BundleUtilities) - set(BU_CHMOD_BUNDLE_ITEMS ON) - list(APPEND DIRS /usr/local/lib ${QT_LIBS_DIR}) - file(GLOB_RECURSE QMPLAY2_MODULES_AND_QT_PLUGINS - \"${MAC_BUNDLE_PATH}/Contents/MacOS/modules/*\" - \"${MAC_BUNDLE_PATH}/Contents/plugins/*.dylib\") - file(WRITE \"${MAC_BUNDLE_PATH}/Contents/Resources/qt.conf\") - fixup_bundle(${MAC_BUNDLE_PATH} \"\${QMPLAY2_MODULES_AND_QT_PLUGINS}\" \"\${DIRS}\") - ") + file(WRITE \"@destroot@${MAC_BUNDLE_PATH}/Contents/Resources/qt.conf\") elseif(NOT ANDROID) # executable install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})