]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
msys2/bundle: properly parse ldd output for dll bundling on windows 128/head
authorThomas Debesse <dev@illwieckz.net>
Fri, 31 May 2019 15:59:56 +0000 (17:59 +0200)
committerThomas Debesse <dev@illwieckz.net>
Sat, 1 Jun 2019 15:06:19 +0000 (17:06 +0200)
- properly filters out Windows dll using case insensitive grep
- filters out non .dll lines in ldd output, avoid empty lines and ??? lines
- copy dll preserving timestamps

CMakeLists.txt

index c13b2ca86c019b25796ec4f1334141082068bff9..7498450870d5e6e314ed3c3da71f4c1f54cce71a 100644 (file)
@@ -216,7 +216,7 @@ if (BUILD_BINARIES)
         if (BUNDLE_LIBRARIES)
             add_custom_command(TARGET ${target} POST_BUILD
                     COMMAND bash
-                    ARGS -c "ldd '$<TARGET_FILE:${target}>' | grep -v /c/Windows | awk '{ print $1 }' | while read dll; do cp \"$(which $dll)\" '${PROJECT_BINARY_DIR}'; done"
+                    ARGS -c "ldd '$<TARGET_FILE:${target}>' | egrep -i '\\.dll ' | grep -iv '/c/Windows' | awk '{ print $1 }' | while read dll; do cp --preserve=timestamps \"$(which $dll)\" '${PROJECT_BINARY_DIR}'; done"
                     VERBATIM
                     )
         endif ()