[CMake] How do I search for personal libraries?
Saad Khattak
saadrustam at gmail.com
Wed Apr 3 01:44:58 EDT 2013
Hi,
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 'build' and
'buildx64' 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).
Repo B's executables depend on repo A'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's
executables depend on.
Repo B also depends on Repo A'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:
# I have a CACHE variable for the path to Repo A's build folder that the
user must provide
target_link_libraries(myProject
repoAPath/build/src/LibName/${CMAKE_CFG_INTDIR})
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.
Thanks,
Saad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130403/ca2fff6c/attachment.htm>
More information about the CMake
mailing list