Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
30455a56
Unverified
Commit
30455a56
authored
Jan 03, 2018
by
Patrick Steinhardt
Committed by
GitHub
Jan 03, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4439 from tiennou/fix/4352
cmake: create a dummy file for Xcode
parents
4964aea0
4969a672
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
src/CMakeLists.txt
+7
-5
No files found.
src/CMakeLists.txt
View file @
30455a56
...
@@ -3,11 +3,6 @@ IF(DEBUG_POOL)
...
@@ -3,11 +3,6 @@ IF(DEBUG_POOL)
ENDIF
()
ENDIF
()
ADD_FEATURE_INFO
(
debugpool GIT_DEBUG_POOL
"debug pool allocator"
)
ADD_FEATURE_INFO
(
debugpool GIT_DEBUG_POOL
"debug pool allocator"
)
# 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
# This variable will contain the libraries we need to put into
# libgit2.pc's Requires.private. That is, what we're linking to or
# libgit2.pc's Requires.private. That is, what we're linking to or
# what someone who's statically linking us needs to link to.
# what someone who's statically linking us needs to link to.
...
@@ -404,6 +399,13 @@ SET(LIBGIT2_INCLUDES ${LIBGIT2_INCLUDES} PARENT_SCOPE)
...
@@ -404,6 +399,13 @@ SET(LIBGIT2_INCLUDES ${LIBGIT2_INCLUDES} PARENT_SCOPE)
SET(LIBGIT2_LIBS
${
LIBGIT2_LIBS
}
PARENT_SCOPE)
SET(LIBGIT2_LIBS
${
LIBGIT2_LIBS
}
PARENT_SCOPE)
SET(LIBGIT2_LIBDIRS
${
LIBGIT2_LIBDIRS
}
PARENT_SCOPE)
SET(LIBGIT2_LIBDIRS
${
LIBGIT2_LIBDIRS
}
PARENT_SCOPE)
IF(XCODE_VERSION)
# This is required for Xcode to actually link the libgit2 library
# when using only object libraries.
FILE(WRITE
${
CMAKE_CURRENT_BINARY_DIR
}
/dummy.c "")
LIST(APPEND LIBGIT2_OBJECTS
${
CMAKE_CURRENT_BINARY_DIR
}
/dummy.c)
ENDIF()
# Compile and link libgit2
# Compile and link libgit2
LINK_DIRECTORIES(
${
LIBGIT2_LIBDIRS
}
)
LINK_DIRECTORIES(
${
LIBGIT2_LIBDIRS
}
)
ADD_LIBRARY(git2
${
WIN_RC
}
${
LIBGIT2_OBJECTS
}
)
ADD_LIBRARY(git2
${
WIN_RC
}
${
LIBGIT2_OBJECTS
}
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment