build: Add support for CMake builds#89
Conversation
1) Add a root CMakeLists.txt file to provide cross-platform build support, making it easier to link against OpenCSD in large external projects. 2) Generate native CMake package files using OpenCSDConfig.cmake.in template.
|
Hi, The cmake install method installs far more header files than the linux install - at present the linux install only adds sufficient for using the c-api based library. There is also no uninstall option within the cmake solution In short, what you have provided may be sufficient for build into a larger project - adding cmake to the library should also allow a standalone build that produces the same results as the existing build. Regards Mike |
|
I've added an update on top of your original patch. Please look at and see if your requirements are still met. I do not think this is yet tested enough for the main upstream branch so may have to miss the next release. Mike |
1) Restrict installed headers to match the Makefile, ensuring only sufficient headers for using the C-API are installed. 2) Add an uninstall target to allow removing installed files.
Thanks for the feedback, Mike! I have just pushed a new commit that addresses your points regarding restricted header installation and the addition of the uninstall target. I have verified that these changes work on macOS, Linux, and Windows. Can you please clarify where exactly you pushed an update on top of my patch, as I was not able to find it in the PR commits or branches? |
Add a root CMakeLists.txt file to provide cross-platform build support, making it easier to link against OpenCSD in large external projects.
Generate native CMake package files using OpenCSDConfig.cmake.in template.