Merge pull request #5724 from Biswa96/cmake-mingw
cmake: Fix runtime library install location in mingw
This commit is contained in:
commit
32c995afa3
5 changed files with 15 additions and 4 deletions
2
3rdparty/everest/CMakeLists.txt
vendored
2
3rdparty/everest/CMakeLists.txt
vendored
|
@ -23,5 +23,5 @@ endif(INSTALL_MBEDTLS_HEADERS)
|
|||
|
||||
install(TARGETS everest
|
||||
EXPORT MbedTLSTargets
|
||||
DESTINATION ${LIB_INSTALL_DIR}
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
|
||||
|
|
|
@ -39,6 +39,8 @@ else()
|
|||
project("mbed TLS" C)
|
||||
endif()
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
# Determine if mbed TLS is being built as a subproject using add_subdirectory()
|
||||
if(NOT DEFINED MBEDTLS_AS_SUBPROJECT)
|
||||
set(MBEDTLS_AS_SUBPROJECT ON)
|
||||
|
@ -252,8 +254,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()
|
||||
|
||||
add_subdirectory(include)
|
||||
|
|
3
ChangeLog.d/cmake_fix_dll_install.txt
Normal file
3
ChangeLog.d/cmake_fix_dll_install.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
Changes
|
||||
* cmake: Fix runtime library install location in mingw
|
||||
This install DLLs in bin directory instead of lib.
|
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.
|
|
@ -291,7 +291,9 @@ foreach(target IN LISTS target_libraries)
|
|||
install(
|
||||
TARGETS ${target}
|
||||
EXPORT MbedTLSTargets
|
||||
DESTINATION ${LIB_INSTALL_DIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
|
||||
endforeach(target)
|
||||
|
||||
|
|
Loading…
Reference in a new issue