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

Provide cmake-package #452

Closed
cNoNim opened this issue Jan 30, 2024 · 8 comments · Fixed by #453
Closed

Provide cmake-package #452

cNoNim opened this issue Jan 30, 2024 · 8 comments · Fixed by #453

Comments

@cNoNim
Copy link
Contributor

cNoNim commented Jan 30, 2024

Hello,

Maintaining conda-forge/glad-feedstock is my goal (conda-forge/glad-feedstock#7).

But I have an idea how to improve CMake support in upstream.
What do you think about translating cmake/CMakeLists.txt into GladConfig.cmake?

To ensure backward compatibility, we can set CMAKE_PREFIX_PATH to a new location of GladConfig.cmake and enable the use of python module from sources inside cmake/CMakeLists.txt.

If it's okay with you, I can provide PR.

@Dav1dde
Copy link
Owner

Dav1dde commented Jan 30, 2024

Thanks for the all the work you and all the other people do for packaging glad.

Unfortunately I have pretty much no idea about cmake and it has always been a pain for me to keep it up to date and usable, I always relied on community help for that.

Is this change something you need in the repo to make the packaging possible? I would prefer if the packaging was as much as possible independent from the glad repo.

That being said, if you can keep the changes backwards compatible and it improves the overall experience I am thankful for any contribution.

@cNoNim
Copy link
Contributor Author

cNoNim commented Jan 30, 2024

@Dav1dde you can review PR #453 is it ready
In reality, it's not necessary.
I have already prepared a PR for conda-forge at conda-forge/glad-feedstock#8.

But it seems to me that such a solution would simplify the overall experience.

After install python module and copy GladConfig.cmake
u just need

find_package(Glad REQUIRED)
glad_add_library(glad_gl_core_33 REPRODUCIBLE API gl:core=3.3)

@cNoNim
Copy link
Contributor Author

cNoNim commented Jan 30, 2024

Actually, for packaging u just need

patch CMakeLists.txt -> cmake.patch

and

mkdir -p $PREFIX/lib/cmake/Glad && cp $SRC_DIR/cmake/CMakeLists.txt $PREFIX/lib/cmake/Glad/GladConfig.cmake

In PR I just maintain backward compability

@cNoNim
Copy link
Contributor Author

cNoNim commented Feb 1, 2024

@Dav1dde

Sorry I don't want to create a separate issue for a small question.
It looks like there are some interesting CMake level improvements from the last release.
When will 2.0.5 be released?

@Dav1dde
Copy link
Owner

Dav1dde commented Feb 1, 2024

Thanks for your PR. Sorr been a bit busy/exhausted, I'll take a look on the weekend and make a new release for you.

@cNoNim
Copy link
Contributor Author

cNoNim commented Feb 2, 2024

It's not urgent. And thanks for your work.
Maybe we need to look deeper into the cmake packages.
For example, if you look at https://github.com/Tradias/asio-grpc/blob/master/cmake/asio-grpcConfig.cmake.in it looks more complicated, but I don't really understand what it's so complicated for.

Dav1dde pushed a commit that referenced this issue Feb 4, 2024
@Dav1dde
Copy link
Owner

Dav1dde commented Feb 4, 2024

Thanks for your work, merged and released 2.0.5!

@cNoNim
Copy link
Contributor Author

cNoNim commented Feb 4, 2024

Thanks!

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

Successfully merging a pull request may close this issue.

2 participants