summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2012-07-15 07:42:14 -0700
committerVicent Martí <vicent@github.com>2012-07-15 07:42:14 -0700
commitd4b573513c511584ca7e7f1f9c7731d7349aa3f2 (patch)
treef074499392887c8242b5a8aa342514dbb864f282
parent227f31311979a2fdb1ffc8dbcb4cf0737e7bc899 (diff)
parentb3237ac31313240272ee0d48a19b4edfdfc1d718 (diff)
downloadlibgit2-d4b573513c511584ca7e7f1f9c7731d7349aa3f2.tar.gz
Merge pull request #821 from nacho/development
Add support for the more standard LIB_INSTALL_DIR variable
-rw-r--r--CMakeLists.txt13
1 files changed, 9 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a8e646d06..6a0ffdd42 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -62,7 +62,7 @@ ENDIF()
# Installation paths
SET(INSTALL_BIN bin CACHE PATH "Where to install binaries to.")
-SET(INSTALL_LIB 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.")
# Build options
@@ -159,13 +159,18 @@ IF (MSVC)
SET_SOURCE_FILES_PROPERTIES(src/win32/precompiled.c COMPILE_FLAGS "/Ycprecompiled.h")
ENDIF ()
+# Backward compatibility with INSTALL_LIB variable
+if (INSTALL_LIB)
+ set(LIB_INSTALL_DIR "${INSTALL_LIB}")
+ENDIF()
+
# Install
INSTALL(TARGETS git2
RUNTIME DESTINATION ${INSTALL_BIN}
- LIBRARY DESTINATION ${INSTALL_LIB}
- ARCHIVE DESTINATION ${INSTALL_LIB}
+ LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libgit2.pc DESTINATION ${INSTALL_LIB}/pkgconfig )
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libgit2.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig )
INSTALL(DIRECTORY include/git2 DESTINATION ${INSTALL_INC} )
INSTALL(FILES include/git2.h DESTINATION ${INSTALL_INC} )