diff options
author | Sven Gothel <[email protected]> | 2021-01-27 03:34:01 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2021-01-27 03:34:01 +0100 |
commit | 4c98e69eb053411f419a387752e966f590088aa9 (patch) | |
tree | 5abf388508ba23ad20947f99ac8708224e1ba4f3 /cmake | |
parent | 0360a0fa6a68f3e20f3b8347538867c1a56b4c84 (diff) |
cmake/modules/ExtractArchiveList.cmake: Use native unzip if cmake < 3.18.0
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/ExtractArchiveList.cmake | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cmake/modules/ExtractArchiveList.cmake b/cmake/modules/ExtractArchiveList.cmake index c6d4e448..18694eeb 100644 --- a/cmake/modules/ExtractArchiveList.cmake +++ b/cmake/modules/ExtractArchiveList.cmake @@ -11,8 +11,13 @@ string(REPLACE " " ";" l2 ${l1}) # message(STATUS "X2: <${l2}>, len ${len}") foreach(item ${l2}) - message(STATUS "unzip ${item} -> ${_dstdir}") - file(ARCHIVE_EXTRACT INPUT ${item} DESTINATION ${_dstdir}) + if(${CMAKE_VERSION} VERSION_LESS "3.18.0") + message(STATUS "unzip-native ${item} -> ${_dstdir}") + execute_process(COMMAND unzip -qq ${item} -d ${_dstdir}) + else() + message(STATUS "unzip-cmake ${item} -> ${_dstdir}") + file(ARCHIVE_EXTRACT INPUT ${item} DESTINATION ${_dstdir}) + endif() endforeach() unset(l1) |