summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2019-01-09 21:41:27 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-01-09 21:41:38 (GMT)
commit1fe3d126a571427114d56e1115e73feb06cd5c3e (patch)
tree67861314c38cccb70ab1a3b89925afe00d65d779 /Modules
parentc9854a5843ac75df32c26140e1b568a3f0018699 (diff)
parent200bf5774285d51d9c5f24b5b52226a7cb54d33d (diff)
downloadCMake-1fe3d126a571427114d56e1115e73feb06cd5c3e.zip
CMake-1fe3d126a571427114d56e1115e73feb06cd5c3e.tar.gz
CMake-1fe3d126a571427114d56e1115e73feb06cd5c3e.tar.bz2
Merge topic 'BundleUtilities-make-dir'
200bf57742 BundleUtilities: Ensure target dir exists when creating symlinks Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: Craig Scott <craig.scott@crascit.com> Merge-request: !2728
Diffstat (limited to 'Modules')
-rw-r--r--Modules/BundleUtilities.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake
index d5c47f8..8c7646e 100644
--- a/Modules/BundleUtilities.cmake
+++ b/Modules/BundleUtilities.cmake
@@ -717,6 +717,9 @@ function(link_resolved_item_into_bundle resolved_item resolved_embedded_item)
else()
get_filename_component(target_dir "${resolved_embedded_item}" DIRECTORY)
file(RELATIVE_PATH symlink_target "${target_dir}" "${resolved_item}")
+ if (NOT EXISTS "${target_dir}")
+ file(MAKE_DIRECTORY "${target_dir}")
+ endif()
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${symlink_target}" "${resolved_embedded_item}")
endif()
endfunction()