changeset 17:744f13b7e357

sync
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 27 Oct 2016 11:20:36 +0200
parents 7a88c614be04
children 6ce90b8abc5a
files Framework/Orthanc/Resources/CMake/DownloadPackage.cmake
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/Orthanc/Resources/CMake/DownloadPackage.cmake	Thu Oct 27 11:01:26 2016 +0200
+++ b/Framework/Orthanc/Resources/CMake/DownloadPackage.cmake	Thu Oct 27 11:20:36 2016 +0200
@@ -16,7 +16,11 @@
 ##
 
 if ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows")
-  set(PATCH_EXECUTABLE ${CMAKE_SOURCE_DIR}/Resources/ThirdParty/patch/patch.exe)
+  set(PATCH_EXECUTABLE ${CMAKE_CURRENT_LIST_DIR}/../ThirdParty/patch/patch.exe)
+  if (NOT EXISTS ${PATCH_EXECUTABLE})
+    message(FATAL_ERROR "Unable to find the patch.exe tool that is shipped with Orthanc")
+  endif()
+
 else ()
   find_program(PATCH_EXECUTABLE patch)
   if (${PATCH_EXECUTABLE} MATCHES "PATCH_EXECUTABLE-NOTFOUND")