@linuxmaniac
I have pushed some new commits in https://github.com/kamailio/kamailio/tree/cmake. You should be able to install now properly all files related to groups using the above noted comment:
Provide all the groups in the configuration phase like you did before `-DMODULE_GROUP_NAME='KSTANDARD KJSON KPERL'`. Try using the K-variations, otherwise the components won't be defined for later. You can provide for example the `ALL` group but if you don't provide the `KJSON` as well, the component `KJSON` won't be there (only the `ALL`) even if the module is going to be compiled.
Then you proceed to build everything in one go, in the same build directory `cmake --build build_folder -j8` . (remember to use specific targets as well if you need non default files like dbschema for example).
and lastly to install a specific component you can use
`DESTDIR=path_to_folder cmake --install build_folder --component component_name` or the workaround for older versions: `DESTDIR=path_to_folder cmake -DCOMPONENT=component_name -P {your_build_dir}/cmake_install.cmake`
where component_name can be `kamailio-core` for installing everything related to core, such `kamctl`, `kamdbctl`, docs, man, configs, (if I didn't miss anything...) or any of the provided `MODULE_GROUP_NAME`.
For example:
Include groups KBERKELEY and KXML:
`cmake -S . -B build-comp -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DVERBOSE=off -DBUILD_DOC=OFF --fresh -DEXCLUDE_MODULES="db_oracle dnssec jwt microhttpd nats nsq ruxc secsipid_proc stirshaken tls_wolfssl app_lua" -DCMAKE_BUILD_TYPE="Debug" -DMODULE_GROUP_NAME="KBERKELEY KXML" -DINCLUDE_MODULES=""`
Build: `cmake --build build-comp -j8 [-t dbschema]` (Don't forget to build the `dbschema` target as well if you dbfiles to be installed as well)
Install: `DESTDIR=path_to_folder cmake --install build-comp --component KBERKELEY` will install anything related to berkeley
``` -- Install configuration: "Debug" -- Up-to-date: /home/xenofon/kamailio-cmake/kam6comp/lib/kamailio/modules/db_berkeley.so -- Up-to-date: /home/xenofon/kamailio-cmake/kam6comp/share/doc/kamailio/modules/README.db_berkeley -- Up-to-date: /home/xenofon/kamailio-cmake/kam6comp/lib/kamailio/kamctl/kamctl.db_berkeley -- Up-to-date: /home/xenofon/kamailio-cmake/kam6comp/lib/kamailio/kamctl/kamdbctl.db_berkeley -- Up-to-date: /home/xenofon/kamailio-cmake/kam6comp/share/kamailio/db_berkeley -- Up-to-date: /home/xenofon/kamailio-cmake/kam6comp/share/kamailio/db_berkeley/kamailio -- Installing: /home/xenofon/kamailio-cmake/kam6comp/share/kamailio/db_berkeley/kamailio/dr_gateways -- Installing: /home/xenofon/kamailio-cmake/kam6comp/share/kamailio/db_berkeley/kamailio/mohqueues .... -- Up-to-date: /home/xenofon/kamailio-cmake/kam6comp/sbin/kamdb_recover ```
and `DESTDIR=path_to_folder cmake --install build-comp --component kamailio-core` will install anything related to core
``` -- Install configuration: "Debug" -- Up-to-date: /home/xenofon/kamailio-cmake/kam6comp/sbin/kamailio -- Up-to-date: /home/xenofon/kamailio-cmake/kam6comp/share/doc/kamailio/README -- Up-to-date: /home/xenofon/kamailio-cmake/kam6comp/share/doc/kamailio/INSTALL -- kamailio.cfg already exists in /home/xenofon/kamailio-cmake/kam6comp/etc/kamailio/kamailio.cfg. Installing as kamailio.cfg.sample -- Up-to-date: /home/xenofon/kamailio-cmake/kam6comp/etc/kamailio/kamailio.cfg.sample -- Up-to-date: /home/xenofon/kamailio-cmake/kam6comp/lib/kamailio/kamctl/kamctl.base -- Up-to-date: /home/xenofon/kamailio-cmake/kam6comp/lib/kamailio/kamctl/kamctl.ctlbase -- Up-to-date: /home/xenofon/kamailio-cmake/kam6comp/lib/kamailio/kamctl/kamctl.rpcfifo -- Up-to-date: /home/xenofon/kamailio-cmake/kam6comp/lib/kamailio/kamctl/kamctl.ser -- Up-to-date: /home/xenofon/kamailio-cmake/kam6comp/lib/kamailio/kamctl/kamctl.sqlbase -- Installing: /home/xenofon/kamailio-cmake/kam6comp/sbin/kamctl -- Up-to-date: /home/xenofon/kamailio-cmake/kam6comp/lib/kamailio/kamctl/kamdbctl.base -- Installing: /home/xenofon/kamailio-cmake/kam6comp/sbin/kamdbctl -- kamctlrc already exists in/home/xenofon/kamailio-cmake/kam6comp/etc/kamailio/kamctlrc. Installing as kamctlrc.sample -- Up-to-date: /home/xenofon/kamailio-cmake/kam6comp/etc/kamailio/kamctlrc.sample -- Up-to-date: /home/xenofon/kamailio-cmake/kam6comp/sbin/kamcmd ```