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
22de81e6
Commit
22de81e6
authored
Jun 21, 2017
by
Andrey Davydov
Committed by
Patrick Steinhardt
Jun 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake: use `target_include_directories` for modern cmake
Apply `target_include_directories` when CMAKE_VERSION >= 2.8.12
parent
6b2133b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletions
+11
-1
CMakeLists.txt
+11
-1
No files found.
CMakeLists.txt
View file @
22de81e6
...
...
@@ -207,7 +207,6 @@ FILE(STRINGS "include/git2/version.h" GIT2_HEADER_SOVERSION REGEX "^#define LIBG
STRING
(
REGEX REPLACE
"^.*LIBGIT2_SOVERSION ([0-9]+)$"
"
\\
1"
LIBGIT2_SOVERSION
"
${
GIT2_HEADER_SOVERSION
}
"
)
# Find required dependencies
INCLUDE_DIRECTORIES
(
src include
)
IF
(
SECURITY_FOUND
)
# OS X 10.7 and older do not have some functions we use, fall back to OpenSSL there
...
...
@@ -619,6 +618,13 @@ TARGET_LINK_LIBRARIES(git2 ${GSSAPI_LIBRARIES})
TARGET_LINK_LIBRARIES(git2
${
ICONV_LIBRARIES
}
)
TARGET_OS_LIBRARIES(git2)
IF (
${
CMAKE_VERSION
}
VERSION_LESS 2.8.12)
INCLUDE_DIRECTORIES(src include)
SET(LIBGIT2_INNER_DIRECTORIES_ARE_INCLUDED TRUE)
ELSE()
TARGET_INCLUDE_DIRECTORIES(git2 PRIVATE src PUBLIC include)
ENDIF()
# Workaround for Cmake bug #0011240 (see http://public.kitware.com/Bug/view.php?id=11240)
# Win64+MSVC+static libs = linker error
IF(MSVC AND GIT_ARCH_64 AND NOT BUILD_SHARED_LIBS)
...
...
@@ -688,6 +694,10 @@ IF (BUILD_CLAR)
${
CLAR_PATH
}
/clar.c
PROPERTIES OBJECT_DEPENDS
${
CMAKE_CURRENT_BINARY_DIR
}
/clar.suite)
IF (NOT LIBGIT2_INNER_DIRECTORIES_ARE_INCLUDED)
INCLUDE_DIRECTORIES(src include)
ENDIF()
ADD_EXECUTABLE(libgit2_clar
${
SRC_H
}
${
SRC_GIT2
}
${
SRC_OS
}
${
SRC_CLAR
}
${
SRC_TEST
}
${
SRC_ZLIB
}
${
SRC_HTTP
}
${
SRC_REGEX
}
${
SRC_SSH
}
${
SRC_SHA1
}
)
TARGET_LINK_LIBRARIES(libgit2_clar
${
COREFOUNDATION_DIRS
}
)
...
...
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