Skip to content

Commit da0b035

Browse files
authored
Merge pull request libgit2#6239 from libgit2/ethomson/cmake_libs
cmake: export libraries needed to compile against libgit2
2 parents 1327dbc + b08fe71 commit da0b035

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,14 @@ if(BUILD_FUZZERS)
131131
endif()
132132

133133

134+
# Export for people who use us as a dependency
135+
136+
if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
137+
set(LIBGIT2_DEPENDENCY_OBJECTS ${LIBGIT2_DEPENDENCY_OBJECTS} PARENT_SCOPE)
138+
set(LIBGIT2_SYSTEM_LIBS ${LIBGIT2_SYSTEM_LIBS} PARENT_SCOPE)
139+
endif()
140+
141+
134142
# Summary
135143

136144
feature_summary(WHAT ENABLED_FEATURES DESCRIPTION "Enabled features:")

0 commit comments

Comments
 (0)