include_directories("${PROJECT_SOURCE_DIR}/include")
include_directories("${PROJECT_SOURCE_DIR}/libs")
+macro(copy_dlls target)
+ if (WIN32)
+ 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"
+ VERBATIM
+ )
+ endif ()
+endmacro()
+
#-----------------------------------------------------------------------
# Libraries
#-----------------------------------------------------------------------
message(STATUS "Found Plugin ${name}")
add_library(${name} MODULE ${ARGN})
add_dependencies(plugins ${name})
+ copy_dlls(${name})
endmacro()
add_subdirectory(bobtoolz)
message(STATUS "Found Module ${name}")
add_library(${name} MODULE ${ARGN})
add_dependencies(modules ${name})
+ copy_dlls(${name})
endmacro()
add_subdirectory(archivepak)
if (X11_LIBRARIES)
target_link_libraries(radiant ${X11_LIBRARIES})
endif ()
+
+copy_dlls(radiant)