-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem including libmemcached in CMakeLists.txt #139
Comments
Also it might be a typo in
Probably should be:
For some reason it contains a project directory and that breaks the check (ld) |
Hi!
Thanks, that's very useful to know! I was learning CMake when I wrote all of this so, there might be some quirks!
Do you really need to include the source directory? I think CMake provides ways to build dep projects, or libmemcached should generate appropriate /usr/lib/cmake files on build/install.
No, I don't think so, see https://cmake.org/cmake/help/latest/command/macro.html and https://cmake.org/cmake/help/latest/command/function.html |
Nevertheless, thanks for your report. I'm open to bug fixes and PRs! |
I'm trying to add libmemcached target in my project by
and it seems that it fails to find _Configure:
that is included from
CMake/_Include
like so:I found that this fixes the issue:
And this is how I learned about difference :D
There is a difference between these variables. CMAKE_SOURCE_DIR does indeed refer to the folder where the top-level CMakeLists.txt is defined. However, PROJECT_SOURCE_DIR refers to the folder of the CMakeLists.txt containing the most recent project() command.
Thus in most cases PROJCET_SOURCE_DIR variable should be used
The text was updated successfully, but these errors were encountered: