From fbf1a42f4c328c599ceda0b52af2a3890bbbfd1c Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Tue, 15 Aug 2023 13:42:44 -0600 Subject: [PATCH] don't link libqtpcre2 if it doesn't exist (#597) --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c36952913..d5b685895 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,7 +83,10 @@ find_package(Qt5 COMPONENTS ${QT_DEPENDENCIES} REQUIRED) set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} ${Qt5Core_QTMAIN_LIBRARIES}) if(IOS) - list(APPEND BR_THIRDPARTY_LIBS "${_qt5Core_install_prefix}/lib/libqtpcre2.a") + set(QT_PCRE2_LIB "${_qt5Core_install_prefix}/lib/libqtpcre2.a") + if(EXISTS ${QT_PCRE2_LIB}) + list(APPEND BR_THIRDPARTY_LIBS "${QT_PCRE2_LIB}") + endif() endif() # Find OpenCV