Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
bfe0658e
Commit
bfe0658e
authored
Dec 10, 2010
by
Peter Drahoš
Committed by
Vicent Marti
Dec 12, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update install info and test resource path handling
parent
032db4d0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
CMakeLists.txt
+7
-4
README.md
+9
-2
No files found.
CMakeLists.txt
View file @
bfe0658e
# CMake build script for the libgit2 project
# Peter Drahos 2010
#
# Building:
# Building
(out of source build)
:
# > mkdir build && cd build
# > cmake .. && make -j3
# > cmake .. [-DSETTINGS=VALUE]
# > cmake --build .
#
# Testing:
# > ctest -V
#
# Install:
# >
make
install
# >
cmake --build . --target
install
PROJECT
(
libgit2 C
)
CMAKE_MINIMUM_REQUIRED
(
VERSION 2.6
)
...
...
@@ -87,6 +87,9 @@ INSTALL(FILES src/git2.h DESTINATION ${INSTALL_INC} )
# Tests
IF
(
BUILD_TESTS
)
SET
(
TEST_RESOURCES
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/tests/resources"
CACHE PATH
"Path to test resources."
)
ADD_DEFINITIONS
(
-DTEST_RESOURCES=\
"
${
TEST_RESOURCES
}
\"
)
ENABLE_TESTING()
# Find and build all tests
INCLUDE_DIRECTORIES(tests)
...
...
README.md
View file @
bfe0658e
...
...
@@ -50,14 +50,21 @@ Optional dependency:
*
LibSSL
<http://www.openssl.org/>
On most
Unix
systems you can build the library using the following commands
On most systems you can build the library using the following commands
$ mkdir build && cd build
$ cmake ..
$
make install
$
cmake --build .
Alternatively you can point the CMake GUI tool to the CMakeLists.txt file and generate platform specific build project or IDE workspace.
To install the library you can specify the install prefix by setting:
$ cmake .. -DCMAKE_INSTALL_PREFIX=/install/prefix
$ cmake --build . --target install
For more advanced use or questions about CMake please read
<http://www.cmake.org/Wiki/CMake_FAQ>
.
Building libgit2 - Unix systems
==================================
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment