Re: [CMake] Transitive dependencies of header libraries

2017-09-29 Thread paul via CMake
You need to do add the dependencies in the config.cmake file, which means you need to seperate the config and export file. So in your CMakeLists.txt, you would do: install(TARGETS myheaderonlylib EXPORT myheaderonlylib-targets DESTINATION include) install(EXPORT myheaderonlylib-targets DESTINATION

[CMake] Transitive dependencies of header libraries

2017-09-29 Thread Alberto Luaces
Hi, I have a header-only library which itself depends on another header-only library: ``` add_library(myheaderonlylib INTERFACE) target_include_directories(myheaderonlylib INTERFACE $ ) target_link_libraries(myheaderonlylib INTERFACE Eigen3::Eigen) install(TARGETS myheaderonlylib EXPORT myh