-
Notifications
You must be signed in to change notification settings - Fork 2.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
CMake target with namespace #1234
Comments
I don't know much about cmake namespace target, but I'll investigate it late. |
I mention namespacing because, when people see |
See #1374 |
Is your feature request related to a problem? Please describe.
We found a case in our CMake script where
jsoncpp
, rather thanjsoncpp_lib
, is mistakenly used intarget_link_libraries()
.As a result, a system installed jsoncpp is linked by
-ljsoncpp
, not what we found withfind_package()
.Describe the solution you'd like
I think the more popular solution is to create namespaced targets like
jsoncpp::shared
andjsoncpp::static
, and maybe alsojsoncpp::jsoncpp
pointing to the default.Describe alternatives you've considered
Add a target
jsoncpp
equivalent tojsoncpp::jsoncpp
mentioned above, to shadow the file version ofjsoncpp
.The text was updated successfully, but these errors were encountered: