mirror of
https://github.com/isar/libmdbx.git
synced 2024-10-29 23:19:20 +08:00
mdbx-cmake: use GNUInstallDirs
variables for all cases.
Resolves https://github.com/erthink/libmdbx/issues/209.
This commit is contained in:
parent
581ca4fdf4
commit
d47864dedf
1
.github/actions/spelling/expect.txt
vendored
1
.github/actions/spelling/expect.txt
vendored
@ -681,6 +681,7 @@ img
|
||||
impl
|
||||
IMPLIB
|
||||
inblock
|
||||
INCLUDEDIR
|
||||
indx
|
||||
INDXSIZE
|
||||
ini
|
||||
|
@ -670,34 +670,34 @@ endif()
|
||||
# mdbx-shared-lib installation
|
||||
if(NOT DEFINED MDBX_DLL_INSTALL_DESTINATION)
|
||||
if(WIN32)
|
||||
set(MDBX_DLL_INSTALL_DESTINATION bin)
|
||||
set(MDBX_DLL_INSTALL_DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
else()
|
||||
set(MDBX_DLL_INSTALL_DESTINATION lib)
|
||||
set(MDBX_DLL_INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
endif()
|
||||
if(MDBX_BUILD_SHARED_LIBRARY)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||
install(TARGETS mdbx EXPORT libmdbx
|
||||
LIBRARY DESTINATION ${MDBX_DLL_INSTALL_DESTINATION} COMPONENT runtime
|
||||
OBJECTS DESTINATION lib COMPONENT devel
|
||||
ARCHIVE DESTINATION lib COMPONENT devel
|
||||
PUBLIC_HEADER DESTINATION include COMPONENT devel
|
||||
INCLUDES DESTINATION include COMPONENT devel)
|
||||
OBJECTS DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel
|
||||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT devel
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT devel)
|
||||
else()
|
||||
install(TARGETS mdbx EXPORT libmdbx
|
||||
LIBRARY DESTINATION ${MDBX_DLL_INSTALL_DESTINATION} COMPONENT runtime
|
||||
NAMELINK_COMPONENT devel
|
||||
OBJECTS DESTINATION lib COMPONENT devel
|
||||
ARCHIVE DESTINATION lib COMPONENT devel
|
||||
PUBLIC_HEADER DESTINATION include COMPONENT devel
|
||||
INCLUDES DESTINATION include COMPONENT devel)
|
||||
OBJECTS DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel
|
||||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT devel
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT devel)
|
||||
endif()
|
||||
endif(MDBX_BUILD_SHARED_LIBRARY)
|
||||
|
||||
# mdbx-tools installation
|
||||
if(MDBX_BUILD_TOOLS)
|
||||
if(NOT DEFINED MDBX_TOOLS_INSTALL_DESTINATION)
|
||||
set(MDBX_TOOLS_INSTALL_DESTINATION bin)
|
||||
set(MDBX_TOOLS_INSTALL_DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
endif()
|
||||
install(
|
||||
TARGETS
|
||||
@ -712,7 +712,7 @@ if(MDBX_BUILD_TOOLS)
|
||||
COMPONENT runtime)
|
||||
if(MDBX_INSTALL_MANPAGES)
|
||||
if(NOT DEFINED MDBX_MAN_INSTALL_DESTINATION)
|
||||
set(MDBX_MAN_INSTALL_DESTINATION man/man1)
|
||||
set(MDBX_MAN_INSTALL_DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
|
||||
endif()
|
||||
install(
|
||||
FILES
|
||||
@ -731,19 +731,19 @@ endif(MDBX_BUILD_TOOLS)
|
||||
if(MDBX_INSTALL_STATIC)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||
install(TARGETS mdbx-static EXPORT libmdbx
|
||||
LIBRARY DESTINATION lib COMPONENT devel
|
||||
OBJECTS DESTINATION lib COMPONENT devel
|
||||
ARCHIVE DESTINATION lib COMPONENT devel
|
||||
PUBLIC_HEADER DESTINATION include COMPONENT devel
|
||||
INCLUDES DESTINATION include COMPONENT devel)
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel
|
||||
OBJECTS DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel
|
||||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT devel
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT devel)
|
||||
else()
|
||||
install(TARGETS mdbx-static EXPORT libmdbx
|
||||
LIBRARY DESTINATION lib COMPONENT devel
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel
|
||||
NAMELINK_COMPONENT devel
|
||||
OBJECTS DESTINATION lib COMPONENT devel
|
||||
ARCHIVE DESTINATION lib COMPONENT devel
|
||||
PUBLIC_HEADER DESTINATION include COMPONENT devel
|
||||
INCLUDES DESTINATION include COMPONENT devel)
|
||||
OBJECTS DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel
|
||||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT devel
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT devel)
|
||||
endif()
|
||||
endif(MDBX_INSTALL_STATIC)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user