Skip to content
Snippets Groups Projects
Commit ec8ee339 authored by Nat Goodspeed's avatar Nat Goodspeed
Browse files

MAINT-8675: In Darwin-specific CMake, use cp, not cmake -E copy.

cmake -E copy does only one file at a time, and older CMake versions don't
handle wildcards. But cmake -E copy is specifically for portability. When the
copy operation itself is Darwin-only, we can count on having 'cp' available.
parent c730ae22
No related branches found
No related tags found
No related merge requests found
......@@ -167,29 +167,26 @@ if (DARWIN)
COMMENT "Creating Resources directory in app bundle."
)
# Copy the required libraries to the package app
add_custom_command(TARGET INTEGRATION_TEST_llcorehttp PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${AUTOBUILD_INSTALL_DIR}/lib/release/libapr-1.0.dylib ${LL_TEST_DESTINATION_DIR}
DEPENDS ${AUTOBUILD_INSTALL_DIR}/lib/release/libapr-1.0.dylib
)
add_custom_command(TARGET INTEGRATION_TEST_llcorehttp PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${AUTOBUILD_INSTALL_DIR}/lib/release/libaprutil-1.0.dylib ${LL_TEST_DESTINATION_DIR}
DEPENDS ${AUTOBUILD_INSTALL_DIR}/lib/release/libaprutil-1.0.dylib
)
add_custom_command(TARGET INTEGRATION_TEST_llcorehttp PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${AUTOBUILD_INSTALL_DIR}/lib/release/libexception_handler.dylib ${LL_TEST_DESTINATION_DIR}
DEPENDS ${AUTOBUILD_INSTALL_DIR}/lib/release/libexception_handler.dylib
)
# Copy the required libraries to the package app. We used to use a sequence
# of '${CMAKE_COMMAND} -E copy' commands, but 'cmake -E copy' does only a
# single file at a time: it doesn't understand wildcards. 'cmake -E copy' is
# for portability. This operation is Darwin-specific. We can count on the
# 'cp' command.
set(copy_dylibs
libapr-1.0.dylib
libaprutil-1.0.dylib
libexception_handler.dylib
libnghttp2*.dylib
${EXPAT_COPY}
)
add_custom_command(TARGET INTEGRATION_TEST_llcorehttp PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${AUTOBUILD_INSTALL_DIR}/lib/release/libnghttp2*.dylib ${LL_TEST_DESTINATION_DIR}
DEPENDS ${AUTOBUILD_INSTALL_DIR}/lib/release/libnghttp2.dylib
WORKING_DIRECTORY "${AUTOBUILD_INSTALL_DIR}/lib/release"
COMMAND cp -v
${copy_dylibs}
${LL_TEST_DESTINATION_DIR}
DEPENDS ${copy_dylibs}
)
foreach(expat ${EXPAT_COPY})
add_custom_command(TARGET INTEGRATION_TEST_llcorehttp PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${AUTOBUILD_INSTALL_DIR}/lib/release/${expat} ${LL_TEST_DESTINATION_DIR}
DEPENDS ${AUTOBUILD_INSTALL_DIR}/lib/release/${expat}
)
endforeach(expat)
endif (DARWIN)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment