From 699ef7515bd7011ec08a43f8b2212b5ae91e3f60 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Sat, 1 Jun 2019 01:44:54 +0200 Subject: [PATCH] msys2/bundle: install libs only once --- CMakeLists.txt | 16 ++++++++-------- radiant/CMakeLists.txt | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) 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}) -- 2.39.2