-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[simbody] uniform target names and add usage #28863
Conversation
537b532
to
1773ade
Compare
1773ade
to
bb9c45e
Compare
set(SHARED_TARGET ${SimTKSIMBODY_LIBRARY_NAME}) | ||
-set(STATIC_TARGET ${SimTKSIMBODY_LIBRARY_NAME}_static) | ||
+set(STATIC_TARGET ${SimTKSIMBODY_LIBRARY_NAME}) | ||
set(SHARED_TARGET_VN ${SimTKSIMBODY_LIBRARY_NAME}${VN}) | ||
-set(STATIC_TARGET_VN ${SimTKSIMBODY_LIBRARY_NAME}${VN}_static) | ||
+set(STATIC_TARGET_VN ${SimTKSIMBODY_LIBRARY_NAME}${VN}) |
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.
Here and for SimTKcommon, SimTKmath:
The maintainer guidelines allow to rename binaries in order to have the same name for static vs. dynamic.
But IMO this doesn't extend to renaming exported CMake targets. The usage suggestion can use generator expressions, cf. zstd.
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 by me, but then does it even matter to rename the libraries if it is not related? The downstream user would just rely on the usage file no matter the library name. I would completely remove the patch to thin back the port in that case.
Simbody provides CMake targets: | ||
|
||
find_package(Simbody CONFIG REQUIRED) | ||
target_link_libraries(main PRIVATE SimTKcommon SimTKmath SimTKsimbody) |
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.
I would guess that the actual usage only needs SimTKsimbody(-static), if properly exported.
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 targets are indeed incremental (SimTKcommon ⊂ SimTKmath ⊂ SimTKsimbody). Though each target is seldom usable and I have seen libraries relying on a subset specifically. Unless CMake can strip correctly simbody if someone use math only, then IMO usage file should reflect that.
Describe the pull request
What does your PR fix?
N.A.
Which triplets are supported/not supported? Have you updated the CI baseline?
Same triplets as before on vcpkg side (i.e. !uwp)
Does your PR follow the maintainer guide?
Yes, applies the following
If you have added/updated a port: Have you run
./vcpkg x-add-version --all
and committed the result?Yes
If you are still working on the PR, open it as a Draft: https://github.blog/2019-02-14-introducing-draft-pull-requests/