-
Notifications
You must be signed in to change notification settings - Fork 26
Initial support for exporting Config.cmake with targets #81
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
Conversation
48ff468 to
8415184
Compare
2740edc to
a67dd62
Compare
|
@thesamesam I would appreciate if you could look into this as well, alongside the maintainers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine.
I wonder how this could be tested, maybe even as part of the gitlab workflow? But in any case if you have tested the result so far, I'm fine with it.
I guess you could prepare a simple CMakeLists with I tested the result and have an MR pending for KMyMoney that will take advantage of it: https://invent.kde.org/office/kmymoney/-/merge_requests/165 |
| set(CMAKE_MODULE_PATH "${${CMAKE_FIND_PACKAGE_NAME}_CMAKE_MODULE_PATH_save}") | ||
| unset("${CMAKE_FIND_PACKAGE_NAME}_CMAKE_MODULE_PATH_save") | ||
| else() | ||
| find_dependency(OpenSP) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, the OpenSP module landed upstream? 🥳
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed it did, scheduled for 3.25 release.
a67dd62 to
bc74460
Compare
|
@cstim had to push a small fix for building statically. Namely, the EDIT: Also, had to fix case sensitivity issues re |
fd9178f to
fd4bb1e
Compare
|
Also removed |
fd4bb1e to
b5b22d7
Compare
|
@cstim any chance you could look into merging these and releasing a 0.10.8 over the weekend? I have a pending PR for vcpkg portfile and would love to have it merged to their master sometime soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changing target library name in lib/CMakeLists.txt doesn't get accepted by me. The resulting library file on Linux needs to continue to be libofx.so.7.0.2 but in order to achieve this, the add_library target's name must be ofx exactly and not LibOFX.
I'll check whether I can cherry-pick any of the other changes quickly, though...
| set(ofx_HEADERS ${ofx_HEADERS} win32.hh) | ||
| endif () | ||
|
|
||
| add_library(ofx ${ofx_SRCS} ${ofx_HEADERS}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, this change on Linux ends up in a file libLibOFX.so.7. The target name used in add_library shouldn't include the "lib..." prefix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough. I'll fix it and let you know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wondering what should the target name be? LibOFX::ofx, libofx::ofx or ofx::ofx? I feel like the latter is too generic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I managed to get it to be libofx::libofx and keep the libofx library name at the same time
0c6ebc9 to
45b59d9
Compare
45b59d9 to
b46d9eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, fine now. Thanks a lot!
This adds support for exporting a LibOfxConfig.cmake file, together with LibOfxConfigVersion.cmake and LibOfxTargets.cmake.
Fixes #74