Fix dll copying
This commit is contained in:
parent
00737948e6
commit
2e039d3955
@ -440,16 +440,25 @@ function(prusaslicer_copy_dlls target)
|
|||||||
set(_bits 32)
|
set(_bits 32)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
get_target_property(_out_dir ${target} BINARY_DIR)
|
get_property(_is_multi GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||||
|
get_target_property(_alt_out_dir ${target} RUNTIME_OUTPUT_DIRECTORY)
|
||||||
|
|
||||||
|
if (_alt_out_dir)
|
||||||
|
set (_out_dir "${_alt_out_dir}")
|
||||||
|
elseif (_is_multi)
|
||||||
|
set (_out_dir "$<TARGET_PROPERTY:${target},BINARY_DIR>/$<CONFIG>")
|
||||||
|
else ()
|
||||||
|
set (_out_dir "$<TARGET_PROPERTY:${target},BINARY_DIR>")
|
||||||
|
endif ()
|
||||||
|
|
||||||
# This has to be a separate target due to the windows command line lenght limits
|
# This has to be a separate target due to the windows command line lenght limits
|
||||||
add_custom_command(TARGET ${target} POST_BUILD
|
add_custom_command(TARGET ${target} POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${TOP_LEVEL_PROJECT_DIR}/deps/GMP/gmp/lib/win${_bits}/libgmp-10.dll ${_out_dir}/
|
COMMAND ${CMAKE_COMMAND} -E copy ${TOP_LEVEL_PROJECT_DIR}/deps/GMP/gmp/lib/win${_bits}/libgmp-10.dll ${_out_dir}
|
||||||
COMMENT "Copy gmp runtime to build tree"
|
COMMENT "Copy gmp runtime to build tree"
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
|
|
||||||
add_custom_command(TARGET ${target} POST_BUILD
|
add_custom_command(TARGET ${target} POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${TOP_LEVEL_PROJECT_DIR}/deps/MPFR/mpfr/lib/win${_bits}/libmpfr-4.dll ${_out_dir}/
|
COMMAND ${CMAKE_COMMAND} -E copy ${TOP_LEVEL_PROJECT_DIR}/deps/MPFR/mpfr/lib/win${_bits}/libmpfr-4.dll ${_out_dir}
|
||||||
COMMENT "Copy mpfr runtime to build tree"
|
COMMENT "Copy mpfr runtime to build tree"
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user