redis-cpp
redis-cpp copied to clipboard
Avoid installing the library in a hard-coded folder in the root of the cmake project?
Hello! This is more of a question than an issue.
I'm using the library through the CPM "package manager". The static library is installed in a lib folder in the root of my project because of this line:
https://github.com/tdv/redis-cpp/blob/451c8add384d42e67ebfa36e0842f33fc949b0ef/CMakeLists.txt#L28
Could it make sense to use ${CMAKE_BINARY_DIR} instead of ${CMAKE_SOURCE_DIR}. This gives a library user more control over where the library is installed I think.
Of course adding the lib/ folder to my .gitignore file also solves my problem.
I'm not sure what the cmake best practice is here. Maybe there even is yet an other option that is even better.