mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-10 15:50:47 -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)
|
project("Mbed TLS" C)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
# Set the project root directory.
|
# Set the project root directory.
|
||||||
set(MBEDTLS_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
set(MBEDTLS_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
@ -259,8 +261,7 @@ if(CMAKE_BUILD_TYPE STREQUAL "Coverage")
|
|||||||
endif(CMAKE_BUILD_TYPE STREQUAL "Coverage")
|
endif(CMAKE_BUILD_TYPE STREQUAL "Coverage")
|
||||||
|
|
||||||
if(LIB_INSTALL_DIR)
|
if(LIB_INSTALL_DIR)
|
||||||
else()
|
set(CMAKE_INSTALL_LIBDIR "${LIB_INSTALL_DIR}")
|
||||||
set(LIB_INSTALL_DIR lib)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_ZLIB_SUPPORT)
|
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}")
|
PUBLIC MBEDTLS_USER_CONFIG_FILE="${MBEDTLS_USER_CONFIG_FILE}")
|
||||||
endif()
|
endif()
|
||||||
install(TARGETS ${target}
|
install(TARGETS ${target}
|
||||||
DESTINATION ${LIB_INSTALL_DIR}
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
|
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
|
||||||
endforeach(target)
|
endforeach(target)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user