summaryrefslogtreecommitdiffstats
path: root/cmake/modules/ExtractArchiveList.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/modules/ExtractArchiveList.cmake')
-rw-r--r--cmake/modules/ExtractArchiveList.cmake9
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)