diff options
author | Brad King <brad.king@kitware.com> | 2011-06-07 18:05:57 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2011-06-07 18:05:57 (GMT) |
commit | 43d3048582e34a84cc061fddeb3e7967a2c7a576 (patch) | |
tree | 085db059a3131c1d861ea6deb8a62c5f537d8b51 /Modules | |
parent | 313a633b85adcf6c69120dcec8e4685371549ce0 (diff) | |
parent | 8f0667c1131d41d9f4a31544322530de92d90cb5 (diff) | |
download | CMake-43d3048582e34a84cc061fddeb3e7967a2c7a576.zip CMake-43d3048582e34a84cc061fddeb3e7967a2c7a576.tar.gz CMake-43d3048582e34a84cc061fddeb3e7967a2c7a576.tar.bz2 |
Merge topic 'fix-BundleUtilities-cryptic-error-message'
8f0667c BundleUtilities: Avoid a cryptic and unhelpful error message
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/BundleUtilities.cmake | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake index 44f2c20..5e4bf46 100644 --- a/Modules/BundleUtilities.cmake +++ b/Modules/BundleUtilities.cmake @@ -546,13 +546,25 @@ function(fixup_bundle_item resolved_embedded_item exepath dirs) # get_dotapp_dir("${exepath}" exe_dotapp_dir) string(LENGTH "${exe_dotapp_dir}/" exe_dotapp_dir_length) - string(SUBSTRING "${resolved_embedded_item}" 0 ${exe_dotapp_dir_length} item_substring) - if(NOT "${exe_dotapp_dir}/" STREQUAL "${item_substring}") + string(LENGTH "${resolved_embedded_item}" resolved_embedded_item_length) + set(path_too_short 0) + set(is_embedded 0) + if(${resolved_embedded_item_length} LESS ${exe_dotapp_dir_length}) + set(path_too_short 1) + endif() + if(NOT path_too_short) + string(SUBSTRING "${resolved_embedded_item}" 0 ${exe_dotapp_dir_length} item_substring) + if("${exe_dotapp_dir}/" STREQUAL "${item_substring}") + set(is_embedded 1) + endif() + endif() + if(NOT is_embedded) message(" exe_dotapp_dir/='${exe_dotapp_dir}/'") message(" item_substring='${item_substring}'") message(" resolved_embedded_item='${resolved_embedded_item}'") message("") - message("Install or copy the item into the bundle before calling fixup_bundle") + message("Install or copy the item into the bundle before calling fixup_bundle.") + message("Or maybe there's a typo or incorrect path in one of the args to fixup_bundle?") message("") message(FATAL_ERROR "cannot fixup an item that is not in the bundle...") endif() |