diff --git a/src/libs/botan/botan.pro b/src/libs/botan/botan.pro index 04feb8d3292..48b3b2ea359 100644 --- a/src/libs/botan/botan.pro +++ b/src/libs/botan/botan.pro @@ -30,7 +30,7 @@ mingw { BOTAN_CXX_FLAGS = msvc: BOTAN_CXX_FLAGS += /wd4127 /wd4244 /wd4250 /wd4267 /wd4334 /wd4702 /wd4996 else: BOTAN_CXX_FLAGS += -Wno-unused-parameter -macos: BOTAN_CXX_FLAGS += -mmacosx-version-min=$$QMAKE_MACOSX_DEPLOYMENT_TARGET +macos: BOTAN_CXX_FLAGS += -mmacosx-version-min=$$QMAKE_MACOSX_DEPLOYMENT_TARGET -isysroot $$shell_quote($$QMAKE_MAC_SDK.macosx.Path) unix: BOTAN_CXX_FLAGS += -fPIC !isEmpty(BOTAN_CXX_FLAGS): OTHER_FLAGS += --cxxflags=$$shell_quote($$BOTAN_CXX_FLAGS) win32: OTHER_FLAGS += --link-method=hardlink diff --git a/src/libs/botan/botan.qbs b/src/libs/botan/botan.qbs index 04acfad0484..3872e900adb 100644 --- a/src/libs/botan/botan.qbs +++ b/src/libs/botan/botan.qbs @@ -6,6 +6,7 @@ Product { type: ["staticlibrary", "hpp"] Depends { name: "cpp" } Depends { name: "qtc" } + Depends { name: "xcode"; condition: qbs.toolchain.contains("xcode") } files: "update-botan.sh" Group { name: "Botan sources" @@ -47,8 +48,11 @@ Product { } else if (product.qbs.toolchain.contains("gcc")) cxxFlags.push("-Wno-unused-parameter"); - if (product.qbs.targetOS.contains("macos")) + if (product.qbs.targetOS.contains("macos")) { cxxFlags.push("-mmacosx-version-min=" + project.minimumMacosVersion); + if (product.qbs.toolchain.contains("xcode")) + cxxFlags.push("-isysroot", product.xcode.sdkPath); + } if (product.qbs.targetOS.contains("unix")) cxxFlags.push("-fPIC"); if (cxxFlags.length > 0)