Skip to content

Commit 34ec6f3

Browse files
authored
Merge pull request libgit2#4372 from pks-t/pks/xcode-linking
cmake: fix linking in Xcode with object libraries only
2 parents 9840dad + 0e70903 commit 34ec6f3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ IF(DEBUG_POOL)
22
SET(GIT_DEBUG_POOL 1)
33
ENDIF()
44

5-
SET(LIBGIT2_OBJECTS "")
5+
# Add the features.h file as a dummy. This is required for Xcode
6+
# to successfully build the libgit2 library when using only
7+
# object libraries.
8+
SET(LIBGIT2_OBJECTS "${CMAKE_CURRENT_BINARY_DIR}/git2/sys/features.h")
69

710
# This variable will contain the libraries we need to put into
811
# libgit2.pc's Requires.private. That is, what we're linking to or

0 commit comments

Comments
 (0)