Skip to content

build: Add support for CMake builds#89

Open
gulfemsavrun wants to merge 2 commits intoLinaro:masterfrom
gulfemsavrun:add-cmake-support
Open

build: Add support for CMake builds#89
gulfemsavrun wants to merge 2 commits intoLinaro:masterfrom
gulfemsavrun:add-cmake-support

Conversation

@gulfemsavrun
Copy link
Copy Markdown

  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.

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.
@mikel-armbb
Copy link
Copy Markdown
Contributor

Hi,
I've tried out the cmake patch you provided on linux initially. It works in as far as it goes. However the lack of building the .so files etc for linux is an issue - any build update needs to be comprehensive and produce the same output per platform as the original build process.

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

@mikel-armbb
Copy link
Copy Markdown
Contributor

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.
@gulfemsavrun
Copy link
Copy Markdown
Author

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

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants