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

Tweak USE_SYSTEM_xxx support #403

Merged
merged 5 commits into from
Apr 19, 2024
Merged

Conversation

res2k
Copy link
Contributor

@res2k res2k commented Apr 17, 2024

The USE_SYSTEM_xxx logic wasn't always picking up the libs - see e.g. b8fd774#r141076760

In general, comparing the CMake module documentation with what the "package find" mechanism would provide, and what was actually linked, it seems those were actually "direct library links" instead of CMake target links.

Anyhow, I changed the CMake targets around a bit to get "wrapper" targets that pull in either the documented outputs from CMake's module detection (if "system lib" was chosen), or the "extern" library as produced "in build".
This has also the benefit that consumers of libs don't have to concern themselves with knowing which variant is taken, making src/CMakeLists.txt a bit cleaner.

Copy link
Contributor

@runlevel5 runlevel5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much thanks for improving my works

@apanteleev apanteleev merged commit b1ed071 into NVIDIA:master Apr 19, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants