I have laid out my project directory below,so when I do cmake build I get a linker error which I wasn't able to figure out. I get a linker error that LIBD cannot be found, although LIBB is successfully formed and APP executable only needs LIBB why is it throwing a linker error that it needs LIBD when trying to build APP?
|---CMakeLists.txt <==== add_subdirectory(source) , add_subdirectory(apps)
|---build
|---include
|---a.h
|---b.h
|---apps|
|---CMakeLists.txt
|---apps.cpp 1] target_link_libraries(APP PUBLIC LIBB) <==== linker error
LIBD not found
|---source
| |---CMakeLists.txt ===> 1]link_directories(PATH TO LIBD)
2]target_link_libraries(LIBA public LIBC) <== successful
3]target_link_libraries (LIBB public LIBA LIBD) <== successful
|---a.cpp
|---b.cpp
|---lib
| |---LIBD <===== static library