#### Pre-Submission Checklist - [x] Commit message has the format required by CONTRIBUTING guide - [x] Commits are split per component (core, individual modules, libs, utils, ...) - [x] Each component has a single commit (if not, squash them into one commit) - [x] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change - [x] Small bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist: - [x] PR should be backported to stable branches - [x] Tested changes locally - [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description Suggest small bugfixes for CMakeLists.txt for modules and libs.
- `lib/ims` - remove libxml2 as not needed as in 5eac8fd5356cc424d87cac4b4102c99e97054414. - `dialplan` - added pcre2 lib as a depend. - `sctp` - switched searching for libsctp for linux only after 9b7719a61ab02c93939e3681cb90e9fa04f3ac5d. There's no libsctp in FreeBSD while kernel module exists, example.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4155
-- Commit Summary --
* lib/ims: libxml2 is not needed - removed from cmake * dialplan: cmake - add pcre2 * sctp: cmake - search for libsctp on linux only
-- File Changes --
M src/lib/ims/CMakeLists.txt (2) M src/modules/dialplan/CMakeLists.txt (6) M src/modules/sctp/CMakeLists.txt (10)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4155.patch https://github.com/kamailio/kamailio/pull/4155.diff
@xkaraman commented on this pull request.
@@ -1,3 +1,9 @@
file(GLOB MODULE_SOURCES "*.c")
add_library(${module_name} SHARED ${MODULE_SOURCES}) + +find_package(PkgConfig REQUIRED) +pkg_check_modules(PCRE2 REQUIRED IMPORTED_TARGET libpcre2-8)
Since we are using `IMPORTED_TARGET`, let's use it properly in the `target_link_libraries` call. This will make sure all necessary includes, links and other options are used!
See https://github.com/xkaraman/kamailio/blob/cmake/src/modules/regex/CMakeLists... as a reference.
@drTr0jan pushed 2 commits.
eb918897d7efcd5b5f1e0cdecff2ea3d77235802 sctp: cmake - search for libsctp on linux only e1577208ffcbf2591354f31fe26bbf3851d85781 dialplan: cmake - add pcre2
@drTr0jan commented on this pull request.
@@ -1,3 +1,9 @@
file(GLOB MODULE_SOURCES "*.c")
add_library(${module_name} SHARED ${MODULE_SOURCES}) + +find_package(PkgConfig REQUIRED) +pkg_check_modules(PCRE2 REQUIRED IMPORTED_TARGET libpcre2-8)
Yep, you're right! Fixed. Thx!
xkaraman left a comment (kamailio/kamailio#4155)
Great thanks @drTr0jan! This can be merged from my side!
Merged #4155 into master.
drTr0jan left a comment (kamailio/kamailio#4155)
@miconda, why 1f3b45056caf298062c6fbe683660ac6c158331a and 41b2cba74a9fff204b2cc671670073d008b3c6b1 hasn't been cherry-picked to 6.0.1? Can you cherry-pick them to 6.0.2?
henningw left a comment (kamailio/kamailio#4155)
I have cherry-picked both commits to branch 6.0, they should be then included in the 6.0.2 release.
miconda left a comment (kamailio/kamailio#4155)
I haven't backported the cmake commits, I was not sure in what state cmake support is, I had the feeling there is a separate branch waiting to be merged, so I didn't want to mess up things. In general the backports are done a few days before the release so people can check if something is missing. I see that were just backported, so you can use the latest git branch. If you use debs, it is no impact there, they are built.
henningw left a comment (kamailio/kamailio#4155)
Good point with the cmake ranch, I will ask Xenofon tomorrow about the status and if there is anything left (might be something from the Debian packaging).
drTr0jan left a comment (kamailio/kamailio#4155)
Also 69086114ad6eee016d1b7634f37c5ef31d4543e0 cherry-pick will be great!
henningw left a comment (kamailio/kamailio#4155)
Also [6908611](https://github.com/kamailio/kamailio/commit/69086114ad6eee016d1b7634f37c5ef3...) cherry-pick will be great!
Done