Module: kamailio Branch: master Commit: 1f3b45056caf298062c6fbe683660ac6c158331a URL: https://github.com/kamailio/kamailio/commit/1f3b45056caf298062c6fbe683660ac6...
Author: drTr0jan drtr0jan@yandex.ru Committer: Henning Westerholt hw@gilawa.com Date: 2025-02-25T11:50:31+01:00
dialplan: cmake - add pcre2
---
Modified: src/modules/dialplan/CMakeLists.txt
---
Diff: https://github.com/kamailio/kamailio/commit/1f3b45056caf298062c6fbe683660ac6... Patch: https://github.com/kamailio/kamailio/commit/1f3b45056caf298062c6fbe683660ac6...
---
diff --git a/src/modules/dialplan/CMakeLists.txt b/src/modules/dialplan/CMakeLists.txt index 9c8de963961..9d716f3ebb0 100644 --- a/src/modules/dialplan/CMakeLists.txt +++ b/src/modules/dialplan/CMakeLists.txt @@ -1,3 +1,14 @@ file(GLOB MODULE_SOURCES "*.c")
add_library(${module_name} SHARED ${MODULE_SOURCES}) + +find_package(pcre2 QUIET) +if(NOT pcre2_FOUND) + message(STATUS "PCRE2 library not found... looking with pkg-config") + find_package(PkgConfig REQUIRED) + # TODO: verify we want 8-bit libpcre2 + pkg_check_modules(pcre2 REQUIRED IMPORTED_TARGET libpcre2-8) + add_library(PCRE2::8BIT ALIAS PkgConfig::pcre2) +endif() + +target_link_libraries(${module_name} PRIVATE PCRE2::8BIT)