From: Thomas Debesse Date: Fri, 31 May 2019 23:44:54 +0000 (+0200) Subject: msys2/bundle: install libs only once X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=699ef7515bd7011ec08a43f8b2212b5ae91e3f60;p=xonotic%2Fnetradiant.git msys2/bundle: install libs only once --- diff --git a/CMakeLists.txt b/CMakeLists.txt index e069a722..a2004221 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -223,17 +223,10 @@ if (BUILD_BINARIES) ARGS -c "ldd '$' | 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 diff --git a/radiant/CMakeLists.txt b/radiant/CMakeLists.txt index 4535a84d..424c42d6 100644 --- a/radiant/CMakeLists.txt +++ b/radiant/CMakeLists.txt @@ -131,4 +131,4 @@ if (X11_LIBRARIES) endif () copy_dlls(${RADIANT_BASENAME}) -bundle_gtkdeps(${RADIANT_BASENAME}) +bundle_stuff(${RADIANT_BASENAME})