mirror of
https://github.com/oven-sh/bun
synced 2026-02-16 05:42:43 +00:00
- Add libgit2 CMake build target - Register bun:git native module - Implement JSGitRepository class with: - Constructor and static find/init methods - Properties: path, gitDir, isBare, isClean, head, branch - Methods: getCommit, status, add, commit - Implement JSGitCommit class with: - Properties: sha, shortSha, message, summary, author, committer, tree, parents - Methods: parent, isAncestorOf - Implement JSGitBranch class with: - Properties: name, fullName, isRemote, isHead, commit, upstream, ahead, behind - Methods: delete, rename - Implement JSGitSignature class with: - Properties: name, email, date, timezone - Methods: toString Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
43 lines
598 B
CMake
43 lines
598 B
CMake
register_repository(
|
|
NAME
|
|
libgit2
|
|
REPOSITORY
|
|
libgit2/libgit2
|
|
TAG
|
|
v1.9.0
|
|
)
|
|
|
|
set(LIBGIT2_CMAKE_ARGS
|
|
-DBUILD_SHARED_LIBS=OFF
|
|
-DBUILD_TESTS=OFF
|
|
-DBUILD_CLI=OFF
|
|
-DUSE_SSH=OFF
|
|
-DUSE_HTTPS=OFF
|
|
-DUSE_BUNDLED_ZLIB=OFF
|
|
-DUSE_ICONV=OFF
|
|
-DREGEX_BACKEND=builtin
|
|
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
|
-DCMAKE_INSTALL_LIBDIR=lib
|
|
)
|
|
|
|
if(WIN32)
|
|
list(APPEND LIBGIT2_CMAKE_ARGS
|
|
-DWIN32_LEAKCHECK=OFF
|
|
)
|
|
endif()
|
|
|
|
register_cmake_command(
|
|
TARGET
|
|
libgit2
|
|
TARGETS
|
|
git2
|
|
ARGS
|
|
${LIBGIT2_CMAKE_ARGS}
|
|
LIB_PATH
|
|
lib
|
|
LIBRARIES
|
|
git2
|
|
INCLUDES
|
|
include
|
|
)
|