]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
msys2/bundle: install libs only once
authorThomas Debesse <dev@illwieckz.net>
Fri, 31 May 2019 23:44:54 +0000 (01:44 +0200)
committerThomas Debesse <dev@illwieckz.net>
Sat, 1 Jun 2019 20:52:54 +0000 (22:52 +0200)
CMakeLists.txt
radiant/CMakeLists.txt

index e069a722ff4674e11a415c11dd1eb435f0982558..a20042217319d8d4b1e817efa5914a928cadf06f 100644 (file)
@@ -223,17 +223,10 @@ if (BUILD_BINARIES)
                     ARGS -c "ldd '$<TARGET_FILE:${target}>' | egrep -i '\\.dll ' | grep -iv '/c/Windows' | awk '{ print $1 }' | while read dll; do dllbasename=\"$(which \"$dll\")\"; [ -f \"${PROJECT_BINARY_DIR}/$dllbasename\" ] || cp --preserve=timestamps \"$dllbasename\" '${PROJECT_BINARY_DIR}'; done"
                     VERBATIM
             )
-
-            file(GLOB DLL_FILES ${PROJECT_BINARY_DIR}/*.dll)
-
-            install(FILES
-                ${DLL_FILES}
-                DESTINATION ${CMAKE_INSTALL_PREFIX}
-            )
         endif ()
     endmacro()
 
-    macro(bundle_gtkdeps target)
+    macro(bundle_stuff target)
         if (BUNDLE_LIBRARIES AND WIN32)
                 add_custom_command(TARGET ${target} POST_BUILD
                         COMMAND bash
@@ -241,6 +234,13 @@ if (BUILD_BINARIES)
                         VERBATIM
                         )
 
+                file(GLOB DLL_FILES ${PROJECT_BINARY_DIR}/*.dll)
+
+                install(FILES
+                    ${DLL_FILES}
+                    DESTINATION ${CMAKE_INSTALL_PREFIX}
+                )
+
                 install(DIRECTORY
                         ${PROJECT_BINARY_DIR}/lib
                         ${PROJECT_BINARY_DIR}/share
index 4535a84dc182681bc3133258d4965f9601e2089f..424c42d6675e97bab647222f69af668cc74bd129 100644 (file)
@@ -131,4 +131,4 @@ if (X11_LIBRARIES)
 endif ()
 
 copy_dlls(${RADIANT_BASENAME})
-bundle_gtkdeps(${RADIANT_BASENAME})
+bundle_stuff(${RADIANT_BASENAME})