mirror of
https://git.proxmox.com/git/libgit2
synced 2026-01-08 21:27:44 +00:00
Create ANDROID build option
CMake seems not to support Android as a target and this option lets us test this in CMakeLists.txt.
This commit is contained in:
parent
ac2e7dc6fb
commit
82b2fc2c83
@ -29,6 +29,8 @@ OPTION( PROFILE "Generate profiling information" OFF )
|
||||
OPTION( ENABLE_TRACE "Enables tracing support" OFF )
|
||||
OPTION( LIBGIT2_FILENAME "Name of the produced binary" OFF )
|
||||
|
||||
OPTION( ANDROID "Build for android NDK" OFF )
|
||||
|
||||
IF(MSVC)
|
||||
# This option is only available when building with MSVC. By default, libgit2
|
||||
# is build using the cdecl calling convention, which is useful if you're
|
||||
@ -127,7 +129,7 @@ IF (ENABLE_TRACE STREQUAL "ON")
|
||||
ENDIF()
|
||||
|
||||
# Include POSIX regex when it is required
|
||||
IF(WIN32 OR AMIGA)
|
||||
IF(WIN32 OR AMIGA OR ANDROID)
|
||||
INCLUDE_DIRECTORIES(deps/regex)
|
||||
SET(SRC_REGEX deps/regex/regex.c)
|
||||
ENDIF()
|
||||
@ -409,7 +411,7 @@ ENDIF ()
|
||||
IF (BUILD_EXAMPLES)
|
||||
FILE(GLOB_RECURSE EXAMPLE_SRC examples/network/*.c examples/network/*.h)
|
||||
ADD_EXECUTABLE(cgit2 ${EXAMPLE_SRC})
|
||||
IF(WIN32)
|
||||
IF(WIN32 OR ANDROID)
|
||||
TARGET_LINK_LIBRARIES(cgit2 git2)
|
||||
ELSE()
|
||||
TARGET_LINK_LIBRARIES(cgit2 git2 pthread)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user