mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-20 06:54:32 +00:00
Merge pull request #821 from nacho/development
Add support for the more standard LIB_INSTALL_DIR variable
This commit is contained in:
commit
d4b573513c
@ -62,7 +62,7 @@ ENDIF()
|
|||||||
|
|
||||||
# Installation paths
|
# Installation paths
|
||||||
SET(INSTALL_BIN bin CACHE PATH "Where to install binaries to.")
|
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.")
|
SET(INSTALL_INC include CACHE PATH "Where to install headers to.")
|
||||||
|
|
||||||
# Build options
|
# Build options
|
||||||
@ -159,13 +159,18 @@ IF (MSVC)
|
|||||||
SET_SOURCE_FILES_PROPERTIES(src/win32/precompiled.c COMPILE_FLAGS "/Ycprecompiled.h")
|
SET_SOURCE_FILES_PROPERTIES(src/win32/precompiled.c COMPILE_FLAGS "/Ycprecompiled.h")
|
||||||
ENDIF ()
|
ENDIF ()
|
||||||
|
|
||||||
|
# Backward compatibility with INSTALL_LIB variable
|
||||||
|
if (INSTALL_LIB)
|
||||||
|
set(LIB_INSTALL_DIR "${INSTALL_LIB}")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
# Install
|
# Install
|
||||||
INSTALL(TARGETS git2
|
INSTALL(TARGETS git2
|
||||||
RUNTIME DESTINATION ${INSTALL_BIN}
|
RUNTIME DESTINATION ${INSTALL_BIN}
|
||||||
LIBRARY DESTINATION ${INSTALL_LIB}
|
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
||||||
ARCHIVE DESTINATION ${INSTALL_LIB}
|
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(DIRECTORY include/git2 DESTINATION ${INSTALL_INC} )
|
||||||
INSTALL(FILES include/git2.h DESTINATION ${INSTALL_INC} )
|
INSTALL(FILES include/git2.h DESTINATION ${INSTALL_INC} )
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user