From e86fa3e4fbb5f31af38f5e31515fd432a0aa0620 Mon Sep 17 00:00:00 2001 From: xiphon Date: Sun, 1 Nov 2020 22:26:41 +0000 Subject: [PATCH] cmake: workaround for MacOS '-framework' pkg-config flags issue --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 816fb2bf..e2478dd8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -272,6 +272,9 @@ if(QT5_PKG_CONFIG_FOUND) endif() if(UNIX AND CMAKE_PREFIX_PATH) + if(APPLE) + list(JOIN ${QT5_PKG_CONFIG}_LDFLAGS_OTHER " " ${QT5_PKG_CONFIG}_LDFLAGS_OTHER) + endif() # temporal workaround for https://bugreports.qt.io/browse/QTBUG-80922 STRING(REPLACE "${QT5_PKG_CONFIG_Qt5Core_PREFIX}" "${CMAKE_PREFIX_PATH}" ${QT5_PKG_CONFIG}_LDFLAGS_OTHER "${${QT5_PKG_CONFIG}_LDFLAGS_OTHER}") STRING(REPLACE "${QT5_PKG_CONFIG_Qt5Core_PREFIX}" "${CMAKE_PREFIX_PATH}" ${QT5_PKG_CONFIG}_LIBRARIES "${${QT5_PKG_CONFIG}_LIBRARIES}")