Hi,

I have the following setup:

ImportedLib (sets location of library files and public include directories)
LibA             (publicly includes ImporteLib with
target_link_libraries(...))
Exe              (finds LibA and links against it)

Where ImportedLib uses "set_target_properties(ImportedLib PROPERTIES
IMPORTED_LOCATION_DEBUG ... INTERFACE_INCLUDE_DIRECTORIES ...)" to set its
include directories and prebuilt libraries for linking.

LibA uses "target_link_libraries(LibA PUBLIC ImportedLib)". CMake correctly
generates the project such that LibA now has the include directories of the
ImportedLib. LibA then uses the "install(...)" feature so that "Exe" can
find LibA.

With Exe, I find LibA using "find_package(LibA REQUIRED)" and then
"target_link_libraries(Exe LibA)". Exe inherits LibA's include directories
and links against it. Exe is also able to link against ImportedLib.
However, what Exe does not inherit is the public include directories
specified by ImportedLib. This seems like a bug because it is able to know
about and is able to link against ImportLib prebuilt library files.

If it's not a bug, how do I make sure ImportedLib include directories are
propagated properly?

Regards,
Saad
-- 

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:
https://cmake.org/mailman/listinfo/cmake

Reply via email to