Module: kamailio
Branch: master
Commit: d86f05261c386f4147bb4177b80673ae4c0f45d3
URL:
https://github.com/kamailio/kamailio/commit/d86f05261c386f4147bb4177b80673a…
Author: Xenofon Karamanos <xk(a)gilawa.com>
Committer: Xenofon Karamanos <xk(a)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/d86f05261c386f4147bb4177b80673a…
Patch:
https://github.com/kamailio/kamailio/commit/d86f05261c386f4147bb4177b80673a…
---
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()