Answer the question
In order to leave comments, you need to log in
How to build a project with cmake along with a third party library?
There is my project and there is a third-party lib from github with its own CMakeLists. I added this CMakelists via
add_subdirectorybut how do i run
maketo get lib.a and add it to the project?
Answer the question
In order to leave comments, you need to log in
What for?
If you link with her, then just call her by name. Inclusion via add_subdirectory implies that all links and dependencies are monitored by cmake. You just write target_link_libraries for your project with this either.
If "just collect" - then there is no need to turn it on at all. Instead of make, it is now customary to run cmake --build (because besides make there are all sorts of ninja and msbuild)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question