<div dir="ltr">Hi,<div><br></div><div style>Suppose I have two personal repositories: A and B. Repository B has a dependency on repository A i.e. repository A builds multiple libraries and repository B builds multiple libraries and executables. I can build 32-bit and 64-bit libraries/executables for both by having a &#39;build&#39; and &#39;buildx64&#39; projects generated by CMake. The libraries and executables are put in the default folders (e.g. repoA/build/src/libraryName/Debug and repoA/buildx64/src/library/Debug).</div>

<div style><br></div><div style>Repo B&#39;s executables depend on repo A&#39;s libraries and libraries in B. Linking with libraries within B is straightforward as CMake is able to figure out the necessary paths for the libraries B is building which B&#39;s executables depend on.</div>

<div style><br></div><div style>Repo B also depends on Repo A&#39;s libraries and all executables in B have to search for them. How do I go about this? Currently I am searching for each library by specifying its path:<br>

</div><div style><br></div><div style># I have a CACHE variable for the path to Repo A&#39;s build folder that the user must provide</div><div style>target_link_libraries(myProject repoAPath/build/src/LibName/${CMAKE_CFG_INTDIR}) </div>

<div style><br></div><div style>which feels like a very wrong way to go about linking with other libraries considering CMake is supposed to make the finding libraries part easier. I would appreciate clarification of the workflow in this case.</div>

<div style><br></div><div style>Thanks,</div><div style>Saad</div><div style><br></div><div style><br></div></div>