File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -207,7 +207,6 @@ FILE(STRINGS "include/git2/version.h" GIT2_HEADER_SOVERSION REGEX "^#define LIBG
207207STRING (REGEX REPLACE "^.*LIBGIT2_SOVERSION ([0-9]+)$" "\\ 1" LIBGIT2_SOVERSION "${GIT2_HEADER_SOVERSION} " )
208208
209209# Find required dependencies
210- INCLUDE_DIRECTORIES (src include )
211210
212211IF (SECURITY_FOUND)
213212 # OS X 10.7 and older do not have some functions we use, fall back to OpenSSL there
@@ -619,6 +618,12 @@ TARGET_LINK_LIBRARIES(git2 ${GSSAPI_LIBRARIES})
619618TARGET_LINK_LIBRARIES (git2 ${ICONV_LIBRARIES} )
620619TARGET_OS_LIBRARIES(git2)
621620
621+ IF (${CMAKE_VERSION} VERSION_LESS 2.8.12)
622+ INCLUDE_DIRECTORIES (src include )
623+ ELSE ()
624+ TARGET_INCLUDE_DIRECTORIES (git2 PRIVATE src PUBLIC include )
625+ ENDIF ()
626+
622627# Workaround for Cmake bug #0011240 (see http://public.kitware.com/Bug/view.php?id=11240)
623628# Win64+MSVC+static libs = linker error
624629IF (MSVC AND GIT_ARCH_64 AND NOT BUILD_SHARED_LIBS )
@@ -690,6 +695,10 @@ IF (BUILD_CLAR)
690695
691696 ADD_EXECUTABLE (libgit2_clar ${SRC_H} ${SRC_GIT2} ${SRC_OS} ${SRC_CLAR} ${SRC_TEST} ${SRC_ZLIB} ${SRC_HTTP} ${SRC_REGEX} ${SRC_SSH} ${SRC_SHA1} )
692697
698+ IF (${CMAKE_VERSION} VERSION_GREATER 2.8.11)
699+ TARGET_INCLUDE_DIRECTORIES (libgit2_clar PRIVATE src PUBLIC include )
700+ ENDIF ()
701+
693702 TARGET_LINK_LIBRARIES (libgit2_clar ${COREFOUNDATION_DIRS} )
694703 TARGET_LINK_LIBRARIES (libgit2_clar ${SECURITY_DIRS} )
695704 TARGET_LINK_LIBRARIES (libgit2_clar ${SSL_LIBRARIES} )
You can’t perform that action at this time.
0 commit comments