forked fromglynos/cpp-netlib
- Notifications
You must be signed in to change notification settings - Fork425
Open
Description
The targets exported via the CMakeConfig file should have a double-colon (::) in the name. eg: "cppnetlib::uri", "cppnetlib::server-parsers", etc.
The reason for this is that CMake uses the presence of :: in the name to deduce that a name is an imported target, even if that target does not exist. So if a user mistypes cppnetlib::uri as cpnetlib::uri, CMake will complain at configure time. However, if a user mistypes cppnetlib-uri as cpnetlib-uri, CMake will just tell the link to link to -lcpnetlib-uri, and the build will fail.
This can be done by using the NAMESPACE argument in the export(TARGETS) call.