CMake: macOS move_lib supports imported libraries;
@@ -705,17 +705,17 @@ elseif(APPLE)
function(move_lib)
if(TARGET ${ARGV0})
get_target_property(TARGET_TYPE ${ARGV0} TYPE)
- if(${TARGET_TYPE} STREQUAL "MODULE_LIBRARY")
+ if(${TARGET_TYPE} STREQUAL "SHARED_LIBRARY")
add_custom_command(TARGET move_files POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
- $<TARGET_FILE:${ARGV0}>
- ${EXE_DIR}/$<TARGET_FILE_NAME:${ARGV0}>
+ $<TARGET_SONAME_FILE:${ARGV0}>
+ ${EXE_DIR}/$<TARGET_SONAME_FILE_NAME:${ARGV0}>
)
else()
add_custom_command(TARGET move_files POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
- $<TARGET_SONAME_FILE:${ARGV0}>
- ${EXE_DIR}/$<TARGET_SONAME_FILE_NAME:${ARGV0}>
+ $<TARGET_FILE:${ARGV0}>
+ ${EXE_DIR}/$<TARGET_FILE_NAME:${ARGV0}>
)
endif()
endif()
