File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-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,13 @@ 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+ SET (LIBGIT2_INNER_DIRECTORIES_ARE_INCLUDED TRUE )
624+ ELSE ()
625+ TARGET_INCLUDE_DIRECTORIES (git2 PRIVATE src PUBLIC include )
626+ ENDIF ()
627+
622628# Workaround for Cmake bug #0011240 (see http://public.kitware.com/Bug/view.php?id=11240)
623629# Win64+MSVC+static libs = linker error
624630IF (MSVC AND GIT_ARCH_64 AND NOT BUILD_SHARED_LIBS )
@@ -688,6 +694,10 @@ IF (BUILD_CLAR)
688694 ${CLAR_PATH} /clar.c
689695 PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR} /clar.suite)
690696
697+ IF (NOT LIBGIT2_INNER_DIRECTORIES_ARE_INCLUDED)
698+ INCLUDE_DIRECTORIES (src include )
699+ ENDIF ()
700+
691701 ADD_EXECUTABLE (libgit2_clar ${SRC_H} ${SRC_GIT2} ${SRC_OS} ${SRC_CLAR} ${SRC_TEST} ${SRC_ZLIB} ${SRC_HTTP} ${SRC_REGEX} ${SRC_SSH} ${SRC_SHA1} )
692702
693703 TARGET_LINK_LIBRARIES (libgit2_clar ${COREFOUNDATION_DIRS} )
You can’t perform that action at this time.
0 commit comments