It seems that the names of the PRIVATE dependencies of a library are not
affected by either the NAMESPACE option or the EXPORT_NAME property. A
minimal example:
add_library(one STATIC ...)
add_library(two STATIC ...)
target_link_libraries(two PRIVATE one)
install(TARGETS one two EXPORT targets DESTINATION lib)
install(EXPORT targets NAMESPACE ns:: DESTINATION cmake)
The generated `targets.cmake` describes the dependency relation with:
set_target_properties(ns::two PROPERTIES
INTERFACE_LINK_LIBRARIES "\$<LINK_ONLY:one>"
)
That is, it uses `one` instead of `ns::one`. Changing the EXPORT_NAME of
`one` has no effect either.
It works find if I replace PRIVATE with PUBLIC or INTERFACE (of course
there'll be no more LINK_ONLY genexp in that case).
Is this really a bug or did I miss something? I also searched Mantis and
haven't found anything related.
Tamas
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers