File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -275,6 +275,7 @@ macro(fips_begin_app target type)
275275 fips_config_output_directory (${target} )
276276 fips_config_postfixes_for_exe (${target} )
277277 fips_msvc_add_target_properties (${target} )
278+ fips_windows_copy_target_dlls (${target} )
278279 fips_android_postbuildstep (${target} )
279280 fips_add_to_targets_list (${target} "app" )
280281 else ()
Original file line number Diff line number Diff line change 44#-------------------------------------------------------------------------------
55
66#-------------------------------------------------------------------------------
7- # fips_vs_apply_options ()
7+ # fips_msvc_apply_options ()
88# Applies the module-specific options set between begin/end, plus
99# any other MSVC specific target options.
1010#
@@ -16,6 +16,23 @@ macro(fips_msvc_add_target_properties target)
1616 endif ()
1717endmacro ()
1818
19+ #-------------------------------------------------------------------------------
20+ # fips_windows_copy_target_dlls()
21+ # On Windows, copy any DLLs linked to the target into the target output
22+ # directory.
23+ #
24+ # See: https://discourse.cmake.org/t/how-to-copy-dlls-to-binary-directory/10154
25+ #-------------------------------------------------------------------------------
26+ macro (fips_windows_copy_target_dlls target )
27+ if (FIPS_WINDOWS)
28+ add_custom_command (
29+ TARGET "${target} " POST_BUILD
30+ COMMAND "${CMAKE_COMMAND} " -E copy -t "$<TARGET_FILE_DIR :${target} >"
31+ "$<TARGET_RUNTIME_DLLS :${target} >" USES_TERMINAL COMMAND_EXPAND_LISTS
32+ )
33+ endif ()
34+ endmacro ()
35+
1936#-------------------------------------------------------------------------------
2037# fips_frameworks_osx(frameworks ...)
2138# OSX specific: Add one or more OSX frameworks for linking with the
You can’t perform that action at this time.
0 commit comments