Hey Daniel,

Thank you for your taking the time to provide feedback.
CMake is the de-facto "build" system (it's actually a generator for 
buildsystems like make, ninja and so on) for C and C++ programs as far as i 
know. There are some alternatives, like Meson i think, that i am really not 
familiar with and not seen it in the wild enough.
So to answer your questions:
      - CMake currently builds only the files found in the src/core folder. For 
the modules, we will probably have to adopt each module separately to CMake. 
Not something difficult, i would say but there are lots of modules. Maybe you 
can suggest some modules we want to get it up and running for some initial 
set-up and to see how to properly adjust the workflow to CMake.
      - Most probably yes, i have seen CMake build docs with doxygen. I am not 
really familiar with our docs generator but i think as long as we use a 
well-know generator, we can have seperate targets for generating the Docs and 
probably custom files from the xml like Readme files.
      - At the end of the CMake integration, there should be no need for any of 
the Makefiles. CMake will generate the appropriate ones for make, ninja, Visual 
Studio or whatever build you choose (as long as it's supported by CMake) and 
use that for building the targets. At this point also, no makefiles  from 
repositort where used to build the core. When you run CMake in the build 
folder, it creates a new set of makefiles in there, that do the job.

I hope these clear some of your questions. If you need any more information or 
have any suggestions regarding modules/docs please let me know,
Xenofon

________________________________
From: Daniel-Constantin Mierla <mico...@gmail.com>
Sent: Wednesday, June 12, 2024 09:21
To: Kamailio (SER) - Development Mailing List <sr-dev@lists.kamailio.org>
Cc: Xenofon Karamanos <x...@gilawa.com>
Subject: Re: [sr-dev] Initial Support for CMake in Kamailio - Feedback Needed!


Hello,


thanks for spending time in this direction! Makefiles were for long supposed to 
get a review.


I am not familiar for CMake, but if it is considered a good option, I am fine 
with it. For now, a few questions:


  - is it already building the modules as well, or only the core for now?

  - can it be used also for building the docs (e.g., README files for modules)?

  - any of the old Makefiles need to be kept, or all of them will be replaced?


Cheers,
Daniel


On 11.06.24 18:11, Xenofon Karamanos via sr-dev wrote:
Hello all,

I've started working on integrating CMake as a build system for the Kamailio. 
This is an initial step towards potentially offering CMake as an alternative to 
the current build system across the entire Kamailio project.
Right now, the CMake configuration is quite basic and covers only the core 
module. It offers limited options described in Makefile.defs that are required 
to build the core module.
Some notes regarding the definitions can be found also in the 
CMakelists.notes<https://github.com/kamailio/kamailio/compare/master...cmake#diff-4e8ba0f2d53c1a8b57e416e35f56d4f66bbc82d8b8d9317e2a72f1dd395b9d03>
 that made the build failed and maybe it's good to remove from current 
Makefiles as well, if i am not wrong.
Before we consider extending it to other modules and components, i would like 
some feedback whether you find it useful at all.
You can find the initial CMake files in the cmake​ branch. Please take a look 
and feel free to share any feedback or suggestions. Your input will be much 
appreciated and nessecary if we want CMake as a build system.

For anyone wanting to try and compile using cmake, here are some basic 
instructions on how to get you started.
Checkout the cmake​ branch of kamailio repo.
Create a new folder, let's call it build.
mkdir build && cd build​
Then run CMake for the configuration
cmake ..​ (you can also then use  ccmake .​    for a visual of the offered 
options)
Build and install using make
      make -j4​
      make install
OR
Build and install using cmake
      cmake --build .
      cmake --install .

You can of course use the CMake variable CMAKE_INSTALL_PREFIX​ to change the 
installation paths as follows and of course other preprocessor defintions:
      cmake -DCMAKE_INSTALL_PREFIX=./kamailio-cmake -DUSE_TCP=0 ..​
This will install it in the build/kamailio-cmake​ folder but fails to build 
because USE_TCP is required for kamailio to build (Check CMakelists.notes).​

Thank you all for your continuous contributions and support. Looking forward to 
hearing your thoughts and insights.
Best regards,
Xenofon
https://github.com/kamailio/kamailio/tree/cmake
[https://repository-images.githubusercontent.com/15101579/2d895000-e695-11e9-943e-d6dd9ef49a41]<https://github.com/kamailio/kamailio/tree/cmake>
GitHub - kamailio/kamailio at 
cmake<https://github.com/kamailio/kamailio/tree/cmake>
Kamailio - The Open Source SIP Server for large VoIP and real-time 
communication platforms - - GitHub - kamailio/kamailio at cmake
github.com




_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to 
sr-dev-le...@lists.kamailio.org<mailto:sr-dev-le...@lists.kamailio.org>


--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy, Training and Development Services -- asipto.com
_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org

Reply via email to