aboutsummaryrefslogtreecommitdiff
path: root/external/unbound/CMakeLists.txt
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-11-18 17:03:14 -0500
committerBen Boeckel <ben.boeckel@kitware.com>2014-11-18 17:03:14 -0500
commitde4fc405769c2554630c49a3be8c253bb8dfaa8a (patch)
tree955dc166d3216ed649ace8feb895ba63329d9acc /external/unbound/CMakeLists.txt
parentcmake: place binaries together in the build tree (diff)
downloadmonero-de4fc405769c2554630c49a3be8c253bb8dfaa8a.tar.xz
mingw: copy required libraries to the build tree
These are found as shared libraries and need to be copied so that PATH manipulation isn't necessary outside of an msys shell.
Diffstat (limited to '')
-rw-r--r--external/unbound/CMakeLists.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/external/unbound/CMakeLists.txt b/external/unbound/CMakeLists.txt
index f17897c6b..fdfa0a0fe 100644
--- a/external/unbound/CMakeLists.txt
+++ b/external/unbound/CMakeLists.txt
@@ -183,3 +183,19 @@ endif ()
set(LIBEVENT2_LIBDIR
"${LIBEVENT2_LIBDIR}"
PARENT_SCOPE)
+
+if (MINGW)
+ # There is no variable for this (probably due to the fact that the pthread
+ # library is implicit with a link in msys).
+ find_library(win32pthread
+ NAMES libwinpthread-1.dll)
+ foreach (input IN LISTS win32pthread OPENSSL_LIBRARIES)
+ # Copy shared libraries into the build tree so that no PATH manipulation is
+ # necessary.
+ get_filename_component(name "${input}" NAME)
+ configure_file(
+ "${input}"
+ "${CMAKE_BINARY_DIR}/bin/${name}"
+ COPYONLY)
+ endforeach ()
+endif ()