summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/EventLoop')
-rw-r--r--Swiften/EventLoop/Cocoa/CocoaEvent.h2
-rw-r--r--Swiften/EventLoop/SConscript15
2 files changed, 10 insertions, 7 deletions
diff --git a/Swiften/EventLoop/Cocoa/CocoaEvent.h b/Swiften/EventLoop/Cocoa/CocoaEvent.h
index b3c3661..bede7ff 100644
--- a/Swiften/EventLoop/Cocoa/CocoaEvent.h
+++ b/Swiften/EventLoop/Cocoa/CocoaEvent.h
@@ -6,7 +6,7 @@
#pragma once
-#include <Cocoa/Cocoa.h>
+#include <Foundation/Foundation.h>
namespace Swift {
class Event;
diff --git a/Swiften/EventLoop/SConscript b/Swiften/EventLoop/SConscript
index 5d1c3cb..990b91b 100644
--- a/Swiften/EventLoop/SConscript
+++ b/Swiften/EventLoop/SConscript
@@ -7,11 +7,14 @@ sources = [
"SimpleEventLoop.cpp",
]
-if swiften_env["PLATFORM"] == "darwin" and swiften_env["target"] == "native":
- sources += [
- "Cocoa/CocoaEventLoop.mm",
- "Cocoa/CocoaEvent.mm"
- ]
-
objects = swiften_env.StaticObject(sources)
swiften_env.Append(SWIFTEN_OBJECTS = [objects])
+
+if swiften_env["PLATFORM"] == "darwin" :
+ myenv = swiften_env.Clone()
+ myenv.Append(CXXFLAGS = ["-fobjc-abi-version=2", "-fobjc-legacy-dispatch"])
+ objects = myenv.StaticObject([
+ "Cocoa/CocoaEventLoop.mm",
+ "Cocoa/CocoaEvent.mm"
+ ])
+ swiften_env.Append(SWIFTEN_OBJECTS = [objects])