<div dir="ltr">Hi,<div><br></div><div>Let's say I have a project I cloned from github which uses CMake to build. What is the best way to link to said dependency assuming the dependency is already built and installed [1].</div><div><br></div><div>So let's say I have LibA that is a dependency to my ProjA. LibA has already been built. What would be the 'correct' way to find and include/link against LibA?</div><div><br></div><div>Currently, I inspect the install/ directory of the libraries, then specify the paths for the headers/libraries/DLLs manually. </div><div><br></div><div>However, considering the project has been built by CMake and CMake knows where the include/lib/DLL files are, I am hoping that there is a way to get another CMake project to use some auto-generated CMake files to figure out the location of the headers and libraries (and DLLs) so that ultimately, the command boils down to:</div><div><br></div><div>find_library(LibA Path/To/Install)</div><div># CMake now gives me variables such as LibA_INCLUDE_DIRS, LibA_LIB_DIRS or similar</div><div># so that I can easily include and link to the library</div><div><br></div><div>Thanks,<br></div><div>Saad</div><div><br></div><div>[1] And in case it matters, for all dependencies I override the CMAKE_INSTALL_PREFIX to be at the root of the dependency. So, if I build LibA located at D:/Deps/LibA, the install folder will be D:/Deps/LibA/install/.  <br></div></div>