Skip to content

Commit

Permalink
dialplan: cmake - add pcre2
Browse files Browse the repository at this point in the history
  • Loading branch information
drTr0jan authored and henningw committed Feb 25, 2025
1 parent 41b2cba commit 1f3b450
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/modules/dialplan/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 1f3b450

Please sign in to comment.