[CMake] Get find_package to choose INSTALLed libraries instead of libraries in the build folder

CHEVRIER, Marc marc.chevrier at sap.com
Fri Jan 12 02:57:13 EST 2018


Hi,

During install step, installed libraries and executables are relinked to generate binaries without absolute paths so installed artifacts are independent from your build tree.

During build step, build binaries are used as well as absolute paths so produced binaries can be used during build step (i.e. launching an executable produced) without requirements regarding paths settings (i.e. PATH or LD_LIBRARY_PATH).


From: CMake <cmake-bounces at cmake.org> on behalf of Saad Khattak <saadrustam at gmail.com>
Date: Thursday 11 January 2018 at 19:44
To: Cmake Mailing List <cmake at cmake.org>
Subject: [CMake] Get find_package to choose INSTALLed libraries instead of libraries in the build folder

Hi,

I would like find_package(MyLib) to link find the libraries found in the INSTALL folder instead of the build folder.

Currently, when I do a find_package(MyLib) and then target_link_libraries(target MyLib) the paths all point to MyLib's build folder and not the folder where MyLib's library/headers were installed.

Thank you,
Saad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180112/40499724/attachment.html>


More information about the CMake mailing list