X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=blobdiff_plain;f=CMakeLists.txt;h=928461deec0b3468815218cf8a50a72e00b1ad88;hp=335c108293b4ffd8ccc6fae82bf7e85b53411224;hb=b5391544e08298842dc61947979da08a89e0a26e;hpb=e0063fad5ab2d272e69a936e722a2eb24e5df4b2 diff --git a/CMakeLists.txt b/CMakeLists.txt index 335c1082..928461de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,8 +115,15 @@ endif () include_directories("${PROJECT_SOURCE_DIR}/include") include_directories("${PROJECT_SOURCE_DIR}/libs") +if (WIN32 AND NOT CMAKE_CROSSCOMPILING) + set(BUNDLE_LIBRARIES_DEFAULT ON) +else () + set(BUNDLE_LIBRARIES_DEFAULT OFF) +endif () +option(BUNDLE_LIBRARIES "Bundle libraries" ${BUNDLE_LIBRARIES_DEFAULT}) + macro(copy_dlls target) - if (WIN32) + if (BUNDLE_LIBRARIES) add_custom_command(TARGET ${target} POST_BUILD COMMAND bash ARGS -c "ldd '$' | grep -v /c/Windows | awk '{ print $1 }' | while read dll; do cp \"$(which $dll)\" '${PROJECT_BINARY_DIR}'; done"