Closed kulichkoff closed 2 weeks ago
I was looking through your CMakeLists.txt
and got the option to link the library statically
Added curlpp_static
instead of curlpp
:
target_link_libraries(currencier PUBLIC curlpp_static nlohmann_json)
What if I want to link the library as a external dependecy (or dynamically)?
What is the problem
cmake links your library (
curlpp
) with absolute path. The result ofldd ./my-binary
.I have created the issue here 'cause the another library is included well.
What behavior did I expect
cmake links
curlpp
library from/usr/lib/...
path or includes it right in binary file (which is preferable for my current purpose).About my project structure
I have a directory to store libraries right in project. Where curlpp is stored too. You could get my project repo from https://github.com/kulichkoff/currencier.
There is my root
CMakeLists.txt
I don't know how to solve the problem. I am new in C++ and cmake. I hope for help. Sorry for my grammar.