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
1f4f4d17
Commit
1f4f4d17
authored
Jul 01, 2011
by
Tim Harder
Committed by
Vicent Marti
Jul 01, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake: Use system zlib if found on non-Windows systems
parent
ec626853
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
CMakeLists.txt
+14
-3
No files found.
CMakeLists.txt
View file @
1f4f4d17
...
...
@@ -22,7 +22,19 @@ STRING(REGEX REPLACE "^.*LIBGIT2_VERSION \"[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1"
SET
(
LIBGIT2_VERSION_STRING
"
${
LIBGIT2_VERSION_MAJOR
}
.
${
LIBGIT2_VERSION_MINOR
}
.
${
LIBGIT2_VERSION_REV
}
"
)
# Find required dependencies
INCLUDE_DIRECTORIES
(
deps/zlib src include
)
INCLUDE_DIRECTORIES
(
src include
)
IF
(
NOT WIN32
)
FIND_PACKAGE
(
ZLIB
)
ENDIF
()
IF
(
ZLIB_FOUND
)
INCLUDE_DIRECTORIES
(
${
ZLIB_INCLUDE_DIRS
}
)
LINK_LIBRARIES
(
${
ZLIB_LIBRARIES
}
)
ELSE
(
ZLIB_FOUND
)
INCLUDE_DIRECTORIES
(
deps/zlib
)
ADD_DEFINITIONS
(
-DNO_VIZ -DSTDC -DNO_GZIP
)
FILE
(
GLOB SRC_ZLIB deps/zlib/*.c
)
ENDIF
()
# Installation paths
SET
(
INSTALL_BIN bin CACHE PATH
"Where to install binaries to."
)
...
...
@@ -61,7 +73,6 @@ ENDIF()
# Collect sourcefiles
FILE
(
GLOB SRC src/*.c
)
FILE
(
GLOB SRC_ZLIB deps/zlib/*.c
)
FILE
(
GLOB SRC_H include/git2/*.h
)
# On Windows use specific platform sources
...
...
@@ -70,7 +81,7 @@ IF (WIN32 AND NOT CYGWIN)
FILE
(
GLOB SRC src/*.c src/win32/*.c
)
ENDIF
()
ADD_DEFINITIONS
(
-D_FILE_OFFSET_BITS=64
-DNO_VIZ -DSTDC -DNO_GZIP
)
ADD_DEFINITIONS
(
-D_FILE_OFFSET_BITS=64
)
# Compile and link libgit2
ADD_LIBRARY
(
git2
${
SRC
}
${
SRC_ZLIB
}
)
...
...
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