I have projectA, into which I\'m importing a library with:
add_library(foo STATIC IMPORTED)
set_property(TARGET foo PROPERTY IMPORTED_LOCATION /path/to/foo.a)
>
You need to
foo from where it is built (to, say, foolibs.cmake)Instead of using /path/to/thislib.cmake directly (the export file generated by export(TARGETS thislib... create another one, thislib-and-deps.cmake which includes both:
include(<...>/foolibs.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/thislib.cmake)