From 2d52572d8c8357a112326c4272822baf0569e3b6 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 4 Feb 2014 14:02:38 -0800 Subject: [PATCH 1/4] no need to build two xcode projects --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d2cffacb8..ff100f7a5 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ xapp: xcode config.gypi src macosx/llmr-app.gyp open macosx/build/Release/llmr.app # build iOS app with xcodebuild -iapp: xcode config.gypi src ios/llmr-app.gyp +iapp: config.gypi src ios/llmr-app.gyp deps/run_gyp ios/llmr-app.gyp -Goutput_dir=./out/ --depth=. --generator-output=./ -f xcode xcodebuild -project ./ios/llmr-app.xcodeproj # launch app with ios-sim? From 3070111392dfa9090f8ead283cec15e8d062ed7b Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 4 Feb 2014 14:04:58 -0800 Subject: [PATCH 2/4] xapp also only needs to build parent project --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ff100f7a5..5033b4fd7 100644 --- a/Makefile +++ b/Makefile @@ -15,11 +15,12 @@ app: config.gypi src macosx/llmr-app.gyp make -C build/macosx-make V=$(V) open build/macosx-make/out/Release/llmr.app +# build just xcode project for libllmr xcode: config.gypi llmr.gyp deps/run_gyp llmr.gyp -Goutput_dir=./out/ --depth=. --generator-output=./ -f xcode -# build OS X with xcodebuild -xapp: xcode config.gypi src macosx/llmr-app.gyp +# build OS X app with xcodebuild +xapp: config.gypi src macosx/llmr-app.gyp deps/run_gyp macosx/llmr-app.gyp -Goutput_dir=./out/ --depth=. --generator-output=./ -f xcode xcodebuild -project ./macosx/llmr-app.xcodeproj open macosx/build/Release/llmr.app From bffb09c004fb27f79b9b96b128a83c6566c219c6 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 4 Feb 2014 14:21:18 -0800 Subject: [PATCH 3/4] beauty is a triple arch command line build --- common.gypi | 1 - ios/llmr-app.gyp | 4 ++-- llmr.gyp | 23 ++++++++++------------- 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/common.gypi b/common.gypi index e46cc2af5..a9e700c7b 100644 --- a/common.gypi +++ b/common.gypi @@ -5,7 +5,6 @@ 'CLANG_CXX_LIBRARY': 'libc++', 'CLANG_CXX_LANGUAGE_STANDARD':'c++11', 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', - 'ONLY_ACTIVE_ARCH': 1 }, 'cflags':['-std=c++11'], 'configurations': { diff --git a/ios/llmr-app.gyp b/ios/llmr-app.gyp index f812eb1d7..4dbf1fb30 100644 --- a/ios/llmr-app.gyp +++ b/ios/llmr-app.gyp @@ -28,12 +28,12 @@ ], }, 'xcode_settings': { + 'SDKROOT': 'iphoneos', + 'SUPPORTED_PLATFORMS':['iphonesimulator','iphoneos'], 'ARCHS': [ "armv7", "armv7s", "arm64" ], - 'SUPPORTED_PLATFORMS': [ 'iphoneos', 'iphonesimulator' ], 'OTHER_LDFLAGS': [ '-stdlib=libc++' ], - 'SDKROOT': 'iphoneos', 'INFOPLIST_FILE': 'Info.plist', 'CLANG_CXX_LIBRARY': 'libc++', 'CLANG_CXX_LANGUAGE_STANDARD':'c++11', diff --git a/llmr.gyp b/llmr.gyp index e1646e6cf..0daebcb5b 100644 --- a/llmr.gyp +++ b/llmr.gyp @@ -14,9 +14,12 @@ ], 'xcode_settings': { 'SDKROOT': 'macosx', - 'SUPPORTED_PLATFORMS':'macosx', + 'SUPPORTED_PLATFORMS':['macosx'], 'MACOSX_DEPLOYMENT_TARGET':'10.8', - 'PUBLIC_HEADERS_FOLDER_PATH': 'include' + 'PUBLIC_HEADERS_FOLDER_PATH': 'include', + 'OTHER_CPLUSPLUSFLAGS':[ + '<@(png_cflags)' + ] }, 'include_dirs':[ './include' @@ -24,11 +27,6 @@ 'cflags': [ '<@(png_cflags)' ], - 'xcode_settings': { - 'OTHER_CPLUSPLUSFLAGS':[ - '<@(png_cflags)' - ] - }, 'direct_dependent_settings': { 'include_dirs':[ './include' @@ -67,11 +65,15 @@ 'xcode_settings': { 'SDKROOT': 'iphoneos', 'SUPPORTED_PLATFORMS':['iphonesimulator','iphoneos'], + 'ARCHS': [ "armv7", "armv7s", "arm64" ], 'TARGETED_DEVICE_FAMILY': '1,2', 'CODE_SIGN_IDENTITY': 'iPhone Developer', 'IPHONEOS_DEPLOYMENT_TARGET': '5.0', 'PUBLIC_HEADERS_FOLDER_PATH': 'include', - 'GCC_INPUT_FILETYPE':'sourcecode.cpp.cpp' + 'GCC_INPUT_FILETYPE':'sourcecode.cpp.cpp', + 'OTHER_CPLUSPLUSFLAGS':[ + '<@(png_cflags)' + ] }, 'include_dirs':[ './include' @@ -79,11 +81,6 @@ 'cflags': [ '<@(png_cflags)' ], - 'xcode_settings': { - 'OTHER_CPLUSPLUSFLAGS':[ - '<@(png_cflags)' - ] - }, 'direct_dependent_settings': { 'include_dirs':[ './include' From e2ea6c52a77f04d9d4cf6e13867985276f19431d Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 4 Feb 2014 14:52:30 -0800 Subject: [PATCH 4/4] add target to build for simulator --- Makefile | 6 ++++++ ios/llmr-app.gyp | 2 +- llmr.gyp | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 5033b4fd7..f01f85add 100644 --- a/Makefile +++ b/Makefile @@ -31,6 +31,12 @@ iapp: config.gypi src ios/llmr-app.gyp xcodebuild -project ./ios/llmr-app.xcodeproj # launch app with ios-sim? +isim: config.gypi src ios/llmr-app.gyp + deps/run_gyp ios/llmr-app.gyp -Goutput_dir=./out/ --depth=. --generator-output=./ -f xcode + xcodebuild -project ./ios/llmr-app.xcodeproj -arch i386 -sdk iphonesimulator + # does not work + #"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app/Contents/MacOS/iPhone Simulator" -SimulateApplication ios/build/Release-iphonesimulator/llmr.app/llmr + clean: -rm -rf out -rm -rf build diff --git a/ios/llmr-app.gyp b/ios/llmr-app.gyp index 4dbf1fb30..7649727fe 100644 --- a/ios/llmr-app.gyp +++ b/ios/llmr-app.gyp @@ -30,7 +30,7 @@ 'xcode_settings': { 'SDKROOT': 'iphoneos', 'SUPPORTED_PLATFORMS':['iphonesimulator','iphoneos'], - 'ARCHS': [ "armv7", "armv7s", "arm64" ], + 'ARCHS': [ "armv7", "armv7s", "arm64", "i386" ], 'OTHER_LDFLAGS': [ '-stdlib=libc++' ], diff --git a/llmr.gyp b/llmr.gyp index 0daebcb5b..fa8fc07d3 100644 --- a/llmr.gyp +++ b/llmr.gyp @@ -64,8 +64,8 @@ ], 'xcode_settings': { 'SDKROOT': 'iphoneos', - 'SUPPORTED_PLATFORMS':['iphonesimulator','iphoneos'], - 'ARCHS': [ "armv7", "armv7s", "arm64" ], + 'SUPPORTED_PLATFORMS':['iphonesimulator','iphoneos',], + 'ARCHS': [ "armv7", "armv7s", "arm64", "i386" ], 'TARGETED_DEVICE_FAMILY': '1,2', 'CODE_SIGN_IDENTITY': 'iPhone Developer', 'IPHONEOS_DEPLOYMENT_TARGET': '5.0',