8000 No longer possible to add libgit2 to another cmake project with add_subdirectory · Issue #4381 · libgit2/libgit2 · GitHub
[go: up one dir, main page]

Skip to content

No longer possible to add libgit2 to another cmake project with add_subdirectory #4381

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

Closed
hackhaslam opened this issue Oct 19, 2017 · 3 comments

Comments

@hackhaslam
Copy link
Contributor

Since #4282 (72f27cb in particular) it's no longer possible to add libgit2 to another cmake project with add_subdirectory. The uses of CMAKE_CURRENT_SOURCE_DIR changed to CMAKE_SOURCE_DIR which only works if libgit2 is the root project. I'd suggest that cmake list files in subdirectories that need to refer to the root of the libgit2 source tree should use libgit2_SOURCE_DIR instead.

@pks-t
Copy link
Member
pks-t commented Oct 20, 2017

Thanks for the bug report! I've simply assumed that CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR would be project-relative, but I should've checked that assumption. I've created #4382 to fix that issue.

@ethomson
Copy link
Member

Fixed via #4382

@hackhaslam
Copy link
Contributor Author

Thanks! That works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0