Commit 172a585f by Patrick Steinhardt

cmake: always use object library for git2internal

As we have bumped our minimum CMake version to 2.8.11, we can now
unconditionally make use of object libraries. So remove the version
check for the git2internal object library and always use it.
parent cf9f3452
...@@ -334,21 +334,16 @@ CONFIGURE_FILE(features.h.in git2/sys/features.h) ...@@ -334,21 +334,16 @@ CONFIGURE_FILE(features.h.in git2/sys/features.h)
SET(LIBGIT2_SOURCES ${SRC_H} ${SRC_GIT2} ${SRC_OS} ${SRC_SSH} ${SRC_SHA1}) SET(LIBGIT2_SOURCES ${SRC_H} ${SRC_GIT2} ${SRC_OS} ${SRC_SSH} ${SRC_SHA1})
IF (CMAKE_VERSION VERSION_GREATER 2.8.7) ADD_LIBRARY(git2internal OBJECT ${LIBGIT2_SOURCES})
ADD_LIBRARY(git2internal OBJECT ${LIBGIT2_SOURCES}) IDE_SPLIT_SOURCES(git2internal)
IDE_SPLIT_SOURCES(git2internal) LIST(APPEND LIBGIT2_OBJECTS $<TARGET_OBJECTS:git2internal>)
LIST(APPEND LIBGIT2_OBJECTS $<TARGET_OBJECTS:git2internal>)
IF (${CMAKE_VERSION} VERSION_LESS 2.8.12) IF (${CMAKE_VERSION} VERSION_LESS 2.8.12)
INCLUDE_DIRECTORIES(${LIBGIT2_INCLUDES})
ELSE()
TARGET_INCLUDE_DIRECTORIES(git2internal
PRIVATE ${LIBGIT2_INCLUDES}
PUBLIC ${CMAKE_SOURCE_DIR}/include)
ENDIF()
ELSE()
INCLUDE_DIRECTORIES(${LIBGIT2_INCLUDES}) INCLUDE_DIRECTORIES(${LIBGIT2_INCLUDES})
LIST(APPEND LIBGIT2_OBJECTS ${LIBGIT2_SOURCES}) ELSE()
TARGET_INCLUDE_DIRECTORIES(git2internal
PRIVATE ${LIBGIT2_INCLUDES}
PUBLIC ${CMAKE_SOURCE_DIR}/include)
ENDIF() ENDIF()
SET(LIBGIT2_OBJECTS ${LIBGIT2_OBJECTS} PARENT_SCOPE) SET(LIBGIT2_OBJECTS ${LIBGIT2_OBJECTS} PARENT_SCOPE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment