svn commit: r1920638 - /apr/apr-util/branches/1.7.x/CMakeLists.txt

[email protected]
Newsgroups gmane.comp.apache.apr.cvs
Message-ID <[email protected]>
Author: ivan
Date: Sat Sep 14 15:53:57 2024
New Revision: 1920638

URL: http://svn.apache.org/viewvc?rev=1920638&view=rev
Log:
CMake: Fix shared build test run.

* CMakeLists.txt: Copy libapr-1.dll to BuildDir.

Modified:
    apr/apr-util/branches/1.7.x/CMakeLists.txt

Modified: apr/apr-util/branches/1.7.x/CMakeLists.txt
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.7.x/CMakeLists.txt?rev=1920638&r1=1920637&r2=1920638&view=diff
==============================================================================
--- apr/apr-util/branches/1.7.x/CMakeLists.txt (original)
+++ apr/apr-util/branches/1.7.x/CMakeLists.txt Sat Sep 14 15:53:57 2024
@@ -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
+            $<TARGET_RUNTIME_DLLS:libaprutil-1>
+            $<TARGET_FILE_DIR:libaprutil-1>
+  )
 ELSE()
   SET_TARGET_PROPERTIES(libaprutil-1 PROPERTIES
                         OUTPUT_NAME aprutil-1)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.