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
Incorrect re2Config.cmake.in for CMake 3.29 #488
Comments
Thanks for the patch! The use of
I must admit that I can't read CMake well enough to grok what's going on in commit Kitware/CMake@6ddf871, but should we be setting |
Hello, I've only had time fo a quick look at the docs and changes and they seems to indeed need that variable removal - which they used to recommend Edit: actually seems that that was there for a long time... I'll try to give a better response a tad later. Maybe that's the new cool thing to use. I'll analyze further as soon as I have a laptop on hand. |
Back with some more insights: it seems these are a valid choice: we also need to use the PATH_VARS thing inside the cmake configure file command: https://cmake.org/cmake/help/v3.28/module/CMakePackageConfigHelpers.html#example-generating-package-files I'll try to get my hands on a cmake 3.29.1 cause my 3.29 doesn't have the change made by Craig
I reckon we should AVOID the CMAKE_INSTALL_PREFIX and use these to ensure relocatable. There are other open source projects using these. Hope it helps, Cheers! |
Many thanks for digging into this! :D My apologies if this is a silly question, but... the |
hello, I just threw a random name there TBH (that at least seemed correct); it should adhere to the common practice I guess, unsure which that is, I'd have to dig a bit. EDIT: this seems to recommend <NAME>_INCLUDE_DIR; but as you mentioned I think using 'targets' you get what you need from those, so that variable might as well not exist |
Thanks for confirming! I will go ahead and delete that line. We can always revisit, obviously, if it turns out to be necessary for something. |
It was probably neither needed nor used and will start causing problems as of CMake 3.29, which removes `PACKAGE_PREFIX_DIR`. Fixes #488. Change-Id: I707dc903234309698a6745d2b61279fd3b7bd6dc
See google/re2#488 Co-authored-by: Jonathan Giannuzzi <jonathan@giannuzzi.me>
The expansion of
@PACKAGE_INIT@
has changed in CMake 3.29. Now${PACKAGE_PREFIX_DIR}
is not defined anymore, so re2Config.cmake.in fails to configure the package correctly. The following patch fixes the problem.The text was updated successfully, but these errors were encountered: