summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2017-10-09 15:01:29 +0100
committerGitHub <noreply@github.com>2017-10-09 15:01:29 +0100
commit34ec6f3aeb1abc8f66b3154b39a36c959c852a46 (patch)
tree46141f23a352cc06e66ac005397259590d13dd2e
parent9840dad26706d5c9d9dcfb2de9251a7f05790ebf (diff)
parent0e709032f145dc1a8748095dd83850b21b73f0aa (diff)
downloadlibgit2-34ec6f3aeb1abc8f66b3154b39a36c959c852a46.tar.gz
Merge pull request #4372 from pks-t/pks/xcode-linking
cmake: fix linking in Xcode with object libraries only
-rw-r--r--src/CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index daecc5a84..db10e882b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -2,7 +2,10 @@ IF(DEBUG_POOL)
SET(GIT_DEBUG_POOL 1)
ENDIF()
-SET(LIBGIT2_OBJECTS "")
+# Add the features.h file as a dummy. This is required for Xcode
+# to successfully build the libgit2 library when using only
+# object libraries.
+SET(LIBGIT2_OBJECTS "${CMAKE_CURRENT_BINARY_DIR}/git2/sys/features.h")
# This variable will contain the libraries we need to put into
# libgit2.pc's Requires.private. That is, what we're linking to or