Skip to content
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

CMake: Add package version file for installation #521

Closed
robamu opened this issue Mar 28, 2022 · 3 comments
Closed

CMake: Add package version file for installation #521

robamu opened this issue Mar 28, 2022 · 3 comments
Assignees

Comments

@robamu
Copy link
Contributor

robamu commented Mar 28, 2022

Hi,

CMake provides the option to write a package version file. The documentation for this can be found here.

I think this is really useful if FetchContent and find_package are used to find an installed ETL library. From what I have seen, I was not able to use the version feature, for example when providing a major version requirement like this:

find_package(etl 20 QUIET)

Could be that I misused the feature or did something wrong so correct me if I am wrong. If I omit the version number, CMake is able to find the installed ETL library without issues.

Also I think it would be nice if installation instructions are provided for CMake.

I followed the following steps to install a specific version of ETL

git clone https://github.com/ETLCPP/etl
cd etl
mkdir build && cd build
git checkout <someVersion>
cmake .. && cmake --install .
@jwellbelove
Copy link
Contributor

I will take a look, but I'm no expert in cmake.

@robamu
Copy link
Contributor Author

robamu commented Mar 29, 2022

I hope this is not already something you have been working on, but I opened a PR which introduces a little bit of version handling to the CMake file:
#522

@jwellbelove
Copy link
Contributor

Added 20.27.2

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

No branches or pull requests

2 participants