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

Author: Xenofon Karamanos <[email protected]>
Committer: Xenofon Karamanos <[email protected]>
Date: 2026-01-30T14:17:27Z

cmake: Add unistring module

- Add as a find_package to allow easier custom installs

---

Added: cmake/modules/FindUnistring.cmake

---

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

---

diff --git a/cmake/modules/FindUnistring.cmake 
b/cmake/modules/FindUnistring.cmake
new file mode 100644
index 00000000000..9303146b7d5
--- /dev/null
+++ b/cmake/modules/FindUnistring.cmake
@@ -0,0 +1,31 @@
+# https://github.com/fsaric/libsentences/blob/master/cmake/FindUnistring.cmake
+# - Find UNISTRING
+# Find the unistring includes and library
+#
+#  Unistring_INCLUDE_DIRS - where to find unistr.h, etc.
+#  Unistring_LIBRARIES     - unistring library.
+#  Unistring_FOUND       - True if unistring found.
+#
+# Hints:
+#   Unistring_ROOT=/path/to/unistring/installation
+
+find_path(Unistring_INCLUDE_DIRS unistr.h DOC "Path to unistring include 
directory")
+
+find_library(
+  Unistring_LIBRARIES
+  NAMES unistring libunistring
+  DOC "Path to unistring library"
+)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Unistring DEFAULT_MSG Unistring_LIBRARIES 
Unistring_INCLUDE_DIRS)
+
+# Create the Unistring::Unistring imported target
+if(Unistring_FOUND)
+  add_library(Unistring::Unistring UNKNOWN IMPORTED)
+  set_target_properties(
+    Unistring::Unistring PROPERTIES INTERFACE_INCLUDE_DIRECTORIES 
"${Unistring_INCLUDE_DIRS}"
+                                    IMPORTED_LOCATION "${Unistring_LIBRARIES}"
+  )
+endif()
+mark_as_advanced(Unistring_LIBRARIES Unistring_INCLUDE_DIRS)

_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to