<!-- Kamailio Pull Request Template -->
<!-- IMPORTANT: - for detailed contributing guidelines, read: https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md - pull requests must be done to master branch, unless they are backports of fixes from master branch to a stable branch - backports to stable branches must be done with 'git cherry-pick -x ...' - code is contributed under BSD for core and main components (tm, sl, auth, tls) - code is contributed GPLv2 or a compatible license for the other components - GPL code is contributed with OpenSSL licensing exception -->
#### Pre-Submission Checklist <!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply --> <!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above--> <!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list --> - [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 - [ ] Small bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist: <!-- Go over all points below, and after creating the PR, tick the checkboxes that apply --> - [ ] PR should be backported to stable branches - [x] Tested changes locally - [x] Related to issue #4041
#### Description <!-- Describe your changes in detail -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4059
-- Commit Summary --
* cmake: Link internal libraries to core and remove them from modules
-- File Changes --
M src/CMakeLists.txt (4) M src/lib/CMakeLists.txt (2) M src/lib/ims/CMakeLists.txt (2) M src/lib/srdb1/CMakeLists.txt (2) M src/lib/srdb2/CMakeLists.txt (2) M src/lib/trie/CMakeLists.txt (2) M src/modules/acc/CMakeLists.txt (2) M src/modules/alias_db/CMakeLists.txt (2) M src/modules/auth_db/CMakeLists.txt (2) M src/modules/avpops/CMakeLists.txt (1) M src/modules/carrierroute/CMakeLists.txt (1) M src/modules/cfg_db/CMakeLists.txt (1) M src/modules/cnxcc/CMakeLists.txt (2) M src/modules/cplc/CMakeLists.txt (2) M src/modules/db2_ldap/CMakeLists.txt (1) M src/modules/db2_ops/CMakeLists.txt (1) M src/modules/db_berkeley/CMakeLists.txt (1) M src/modules/db_cluster/CMakeLists.txt (1) M src/modules/db_flatstore/CMakeLists.txt (1) M src/modules/db_mongodb/CMakeLists.txt (1) M src/modules/db_oracle/CMakeLists.txt (1) M src/modules/db_perlvdb/CMakeLists.txt (1) M src/modules/db_postgres/CMakeLists.txt (1) M src/modules/db_redis/CMakeLists.txt (1) M src/modules/db_sqlite/CMakeLists.txt (2) M src/modules/db_text/CMakeLists.txt (2) M src/modules/db_unixodbc/CMakeLists.txt (2) M src/modules/dialog/CMakeLists.txt (1) M src/modules/dialplan/CMakeLists.txt (1) M src/modules/dispatcher/CMakeLists.txt (1) M src/modules/dmq/CMakeLists.txt (1) M src/modules/domain/CMakeLists.txt (1) M src/modules/domainpolicy/CMakeLists.txt (1) M src/modules/drouting/CMakeLists.txt (1) M src/modules/group/CMakeLists.txt (1) M src/modules/htable/CMakeLists.txt (1) M src/modules/imc/CMakeLists.txt (1) M src/modules/ims_auth/CMakeLists.txt (2) M src/modules/ims_charging/CMakeLists.txt (1) M src/modules/ims_dialog/CMakeLists.txt (1) M src/modules/ims_diameter_server/CMakeLists.txt (1) M src/modules/ims_icscf/CMakeLists.txt (1) M src/modules/ims_ipsec_pcscf/CMakeLists.txt (1) M src/modules/ims_isc/CMakeLists.txt (1) M src/modules/ims_ocs/CMakeLists.txt (1) M src/modules/ims_qos/CMakeLists.txt (1) M src/modules/ims_qos_npn/CMakeLists.txt (1) M src/modules/ims_usrloc_pcscf/CMakeLists.txt (1) M src/modules/ims_usrloc_scscf/CMakeLists.txt (1) M src/modules/kazoo/CMakeLists.txt (1) M src/modules/keepalive/CMakeLists.txt (1) M src/modules/lcr/CMakeLists.txt (1) M src/modules/matrix/CMakeLists.txt (1) M src/modules/mohqueue/CMakeLists.txt (1) M src/modules/mqueue/CMakeLists.txt (1) M src/modules/msilo/CMakeLists.txt (1) M src/modules/mtree/CMakeLists.txt (1) M src/modules/p_usrloc/CMakeLists.txt (1) M src/modules/pdt/CMakeLists.txt (1) M src/modules/permissions/CMakeLists.txt (1) M src/modules/pipelimit/CMakeLists.txt (1) M src/modules/prefix_route/CMakeLists.txt (1) M src/modules/presence/CMakeLists.txt (1) M src/modules/presence_xml/CMakeLists.txt (1) M src/modules/pua/CMakeLists.txt (1) M src/modules/rls/CMakeLists.txt (1) M src/modules/rtpengine/CMakeLists.txt (1) M src/modules/rtpproxy/CMakeLists.txt (1) M src/modules/sca/CMakeLists.txt (1) M src/modules/secfilter/CMakeLists.txt (1) M src/modules/sipcapture/CMakeLists.txt (1) M src/modules/siptrace/CMakeLists.txt (1) M src/modules/siputils/CMakeLists.txt (1) M src/modules/speeddial/CMakeLists.txt (1) M src/modules/sqlops/CMakeLists.txt (1) M src/modules/topos/CMakeLists.txt (1) M src/modules/uac/CMakeLists.txt (1) M src/modules/uid_auth_db/CMakeLists.txt (1) M src/modules/uid_avp_db/CMakeLists.txt (1) M src/modules/uid_domain/CMakeLists.txt (1) M src/modules/uid_gflags/CMakeLists.txt (1) M src/modules/uid_uri_db/CMakeLists.txt (1) M src/modules/uri_db/CMakeLists.txt (1) M src/modules/userblocklist/CMakeLists.txt (1) M src/modules/usrloc/CMakeLists.txt (1) M src/modules/utils/CMakeLists.txt (1) M src/modules/xcap_client/CMakeLists.txt (1) M src/modules/xcap_server/CMakeLists.txt (1) M src/modules/xhttp/CMakeLists.txt (2) M src/modules/xhttp_pi/CMakeLists.txt (1)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4059.patch https://github.com/kamailio/kamailio/pull/4059.diff
If I am not misunderstanding the PR and changes in some cmake-files, the internal libs are still compiled as libraries (.so files).
The target is to have them compiled as part of the core, so there will be just kamailio binary and no .so files other than the modules. In other words, the `.c` and `.h` files in the `src/lib/.../` are part of the core and, as an example. should be compiled into `kamailio` in the same way `src/core/mem/*.{c,h}` are compiled.
With the old-Makefiles, once I did the changes for #4041 , the core files are including the internal lib files, see:
- https://github.com/kamailio/kamailio/blob/master/src/Makefile.sources#L13-L2...
Ahh, ok no produced libraries at all and compile everything into the kamailio binary! I will make sure to update the PR accordingly.
@xkaraman pushed 1 commit.
88c5bd0c02afb3f46397de00e80ad6de5a3416bb cmake: Link internal libraries to core and remove them from modules
@miconda This should be as expected now. All the libs are compiled in the kamailio binary and the modules are linked against that.
Thanks! Fine for me to merge, any tunings that might be needed can be done later once testing
Merged #4059 into master.
Just a note, on a fresh checkout of kamailio there is currently a problem related to the generation of the parser files after this PR. @xkaraman is working on it.
@henningw This should be fixed in 9ff2bb869dafca8521a0da7f112c3846f86c5f7e.