From de38d804375d9499eb0567f3dd86714c817ce6d8 Mon Sep 17 00:00:00 2001 From: Ivan Zhakov Date: Sat, 14 Sep 2024 15:53:57 +0000 Subject: [PATCH] CMake: Fix shared build test run. * CMakeLists.txt: Copy libapr-1.dll to BuildDir. git-svn-id: https://svn.apache.org/repos/asf/apr/apr-util/branches/1.7.x@1920638 13f79535-47bb-0310-9956-ffa450edef68 --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 41748c62..5ece66a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -319,6 +319,15 @@ IF(BUILD_SHARED_LIBS) TARGET_COMPILE_DEFINITIONS(libaprutil-1 PRIVATE "APU_DECLARE_EXPORT" INTERFACE "APU_DECLARE_IMPORT") + + # Copy libapr-1.dll to BuildDir for test run. + ADD_CUSTOM_COMMAND( + TARGET libaprutil-1 POST_BUILD + COMMAND + "${CMAKE_COMMAND}" -E copy_if_different + $ + $ + ) ELSE() SET_TARGET_PROPERTIES(libaprutil-1 PROPERTIES OUTPUT_NAME aprutil-1)