Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

39 lines (28 sloc) 0.754 kb
PROJECT(migit C)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
IF (NOT WIN32)
FIND_PACKAGE(ZLIB)
ENDIF()
IF (MSVC)
SET(CMAKE_C_FLAGS "/W4 /WX /nologo /Zi")
SET(CMAKE_C_FLAGS_DEBUG "/Od /DEBUG /MTd")
SET(CMAKE_C_FLAGS_RELEASE "/MT /O2")
ENDIF()
IF (ZLIB_FOUND)
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIRS})
LINK_LIBRARIES(${ZLIB_LIBRARIES})
ELSE (ZLIB_FOUND)
INCLUDE_DIRECTORIES(lib/libgit2/deps/zlib)
ADD_DEFINITIONS(-DNO_VIZ -DSTDC -DNO_GZIP)
ENDIF()
OPTION (BUILD_SHARED_LIBS OFF)
ADD_SUBDIRECTORY(lib)
SET(LIBGIT2_INCLUDE_DIR lib/libgit2/include)
SET(MIGIT_INCLUDE_DIR src)
INCLUDE_DIRECTORIES(
${LIBGIT2_INCLUDE_DIR}
${MIGIT_INCLUDE_DIR}
)
FILE(GLOB SRC src/*.c src/*.h)
ADD_EXECUTABLE(migit ${SRC})
TARGET_LINK_LIBRARIES(migit git2)
Jump to Line
Something went wrong with that request. Please try again.