mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-09 18:22:16 +00:00
Update install info and test resource path handling
This commit is contained in:
parent
032db4d015
commit
bfe0658ec6
@ -1,15 +1,15 @@
|
|||||||
# CMake build script for the libgit2 project
|
# CMake build script for the libgit2 project
|
||||||
# Peter Drahos 2010
|
|
||||||
#
|
#
|
||||||
# Building:
|
# Building (out of source build):
|
||||||
# > mkdir build && cd build
|
# > mkdir build && cd build
|
||||||
# > cmake .. && make -j3
|
# > cmake .. [-DSETTINGS=VALUE]
|
||||||
|
# > cmake --build .
|
||||||
#
|
#
|
||||||
# Testing:
|
# Testing:
|
||||||
# > ctest -V
|
# > ctest -V
|
||||||
#
|
#
|
||||||
# Install:
|
# Install:
|
||||||
# > make install
|
# > cmake --build . --target install
|
||||||
|
|
||||||
PROJECT(libgit2 C)
|
PROJECT(libgit2 C)
|
||||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
||||||
@ -87,6 +87,9 @@ INSTALL(FILES src/git2.h DESTINATION ${INSTALL_INC} )
|
|||||||
|
|
||||||
# Tests
|
# Tests
|
||||||
IF (BUILD_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()
|
ENABLE_TESTING()
|
||||||
# Find and build all tests
|
# Find and build all tests
|
||||||
INCLUDE_DIRECTORIES(tests)
|
INCLUDE_DIRECTORIES(tests)
|
||||||
|
11
README.md
11
README.md
@ -50,14 +50,21 @@ Optional dependency:
|
|||||||
|
|
||||||
* LibSSL <http://www.openssl.org/>
|
* 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
|
$ mkdir build && cd build
|
||||||
$ cmake ..
|
$ 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.
|
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
|
Building libgit2 - Unix systems
|
||||||
==================================
|
==================================
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user