diff options
author | Sven Gothel <[email protected]> | 2021-01-27 03:32:49 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2021-01-27 03:32:49 +0100 |
commit | ad76f1abdb12bf05e330ebfa9653728fe20806f0 (patch) | |
tree | 5ecb759bfa4f614c0d0e281939843de4ab2b3151 /cmake | |
parent | c1e4cc9b7b020c482f085fe1647dea292ed49171 (diff) |
cmake/modules/ExtractArchiveList.cmake: Use native unzip if cmake < 3.18.0v0.2.22
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 c6d4e44..18694ee 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) |