c – cmake: How to link a static library in linux CMakeLists.txt when this library does not pre-exist but will be available at link time?

I have a target to build libxyz.a
add_subdirectory( “${SANDBOX}/xyz” “${PROJECT_BINARY_DIR}/out_xyz” )

and linking using
list( APPEND LINK_LIBS_LIST xyz)
#i need to link libpqr.a as well which is generated as a part of xyz lib.
list( APPEND LINK_LIBS_LIST pqr)

but when I use these library using target_link_libraries, cmake says “missing and no known rule to make it”

Thankx