From d7e0ee42b8ba9e275538bf10c870550c29b3fe14 Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Fri, 22 Apr 2022 20:59:50 +0530 Subject: [PATCH] cmake: Fix runtime library install location in mingw This install DLLs in bin directory instead of lib. Signed-off-by: Biswapriyo Nath --- ChangeLog.d/cmake_fix_dll_install.txt | 3 +++ library/CMakeLists.txt | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 ChangeLog.d/cmake_fix_dll_install.txt diff --git a/ChangeLog.d/cmake_fix_dll_install.txt b/ChangeLog.d/cmake_fix_dll_install.txt new file mode 100644 index 000000000..df51c650b --- /dev/null +++ b/ChangeLog.d/cmake_fix_dll_install.txt @@ -0,0 +1,3 @@ +Changes + * cmake: Fix runtime library install location in mingw + This install DLLs in bin directory instead of lib. diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index d8d28408f..a726e11ff 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -291,7 +291,9 @@ foreach(target IN LISTS target_libraries) install( TARGETS ${target} EXPORT MbedTLSTargets - DESTINATION ${CMAKE_INSTALL_LIBDIR} + 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)