Commit 9795a40f by Veeti Paananen

Use standard CMake variable names for installation paths

Rename INSTALL_INC and INSTALL_BIN to INCLUDE_INSTALL_DIR and
BIN_INSTALL_DIR, which are more commonly used. This is also
consistent with the variable for the library path which is
already LIB_INSTALL_DIR.
parent 350b83b6
...@@ -66,9 +66,9 @@ ELSE (ZLIB_FOUND) ...@@ -66,9 +66,9 @@ ELSE (ZLIB_FOUND)
ENDIF() ENDIF()
# Installation paths # Installation paths
SET(INSTALL_BIN bin CACHE PATH "Where to install binaries to.") SET(BIN_INSTALL_DIR bin CACHE PATH "Where to install binaries to.")
SET(LIB_INSTALL_DIR lib CACHE PATH "Where to install libraries to.") SET(LIB_INSTALL_DIR lib CACHE PATH "Where to install libraries to.")
SET(INSTALL_INC include CACHE PATH "Where to install headers to.") SET(INCLUDE_INSTALL_DIR include CACHE PATH "Where to install headers to.")
# Build options # Build options
OPTION (BUILD_SHARED_LIBS "Build Shared Library (OFF for Static)" ON) OPTION (BUILD_SHARED_LIBS "Build Shared Library (OFF for Static)" ON)
...@@ -170,13 +170,13 @@ ENDIF() ...@@ -170,13 +170,13 @@ ENDIF()
# Install # Install
INSTALL(TARGETS git2 INSTALL(TARGETS git2
RUNTIME DESTINATION ${INSTALL_BIN} RUNTIME DESTINATION ${BIN_INSTALL_DIR}
LIBRARY DESTINATION ${LIB_INSTALL_DIR} LIBRARY DESTINATION ${LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
) )
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libgit2.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig ) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libgit2.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig )
INSTALL(DIRECTORY include/git2 DESTINATION ${INSTALL_INC} ) INSTALL(DIRECTORY include/git2 DESTINATION ${INCLUDE_INSTALL_DIR} )
INSTALL(FILES include/git2.h DESTINATION ${INSTALL_INC} ) INSTALL(FILES include/git2.h DESTINATION ${INCLUDE_INSTALL_DIR} )
# Tests # Tests
IF (BUILD_CLAR) IF (BUILD_CLAR)
......
...@@ -66,9 +66,9 @@ For more advanced use or questions about CMake please read <http://www.cmake.org ...@@ -66,9 +66,9 @@ For more advanced use or questions about CMake please read <http://www.cmake.org
The following CMake variables are declared: The following CMake variables are declared:
- `INSTALL_BIN`: Where to install binaries to. - `BIN_INSTALL_DIR`: Where to install binaries to.
- `LIB_INSTALL_DIR`: Where to install libraries to. - `LIB_INSTALL_DIR`: Where to install libraries to.
- `INSTALL_INC`: Where to install headers to. - `INCLUDE_INSTALL_DIR`: Where to install headers to.
- `BUILD_SHARED_LIBS`: Build libgit2 as a Shared Library (defaults to ON) - `BUILD_SHARED_LIBS`: Build libgit2 as a Shared Library (defaults to ON)
- `BUILD_CLAR`: Build [Clar](https://github.com/tanoku/clar)-based test suite (defaults to ON) - `BUILD_CLAR`: Build [Clar](https://github.com/tanoku/clar)-based test suite (defaults to ON)
- `THREADSAFE`: Build libgit2 with threading support (defaults to OFF) - `THREADSAFE`: Build libgit2 with threading support (defaults to OFF)
......
libdir=@CMAKE_INSTALL_PREFIX@/@LIB_INSTALL_DIR@ libdir=@CMAKE_INSTALL_PREFIX@/@LIB_INSTALL_DIR@
includedir=@CMAKE_INSTALL_PREFIX@/@INSTALL_INC@ includedir=@CMAKE_INSTALL_PREFIX@/@INCLUDE_INSTALL_DIR@
Name: libgit2 Name: libgit2
Description: The git library, take 2 Description: The git library, take 2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment