diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2022-02-27 23:16:05 -0500 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2022-02-27 23:16:05 -0500 |
commit | b08fe71d3bc6d01e6e7f248bc01a6fc11fa03f4c (patch) | |
tree | c5924438cc7e52784f233099c234c5a9890e8ddf /CMakeLists.txt | |
parent | 1327dbcf2a4273a8ba6fd978db5f0882530af94d (diff) | |
download | libgit2-b08fe71d3bc6d01e6e7f248bc01a6fc11fa03f4c.tar.gz |
cmake: export libraries needed to compile against libgit2
If users are using us as a direct dependency (via `add_subdirectory`)
then they may want to know the libraries to link to; tell them.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 763bd437b..750b7089d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -131,6 +131,14 @@ if(BUILD_FUZZERS) endif() +# Export for people who use us as a dependency + +if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") + set(LIBGIT2_DEPENDENCY_OBJECTS ${LIBGIT2_DEPENDENCY_OBJECTS} PARENT_SCOPE) + set(LIBGIT2_SYSTEM_LIBS ${LIBGIT2_SYSTEM_LIBS} PARENT_SCOPE) +endif() + + # Summary feature_summary(WHAT ENABLED_FEATURES DESCRIPTION "Enabled features:") |