8000 Add cmake package targets by bmarques1995 · Pull Request #6840 · libgit2/libgit2 · GitHub
[go: up one dir, main page]

Skip to content

Add cmake package targets #6840

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

Merged
merged 4 commits into from
Dec 28, 2024
Merged

Add cmake package targets #6840

merged 4 commits into from
Dec 28, 2024

Conversation

bmarques1995
Copy link
Contributor

These changes will let the user call the command find_package(libgit2) when the library is installed, this can be use as a
guarantee that the package is properly installed.

@bmarques1995 bmarques1995 force-pushed the main branch 2 times, most recently from 966e4f3 to dfc4d4b Compare July 3, 2024 11:59
@emmett2020
Copy link

Any progress on this PR? This's really helpful to someone who wants to get libgit2 easily used in a CMake based project.

@bmarques1995
Copy link
Contributor Author
bmarques1995 commented Nov 6, 2024

Any progress on this PR? This's really helpful to someone who wants to get libgit2 easily used in a CMake based project.

The task is ready, but needs to be accepted

@bmarques1995 bmarques1995 mentioned this pull request Dec 23, 2024
@@ -53,4 +53,4 @@ if(MSVC_IDE)
set_source_files_properties(win32/precompiled.c COMPILE_FLAGS "/Ycprecompiled.h")
endif()

install(TARGETS git2_cli RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS git2_cli EXPORT ${LIBGIT2_TARGETS_EXPORT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious why we'd export the CLI targets? How would somebody make use of this and why would they want it? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct, for the git cli, the export is unnecessary.

@ethomson
Copy link
Member

Thanks for your patience. Every time I look at cmake, my eyes glaze over, and I need to go lie down. Just one question to start with about the CLI.

@ethomson ethomson merged commit 5d6e679 into libgit2:main Dec 28, 2024
@ethomson
Copy link
Member

Thanks for the fix! This will land in v1.9.

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

Successfully merging this pull request may close these issues.

3 participants
0