-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move to modern CMake version and techniques. #15
Comments
I started working on this but no promises: https://github.com/Dawars/LibRaw-cmake/tree/modern_cmake The samples build and tested raw-identify which works. I'm planning to further update dependencies to use the modern way. |
I do not know anything with submodules, so I cannot comment on that. I use git subrepo instead. I believe it should be 3.12. Reading the release notes of 3.12, it mentions that 3.12 adds imported targets for JPEG. So that the JPEG::JPEG target requires 3.12 to be defined. |
Thank you for your response. By submodules I mean that you can add a lib as a git submodule which links it to the repo. The cmake version is not final, I'd need to test it (3.1..11 is supposed to be a backwards compatible range https://cliutils.gitlab.io/modern-cmake/chapters/basics.html) Also it'd be a good idea to decide on the minimum version of cmake. Although it is "easy" to install the latest version, Ubuntu
I think these are relevant for most linux users. But if these are already too old then I would suggest to use the one that comes with the latest LTS. Alternatively, it is possible to manually add add the exported targets for earlier versions like this: https://cliutils.gitlab.io/modern-cmake/chapters/packages/OpenMP.html |
Thanks for the info on the cmake version backward range. I had not seen it before. I admit that I tend to go for a fairly recent version of CMake, since, as you mention, it is easy to install it, even on a remote system where I do not have administrator privileges. |
The minimum supported cmake version is now 3.12. I think everything mentioned in this issue has been implemented. The pull request is merged now. |
CMake 2.6.3 is rather antiquated, uses non-scalable constructs and cannot find OpenMP on Mac OS on its own for example.
CMake >= 3.12 is capable of finding OpenMP on Mac OS and can support the modern way of handling dependencies.
For basic improvements to support finding OpenMP and using OpenMP the modern way, the lines below are a brief outline of changes needed:
Other things could benefit from this modern/cleaner approach.
In particular, the install should probably be modernized also so that the target_link_library where libraw is used links with the required OpenMP libraries.
The text was updated successfully, but these errors were encountered: