Skip to content

Commit

Permalink
Change copy lib3mf libraries functions slightly in OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaiaeroastro committed Jun 2, 2024
1 parent ca849b8 commit bbcebc3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmake/lib3mfConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ else()
if(APPLE)
# On macOS, copy .dylib files, preserving symlinks
add_custom_command(TARGET ${target} POST_BUILD
COMMAND sh -c "cp -P '${lib3mf_LIBRARY_DIR}/lib3mf.dylib'* '$<TARGET_FILE_DIR:${target}>'"
COMMAND sh -c "if [ ! -f '$<TARGET_FILE_DIR:${target}>/lib3mf.dylib' ]; then cp -P '${lib3mf_LIBRARY_DIR}/lib3mf.dylib'* '$<TARGET_FILE_DIR:${target}>'; fi"
COMMENT "Copying all lib3mf library files to target directory on MacOS")

elseif(UNIX)
# On Unix-like systems (excluding macOS), copy .so files, preserving symlinks
add_custom_command(TARGET ${target} POST_BUILD
Expand Down

0 comments on commit bbcebc3

Please sign in to comment.