mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-08 14:49:59 -04:00
cmake: Use GnuInstallDirs to customize install directories
Replace custom LIB_INSTALL_DIR with standard CMAKE_INSTALL_LIBDIR variable. For backward compatibility, set CMAKE_INSTALL_LIBDIR if LIB_INSTALL_DIR is set. Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
This commit is contained in:
parent
a4486ceff2
commit
5e5056d6ab
@ -39,6 +39,8 @@ else()
|
||||
project("Mbed TLS" C)
|
||||
endif()
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
# Set the project root directory.
|
||||
set(MBEDTLS_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
@ -259,8 +261,7 @@ if(CMAKE_BUILD_TYPE STREQUAL "Coverage")
|
||||
endif(CMAKE_BUILD_TYPE STREQUAL "Coverage")
|
||||
|
||||
if(LIB_INSTALL_DIR)
|
||||
else()
|
||||
set(LIB_INSTALL_DIR lib)
|
||||
set(CMAKE_INSTALL_LIBDIR "${LIB_INSTALL_DIR}")
|
||||
endif()
|
||||
|
||||
if(ENABLE_ZLIB_SUPPORT)
|
||||
|
5
ChangeLog.d/cmake_use_GnuInstallDirs.txt
Normal file
5
ChangeLog.d/cmake_use_GnuInstallDirs.txt
Normal file
@ -0,0 +1,5 @@
|
||||
Changes
|
||||
* cmake: Use GnuInstallDirs to customize install directories
|
||||
Replace custom LIB_INSTALL_DIR variable with standard CMAKE_INSTALL_LIBDIR
|
||||
variable. For backward compatibility, set CMAKE_INSTALL_LIBDIR if
|
||||
LIB_INSTALL_DIR is set.
|
@ -239,7 +239,7 @@ foreach(target IN LISTS target_libraries)
|
||||
PUBLIC MBEDTLS_USER_CONFIG_FILE="${MBEDTLS_USER_CONFIG_FILE}")
|
||||
endif()
|
||||
install(TARGETS ${target}
|
||||
DESTINATION ${LIB_INSTALL_DIR}
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
|
||||
endforeach(target)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user