annotate OrthancFramework/Resources/CMake/DownloadPackage.cmake @ 5084:9770d537880d attach-custom-data

added support for revision in SQLite + avoid upgrading DB version
author Alain Mazy <am@osimis.io>
date Thu, 15 Sep 2022 09:02:07 +0200
parents 43e613a7756b
children 0ea402b4d901
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4120
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4115
diff changeset
1 # Orthanc - A Lightweight, RESTful DICOM Store
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4115
diff changeset
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4115
diff changeset
3 # Department, University Hospital of Liege, Belgium
4870
43e613a7756b upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4831
diff changeset
4 # Copyright (C) 2017-2022 Osimis S.A., Belgium
43e613a7756b upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4831
diff changeset
5 # Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
4120
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4115
diff changeset
6 #
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4115
diff changeset
7 # This program is free software: you can redistribute it and/or
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4115
diff changeset
8 # modify it under the terms of the GNU Lesser General Public License
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4115
diff changeset
9 # as published by the Free Software Foundation, either version 3 of
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4115
diff changeset
10 # the License, or (at your option) any later version.
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4115
diff changeset
11 #
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4115
diff changeset
12 # This program is distributed in the hope that it will be useful, but
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4115
diff changeset
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4115
diff changeset
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4115
diff changeset
15 # Lesser General Public License for more details.
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4115
diff changeset
16 #
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4115
diff changeset
17 # You should have received a copy of the GNU Lesser General Public
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4115
diff changeset
18 # License along with this program. If not, see
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4115
diff changeset
19 # <http://www.gnu.org/licenses/>.
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4115
diff changeset
20
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4115
diff changeset
21
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
22 macro(GetUrlFilename TargetVariable Url)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
23 string(REGEX REPLACE "^.*/" "" ${TargetVariable} "${Url}")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
24 endmacro()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
25
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
26
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
27 macro(GetUrlExtension TargetVariable Url)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
28 #string(REGEX REPLACE "^.*/[^.]*\\." "" TMP "${Url}")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
29 string(REGEX REPLACE "^.*\\." "" TMP "${Url}")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
30 string(TOLOWER "${TMP}" "${TargetVariable}")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
31 endmacro()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
32
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
33
1537
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1111
diff changeset
34
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1111
diff changeset
35 ##
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1111
diff changeset
36 ## Setup the patch command-line tool
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1111
diff changeset
37 ##
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1111
diff changeset
38
2130
72cb107a7346 option ORTHANC_DISABLE_PATCH
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2111
diff changeset
39 if (NOT ORTHANC_DISABLE_PATCH)
72cb107a7346 option ORTHANC_DISABLE_PATCH
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2111
diff changeset
40 if ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows")
72cb107a7346 option ORTHANC_DISABLE_PATCH
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2111
diff changeset
41 set(PATCH_EXECUTABLE ${CMAKE_CURRENT_LIST_DIR}/../ThirdParty/patch/patch.exe)
72cb107a7346 option ORTHANC_DISABLE_PATCH
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2111
diff changeset
42 if (NOT EXISTS ${PATCH_EXECUTABLE})
72cb107a7346 option ORTHANC_DISABLE_PATCH
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2111
diff changeset
43 message(FATAL_ERROR "Unable to find the patch.exe tool that is shipped with Orthanc")
72cb107a7346 option ORTHANC_DISABLE_PATCH
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2111
diff changeset
44 endif()
2111
64d0224595cc more generic path
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2002
diff changeset
45
2130
72cb107a7346 option ORTHANC_DISABLE_PATCH
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2111
diff changeset
46 else ()
72cb107a7346 option ORTHANC_DISABLE_PATCH
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2111
diff changeset
47 find_program(PATCH_EXECUTABLE patch)
72cb107a7346 option ORTHANC_DISABLE_PATCH
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2111
diff changeset
48 if (${PATCH_EXECUTABLE} MATCHES "PATCH_EXECUTABLE-NOTFOUND")
72cb107a7346 option ORTHANC_DISABLE_PATCH
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2111
diff changeset
49 message(FATAL_ERROR "Please install the 'patch' standard command-line tool")
72cb107a7346 option ORTHANC_DISABLE_PATCH
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2111
diff changeset
50 endif()
1537
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1111
diff changeset
51 endif()
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1111
diff changeset
52 endif()
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1111
diff changeset
53
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1111
diff changeset
54
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1111
diff changeset
55
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
56 ##
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
57 ## Check the existence of the required decompression tools
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
58 ##
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
59
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
60 if ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows")
1111
929bf8c2123d Fixes for Visual Studio 2013 64bit
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 735
diff changeset
61 find_program(ZIP_EXECUTABLE 7z
929bf8c2123d Fixes for Visual Studio 2013 64bit
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 735
diff changeset
62 PATHS
929bf8c2123d Fixes for Visual Studio 2013 64bit
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 735
diff changeset
63 "$ENV{ProgramFiles}/7-Zip"
929bf8c2123d Fixes for Visual Studio 2013 64bit
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 735
diff changeset
64 "$ENV{ProgramW6432}/7-Zip"
929bf8c2123d Fixes for Visual Studio 2013 64bit
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 735
diff changeset
65 )
929bf8c2123d Fixes for Visual Studio 2013 64bit
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 735
diff changeset
66
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
67 if (${ZIP_EXECUTABLE} MATCHES "ZIP_EXECUTABLE-NOTFOUND")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
68 message(FATAL_ERROR "Please install the '7-zip' software (http://www.7-zip.org/)")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
69 endif()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
70
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
71 else()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
72 find_program(UNZIP_EXECUTABLE unzip)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
73 if (${UNZIP_EXECUTABLE} MATCHES "UNZIP_EXECUTABLE-NOTFOUND")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
74 message(FATAL_ERROR "Please install the 'unzip' package")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
75 endif()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
76
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
77 find_program(TAR_EXECUTABLE tar)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
78 if (${TAR_EXECUTABLE} MATCHES "TAR_EXECUTABLE-NOTFOUND")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
79 message(FATAL_ERROR "Please install the 'tar' package")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
80 endif()
3242
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
81
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
82 find_program(GUNZIP_EXECUTABLE gunzip)
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
83 if (${GUNZIP_EXECUTABLE} MATCHES "GUNZIP_EXECUTABLE-NOTFOUND")
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
84 message(FATAL_ERROR "Please install the 'gzip' package")
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
85 endif()
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
86 endif()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
87
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
88
3242
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
89 macro(DownloadFile MD5 Url)
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
90 GetUrlFilename(TMP_FILENAME "${Url}")
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
91
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
92 set(TMP_PATH "${CMAKE_SOURCE_DIR}/ThirdPartyDownloads/${TMP_FILENAME}")
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
93 if (NOT EXISTS "${TMP_PATH}")
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
94 message("Downloading ${Url}")
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
95
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
96 # This fixes issue 6: "I think cmake shouldn't download the
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
97 # packages which are not in the system, it should stop and let
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
98 # user know."
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
99 # https://code.google.com/p/orthanc/issues/detail?id=6
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
100 if (NOT STATIC_BUILD AND NOT ALLOW_DOWNLOADS)
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
101 message(FATAL_ERROR "CMake is not allowed to download from Internet. Please set the ALLOW_DOWNLOADS option to ON")
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
102 endif()
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
103
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
104 if ("${MD5}" STREQUAL "no-check")
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
105 message(WARNING "Not checking the MD5 of: ${Url}")
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
106 file(DOWNLOAD "${Url}" "${TMP_PATH}"
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
107 SHOW_PROGRESS TIMEOUT 300 INACTIVITY_TIMEOUT 60
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
108 STATUS Failure)
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
109 else()
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
110 file(DOWNLOAD "${Url}" "${TMP_PATH}"
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
111 SHOW_PROGRESS TIMEOUT 300 INACTIVITY_TIMEOUT 60
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
112 EXPECTED_MD5 "${MD5}" STATUS Failure)
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
113 endif()
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
114
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
115 list(GET Failure 0 Status)
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
116 if (NOT Status EQUAL 0)
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
117 message(FATAL_ERROR "Cannot download file: ${Url}")
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
118 endif()
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
119
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
120 else()
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
121 message("Using local copy of ${Url}")
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
122
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
123 if ("${MD5}" STREQUAL "no-check")
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
124 message(WARNING "Not checking the MD5 of: ${Url}")
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
125 else()
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
126 file(MD5 ${TMP_PATH} ActualMD5)
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
127 if (NOT "${ActualMD5}" STREQUAL "${MD5}")
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
128 message(FATAL_ERROR "The MD5 hash of a previously download file is invalid: ${TMP_PATH}")
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
129 endif()
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
130 endif()
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
131 endif()
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
132 endmacro()
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
133
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
134
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
135 macro(DownloadPackage MD5 Url TargetDirectory)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
136 if (NOT IS_DIRECTORY "${TargetDirectory}")
3242
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
137 DownloadFile("${MD5}" "${Url}")
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
138
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
139 GetUrlExtension(TMP_EXTENSION "${Url}")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
140 #message(${TMP_EXTENSION})
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
141 message("Uncompressing ${TMP_FILENAME}")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
142
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
143 if ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
144 # How to silently extract files using 7-zip
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
145 # http://superuser.com/questions/331148/7zip-command-line-extract-silently-quietly
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
146
2001
1d3a7c7d84c1 download of xz packages
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1543
diff changeset
147 if (("${TMP_EXTENSION}" STREQUAL "gz") OR
1d3a7c7d84c1 download of xz packages
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1543
diff changeset
148 ("${TMP_EXTENSION}" STREQUAL "tgz") OR
1d3a7c7d84c1 download of xz packages
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1543
diff changeset
149 ("${TMP_EXTENSION}" STREQUAL "xz"))
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
150 execute_process(
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
151 COMMAND ${ZIP_EXECUTABLE} e -y ${TMP_PATH}
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
152 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
153 RESULT_VARIABLE Failure
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
154 OUTPUT_QUIET
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
155 )
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
156
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
157 if (Failure)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
158 message(FATAL_ERROR "Error while running the uncompression tool")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
159 endif()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
160
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
161 if ("${TMP_EXTENSION}" STREQUAL "tgz")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
162 string(REGEX REPLACE ".tgz$" ".tar" TMP_FILENAME2 "${TMP_FILENAME}")
2001
1d3a7c7d84c1 download of xz packages
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1543
diff changeset
163 elseif ("${TMP_EXTENSION}" STREQUAL "gz")
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
164 string(REGEX REPLACE ".gz$" "" TMP_FILENAME2 "${TMP_FILENAME}")
2001
1d3a7c7d84c1 download of xz packages
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1543
diff changeset
165 elseif ("${TMP_EXTENSION}" STREQUAL "xz")
1d3a7c7d84c1 download of xz packages
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1543
diff changeset
166 string(REGEX REPLACE ".xz" "" TMP_FILENAME2 "${TMP_FILENAME}")
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
167 endif()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
168
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
169 execute_process(
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
170 COMMAND ${ZIP_EXECUTABLE} x -y ${TMP_FILENAME2}
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
171 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
172 RESULT_VARIABLE Failure
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
173 OUTPUT_QUIET
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
174 )
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
175 elseif ("${TMP_EXTENSION}" STREQUAL "zip")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
176 execute_process(
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
177 COMMAND ${ZIP_EXECUTABLE} x -y ${TMP_PATH}
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
178 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
179 RESULT_VARIABLE Failure
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
180 OUTPUT_QUIET
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
181 )
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
182 else()
3242
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
183 message(FATAL_ERROR "Unsupported package extension: ${TMP_EXTENSION}")
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
184 endif()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
185
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
186 else()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
187 if ("${TMP_EXTENSION}" STREQUAL "zip")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
188 execute_process(
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
189 COMMAND sh -c "${UNZIP_EXECUTABLE} -q ${TMP_PATH}"
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
190 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
191 RESULT_VARIABLE Failure
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
192 )
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
193 elseif (("${TMP_EXTENSION}" STREQUAL "gz") OR ("${TMP_EXTENSION}" STREQUAL "tgz"))
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
194 #message("tar xvfz ${TMP_PATH}")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
195 execute_process(
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
196 COMMAND sh -c "${TAR_EXECUTABLE} xfz ${TMP_PATH}"
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
197 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
198 RESULT_VARIABLE Failure
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
199 )
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
200 elseif ("${TMP_EXTENSION}" STREQUAL "bz2")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
201 execute_process(
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
202 COMMAND sh -c "${TAR_EXECUTABLE} xfj ${TMP_PATH}"
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
203 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
204 RESULT_VARIABLE Failure
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
205 )
2002
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2001
diff changeset
206 elseif ("${TMP_EXTENSION}" STREQUAL "xz")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2001
diff changeset
207 execute_process(
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2001
diff changeset
208 COMMAND sh -c "${TAR_EXECUTABLE} xf ${TMP_PATH}"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2001
diff changeset
209 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2001
diff changeset
210 RESULT_VARIABLE Failure
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2001
diff changeset
211 )
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
212 else()
3242
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
213 message(FATAL_ERROR "Unsupported package extension: ${TMP_EXTENSION}")
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
214 endif()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
215 endif()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
216
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
217 if (Failure)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
218 message(FATAL_ERROR "Error while running the uncompression tool")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
219 endif()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
220
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
221 if (NOT IS_DIRECTORY "${TargetDirectory}")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
222 message(FATAL_ERROR "The package was not uncompressed at the proper location. Check the CMake instructions.")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
223 endif()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
224 endif()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
225 endmacro()
3242
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
226
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
227
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
228
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
229 macro(DownloadCompressedFile MD5 Url TargetFile)
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
230 if (NOT EXISTS "${TargetFile}")
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
231 DownloadFile("${MD5}" "${Url}")
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
232
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
233 GetUrlExtension(TMP_EXTENSION "${Url}")
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
234 #message(${TMP_EXTENSION})
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
235 message("Uncompressing ${TMP_FILENAME}")
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
236
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
237 if ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows")
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
238 # How to silently extract files using 7-zip
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
239 # http://superuser.com/questions/331148/7zip-command-line-extract-silently-quietly
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
240
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
241 if ("${TMP_EXTENSION}" STREQUAL "gz")
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
242 execute_process(
3423
f5fe6d08f910 improving single file uncompression on Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3242
diff changeset
243 # "-so" writes uncompressed file to stdout
f5fe6d08f910 improving single file uncompression on Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3242
diff changeset
244 COMMAND ${ZIP_EXECUTABLE} e -so -y ${TMP_PATH}
f5fe6d08f910 improving single file uncompression on Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3242
diff changeset
245 OUTPUT_FILE "${TargetFile}"
3242
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
246 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
247 RESULT_VARIABLE Failure
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
248 OUTPUT_QUIET
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
249 )
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
250
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
251 if (Failure)
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
252 message(FATAL_ERROR "Error while running the uncompression tool")
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
253 endif()
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
254
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
255 else()
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
256 message(FATAL_ERROR "Unsupported file extension: ${TMP_EXTENSION}")
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
257 endif()
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
258
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
259 else()
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
260 if ("${TMP_EXTENSION}" STREQUAL "gz")
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
261 execute_process(
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
262 COMMAND sh -c "${GUNZIP_EXECUTABLE} -c ${TMP_PATH}"
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
263 OUTPUT_FILE "${TargetFile}"
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
264 RESULT_VARIABLE Failure
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
265 )
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
266 else()
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
267 message(FATAL_ERROR "Unsupported file extension: ${TMP_EXTENSION}")
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
268 endif()
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
269 endif()
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
270
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
271 if (Failure)
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
272 message(FATAL_ERROR "Error while running the uncompression tool")
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
273 endif()
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
274
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
275 if (NOT EXISTS "${TargetFile}")
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
276 message(FATAL_ERROR "The file was not uncompressed at the proper location. Check the CMake instructions.")
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
277 endif()
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
278 endif()
5d78df37c62f automating compilation if icu is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2890
diff changeset
279 endmacro()