aboutsummaryrefslogtreecommitdiff
path: root/Win32Depends.cmake
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-01-28 00:16:41 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2015-01-28 00:16:41 +0100
commit61f7536e2259dc496211dfca21b2a0e4eef3d9f4 (patch)
treecdee8069346b498cdd1649605026c1e0ae10823c /Win32Depends.cmake
parentb62b7bfa181e94626d771ff5c07790c50480e5f0 (diff)
downloadlogdiag-61f7536e2259dc496211dfca21b2a0e4eef3d9f4.tar.gz
logdiag-61f7536e2259dc496211dfca21b2a0e4eef3d9f4.tar.xz
logdiag-61f7536e2259dc496211dfca21b2a0e4eef3d9f4.zip
Fix to work on Windows XP
Diffstat (limited to 'Win32Depends.cmake')
-rw-r--r--Win32Depends.cmake9
1 files changed, 6 insertions, 3 deletions
diff --git a/Win32Depends.cmake b/Win32Depends.cmake
index a4b07e5..61347da 100644
--- a/Win32Depends.cmake
+++ b/Win32Depends.cmake
@@ -1,5 +1,8 @@
# Usage: cmake -P Win32Depends.cmake
+# Only CMake 3.1+ supports XZ archives and 7z doesn't also untar automatically
+cmake_minimum_required (VERSION 3.1)
+
# Directories
set (working_dir ${CMAKE_CURRENT_BINARY_DIR}/win32-depends)
set (pkg_dir ${working_dir}/packages)
@@ -123,13 +126,13 @@ foreach (pkg_set ${pkg_list})
get_filename_component (filename ${url} NAME)
message (STATUS "Extracting ${filename}...")
- if (filename MATCHES "7z$")
+ if (filename MATCHES "\\.7z$")
set (extract_command ${sevenzip_executable} x)
set (quiet OUTPUT_QUIET)
- else (filename MATCHES "7z$")
+ else (filename MATCHES "\\.7z$")
set (extract_command ${CMAKE_COMMAND} -E tar xf)
set (quiet)
- endif (filename MATCHES "7z$")
+ endif (filename MATCHES "\\.7z$")
set (filename ${pkg_dir}/${filename})
if (pkg_${pkg_set}_strip)