Mercurial > hg > orthanc
diff Resources/CMake/DownloadPackage.cmake @ 1537:fbf763bb1fa3
error detection in patches
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 13 Aug 2015 15:25:38 +0200 |
parents | 929bf8c2123d |
children | 8b6d8f9b9f71 |
line wrap: on
line diff
--- a/Resources/CMake/DownloadPackage.cmake Thu Aug 13 14:16:11 2015 +0200 +++ b/Resources/CMake/DownloadPackage.cmake Thu Aug 13 15:25:38 2015 +0200 @@ -10,6 +10,22 @@ endmacro() + +## +## Setup the patch command-line tool +## + +if ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows") + set(PATCH_EXECUTABLE ${CMAKE_SOURCE_DIR}/Resources/patch/patch.exe) +else () + find_program(PATCH_EXECUTABLE patch) + if (${PATCH_EXECUTABLE} MATCHES "PATCH_EXECUTABLE-NOTFOUND") + message(FATAL_ERROR "Please install the 'patch' standard command-line tool") + endif() +endif() + + + ## ## Check the existence of the required decompression tools ##