Module: kamailio
Branch: master
Commit: d86f05261c386f4147bb4177b80673ae4c0f45d3
URL: 
https://github.com/kamailio/kamailio/commit/d86f05261c386f4147bb4177b80673ae4c0f45d3

Author: Xenofon Karamanos <x...@gilawa.com>
Committer: Xenofon Karamanos <x...@gilawa.com>
Date: 2024-12-03T15:19:58Z

cmake: Rename macos.cmake to darwin

---

Added: cmake/os-specific/darwin.cmake

---

Diff:  
https://github.com/kamailio/kamailio/commit/d86f05261c386f4147bb4177b80673ae4c0f45d3.diff
Patch: 
https://github.com/kamailio/kamailio/commit/d86f05261c386f4147bb4177b80673ae4c0f45d3.patch

---

diff --git a/cmake/os-specific/darwin.cmake b/cmake/os-specific/darwin.cmake
new file mode 100644
index 00000000000..9fcc61f628d
--- /dev/null
+++ b/cmake/os-specific/darwin.cmake
@@ -0,0 +1,41 @@
+message(
+  STATUS
+    "Configuring for Darwin (Apple stationary operating systems (macOS, OS X, 
etc.)"
+)
+
+target_compile_definitions(
+  common
+  INTERFACE HAVE_SOCKADDR_SA_LEN
+            HAVE_GETHOSTBYNAME2
+            HAVE_UNION_SEMUN
+            HAVE_SCHED_YIELD
+            USE_ANON_MMAP
+            NDEBUG # NDEBUG used to turn off assert (assert wants to call
+            # eprintf which doesn't seem to be defined in any shared lib
+            HAVE_CONNECT_ECONNRESET_BUG
+            HAVE_TIMEGM
+            USE_SIGWAIT
+            HAVE_IP_MREQN
+)
+
+target_link_libraries(common INTERFACE resolv)
+
+message(STATUS "USE_FAST_LOCK = ${USE_FAST_LOCK}")
+if(NOT ${USE_FAST_LOCK})
+  target_compile_definitions(common INTERFACE USE_PTHREAD_MUTEX USE_SYSV_SEM)
+endif()
+
+set(CMAKE_MODULE_LINKER_FLAGS
+    "${CMAKE_MODULE_LINKER_FLAGS} -bundle -flat_namespace -undefined suppress"
+)
+set(CMAKE_SHARED_LINKER_FLAGS
+    "${CMAKE_SHARED_LINKER_FLAGS} -dynamiclib -flat_namespace -undefined 
suppress"
+)
+
+if(NOT DEFINED ${NO_SELECT})
+  target_compile_definitions(common INTERFACE HAVE_SELECT)
+endif()
+
+if(NOT DEFINED ${NO_KQUEUE})
+  target_compile_definitions(common INTERFACE HAVE_KQUEUE)
+endif()

_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to