diff --git a/cmake/OS_Detection.cmake b/cmake/OS_Detection.cmake
index 404702322ec46d21e8e00f20a40be20f7d6888b4..1adb88adb2e687e28d600d658b55fe461203832b 100644
--- a/cmake/OS_Detection.cmake
+++ b/cmake/OS_Detection.cmake
@@ -48,6 +48,14 @@ if(UNIX)
         add_definitions ("-DDAP_OS_DARWIN -DDARWIN -DDAP_OS_BSD")
         set(DARWIN ON)
         set(BSD ON)
+        if (${_CMAKE_OSX_SYSROOT_PATH} MATCHES "MacOS")
+            set(MACOS ON)
+            add_definitions("-DDAP_OS_MAC")
+        endif()
+        if (${_CMAKE_OSX_SYSROOT_PATH} MATCHES "iOS")
+            set(IOS ON)
+            add_definitions("-DDAP_OS_IOS")
+        endif()
     endif()
     
     if (${CMAKE_SYSTEM_NAME} MATCHES "BSD" )