INCLUDE_DIRECTORIES(${LIBGIT2_INCLUDES})
INCLUDE_DIRECTORIES(SYSTEM ${LIBGIT2_SYSTEM_INCLUDES})

FILE(GLOB LG2_SOURCES *.c *.h)
ADD_EXECUTABLE(lg2 ${LG2_SOURCES})
SET_TARGET_PROPERTIES(lg2 PROPERTIES C_STANDARD 90)

# Ensure that we do not use deprecated functions internally
ADD_DEFINITIONS(-DGIT_DEPRECATE_HARD)

IF(WIN32 OR ANDROID)
	TARGET_LINK_LIBRARIES(lg2 git2)
ELSE()
	TARGET_LINK_LIBRARIES(lg2 git2 pthread)
ENDIF()
