From 6f9713a77c86b448e532d0210754619bab3f8dfd Mon Sep 17 00:00:00 2001 From: Ivan Komissarov Date: Wed, 26 Jun 2019 19:46:17 +0200 Subject: Fix compiling with project.withExamples:true on Mac First, if qbs.targetPlatform is set, it is desired to use a corresponding architecture (armv7 or arm64); otherwise x86_64 architecture is used. Second, when building in Qt Creator, xcode module can't be found (due to different profile settings) and sysroot is not set to point to the iPhoneOS.sdk which leads to unability to find some frameworks. Disable this example when using QtC. Change-Id: I9fe413e6feb8fe7cfc6ff2e58323b81d8bf06839 Reviewed-by: Qbs CI Bot Reviewed-by: Christian Kandeler --- examples/cocoa-touch-application/CocoaTouchApplication.qbs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/cocoa-touch-application/CocoaTouchApplication.qbs b/examples/cocoa-touch-application/CocoaTouchApplication.qbs index f8db6768f..cf0a273d5 100644 --- a/examples/cocoa-touch-application/CocoaTouchApplication.qbs +++ b/examples/cocoa-touch-application/CocoaTouchApplication.qbs @@ -52,11 +52,13 @@ import qbs 1.0 CppApplication { + Depends { name: "xcode"; required: false } Depends { condition: product.condition; name: "ib" } - condition: qbs.hostOS.contains("macos") + condition: qbs.hostOS.contains("macos") && xcode.present name: "Cocoa Touch Application" qbs.targetPlatform: "ios" + qbs.architecture: "arm64" cpp.useObjcPrecompiledHeader: true cpp.minimumIosVersion: "8.0" -- cgit v1.2.3