diff options
Diffstat (limited to 'SwifTools')
-rw-r--r-- | SwifTools/Idle/PlatformIdleQuerier.cpp | 9 | ||||
-rw-r--r-- | SwifTools/SConscript | 5 |
2 files changed, 9 insertions, 5 deletions
diff --git a/SwifTools/Idle/PlatformIdleQuerier.cpp b/SwifTools/Idle/PlatformIdleQuerier.cpp index 7213e77..a28e701 100644 --- a/SwifTools/Idle/PlatformIdleQuerier.cpp +++ b/SwifTools/Idle/PlatformIdleQuerier.cpp @@ -7,15 +7,14 @@ #include "SwifTools/Idle/PlatformIdleQuerier.h" #include "Swiften/Base/Platform.h" -#if defined(SWIFTEN_PLATFORM_MACOSX) +#if defined(SWIFTEN_PLATFORM_MACOSX) && defined(HAVE_IOKIT) #include "SwifTools/Idle/MacOSXIdleQuerier.h" #elif defined(SWIFTEN_PLATFORM_WINDOWS) #include "SwifTools/Idle/WindowsIdleQuerier.h" #elif defined(HAVE_XSS) #include "SwifTools/Idle/XSSIdleQuerier.h" -#else -#include "SwifTools/Idle/DummyIdleQuerier.h" #endif +#include "SwifTools/Idle/DummyIdleQuerier.h" #include <cassert> #include <iostream> @@ -24,7 +23,11 @@ namespace Swift { PlatformIdleQuerier::PlatformIdleQuerier() : querier(NULL) { #if defined(SWIFTEN_PLATFORM_MACOSX) +#if defined(HAVE_IOKIT) querier = new MacOSXIdleQuerier(); +#else + querier = new DummyIdleQuerier(); +#endif #elif defined(SWIFTEN_PLATFORM_WINDOWS) querier = new WindowsIdleQuerier(); #elif defined(HAVE_XSS) diff --git a/SwifTools/SConscript b/SwifTools/SConscript index 18781c3..7620879 100644 --- a/SwifTools/SConscript +++ b/SwifTools/SConscript @@ -36,8 +36,9 @@ if env["SCONS_STAGE"] == "build" : if myenv["PLATFORM"] == "win32" : sources += ["Idle/WindowsIdleQuerier.cpp"] - elif myenv["PLATFORM"] == "darwin" : - sources += ["Idle/MacOSXIdleQuerier.cpp"] + elif myenv["PLATFORM"] == "darwin" and myenv.get("HAVE_IOKIT", False) : + myenv.Append(CPPDEFINES = ["HAVE_IOKIT"]) + sources += ["Idle/MacOSXIdleQuerier.cpp"] elif myenv["HAVE_XSS"] : myenv.Append(CPPDEFINES = ["HAVE_XSS"]) sources += ["Idle/XSSIdleQuerier.cpp"] |