summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-08-17 18:31:05 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-08-17 18:31:05 (GMT)
commit9e5cc663f5018c03fd2657284dfdd5e522d55cbf (patch)
treefe62c61dde4a9e359a1d0b2fa317934143775ee4
parent2e672f5eaadc7512adbac3fc57bd5e7c72029970 (diff)
downloadswift-9e5cc663f5018c03fd2657284dfdd5e522d55cbf.zip
swift-9e5cc663f5018c03fd2657284dfdd5e522d55cbf.tar.bz2
Also build examples when cross-compiling.
-rw-r--r--BuildTools/SCons/SConstruct10
-rw-r--r--Swiften/Examples/SConscript11
2 files changed, 10 insertions, 11 deletions
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index f8eda83..ce47b08 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -81,7 +81,7 @@ if env["debug"] :
env.Append(CCFLAGS = ["/Zi", "/MDd"])
env.Append(LINKFLAGS = ["/DEBUG"])
else :
- env.Append(CCFLAGS = "-g")
+ env.Append(CCFLAGS = ["-g"])
elif env["PLATFORM"] == "win32" :
env.Append(CCFLAGS = ["/MD"])
@@ -130,7 +130,7 @@ if env["PLATFORM"] == "win32" :
env["LINKCOM"] = [env["LINKCOM"], 'mt.exe -nologo -manifest ${TARGET}.manifest -outputresource:$TARGET;1']
env["SHLINKCOM"] = [env["SHLINKCOM"], 'mt.exe -nologo -manifest ${TARGET}.manifest -outputresource:$TARGET;2']
-if env["PLATFORM"] == "darwin" :
+if env["PLATFORM"] == "darwin" and not env["target"] in ["iphone-device", "iphone-simulator", "xcode"] :
env.Append(FRAMEWORKS = ["IOKit", "AppKit"])
# Testing
@@ -163,10 +163,10 @@ if target in ["iphone-device", "iphone-simulator", "xcode"] :
# Hard code values
env["XCODE_PLATFORM_DEVELOPER_BIN_DIR"] = "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin"
if target == "iphone-device":
- env["XCODE_ARCHFLAGS"] = ["-arch", "armv6"]
+ env["XCODE_ARCH_FLAGS"] = ["-arch", "armv6"]
sdkPart = "iPhoneOS"
else :
- env["XCODE_ARCHFLAGS"] = ["-arch", "i386"]
+ env["XCODE_ARCH_FLAGS"] = ["-arch", "i386"]
sdkPart = "iPhoneSimulator"
sdkVer = "4.0"
env["XCODE_SDKROOT"] = "/Developer/Platforms/" + sdkPart + ".platform/Developer/SDKs/" + sdkPart + sdkVer + ".sdk"
@@ -179,7 +179,7 @@ if target in ["iphone-device", "iphone-simulator", "xcode"] :
env.Append(LINKFLAGS = env["XCODE_ARCH_FLAGS"])
env.Append(CPPFLAGS = ["-isysroot", "$XCODE_SDKROOT"])
env.Append(FRAMEWORKS = ["CoreFoundation", "Foundation", "UIKit", "CoreGraphics"])
- env.Append(LINKFLAGS = ["-L\"$XCODE_SDKROOT/usr/lib\"", "-F\"$XCODE_SDKROOT/System/Library/Frameworks\"", "-F\"$XCODE_SDKROOT/System/Library/PrivateFrameworks\""])
+ env.Append(LINKFLAGS = env["XCODE_ARCH_FLAGS"] + ["-isysroot", "$XCODE_SDKROOT", "-L\"$XCODE_SDKROOT/usr/lib\"", "-F\"$XCODE_SDKROOT/System/Library/Frameworks\"", "-F\"$XCODE_SDKROOT/System/Library/PrivateFrameworks\""])
# Bit of a hack, because BOOST doesn't know the endianness for ARM
env.Append(CPPDEFINES = ["_LITTLE_ENDIAN"])
diff --git a/Swiften/Examples/SConscript b/Swiften/Examples/SConscript
index 07e4e15..1a06df2 100644
--- a/Swiften/Examples/SConscript
+++ b/Swiften/Examples/SConscript
@@ -2,9 +2,8 @@ Import("swiften_env")
myenv = swiften_env.Clone()
-if myenv["target"] == "native":
- SConscript(dirs = [
- "SendMessage",
- "ConnectivityTest",
- "LinkLocalTool",
- ])
+SConscript(dirs = [
+ "SendMessage",
+ "ConnectivityTest",
+ "LinkLocalTool",
+])