diff --git libs/CMakeLists.txt libs/CMakeLists.txt
index c0576fe..1a34bca 100644
--- libs/CMakeLists.txt
+++ libs/CMakeLists.txt
@@ -6,14 +6,12 @@ add_subdirectory(plasmaclock)
 if(${KDE_PLATFORM_PROFILE} STREQUAL "Desktop")
    add_subdirectory(kdm)
    add_subdirectory(plasmagenericshell)
-   if(NOT WIN32)
+   if(NOT WIN32 AND NOT CMAKE_SYSTEM_NAME MATCHES Darwin)
         add_subdirectory(taskmanager)
-   endif(NOT WIN32)
+   endif(NOT WIN32 AND NOT CMAKE_SYSTEM_NAME MATCHES Darwin)
 endif(${KDE_PLATFORM_PROFILE} STREQUAL "Desktop")
 
-if(NOT WIN32)
-    if (NOT CMAKE_SYSTEM_NAME MATCHES Darwin)
-        add_subdirectory(ksysguard)
-    endif (NOT CMAKE_SYSTEM_NAME MATCHES Darwin)
-endif(NOT WIN32)
+if(NOT WIN32 AND NOT CMAKE_SYSTEM_NAME MATCHES Darwin)
+    add_subdirectory(ksysguard)
+endif(NOT WIN32 AND NOT CMAKE_SYSTEM_NAME MATCHES Darwin)
 

