summaryrefslogtreecommitdiffstats
path: root/project/cmake/addons/depends/windows/extract-7z.cmake
blob: 95a2672cc4967143d416937dfca8bc68148e6525 (plain)
1
2
3
4
5
6
7
8
9
10
get_filename_component(file ${URL} NAME)
file(DOWNLOAD ${URL} ${DEST}/${file})
execute_process(COMMAND ${7ZIP_EXECUTABLE} -y x ${DEST}/${file}
                WORKING_DIRECTORY ${DESTDIR})
if(${file} MATCHES .tar)
  string(REPLACE ".7z" "" tarball ${file})
  string(REPLACE ".lzma" "" tarball ${file})
  execute_process(COMMAND ${7ZIP_EXECUTABLE} -y x ${DESTDIR}/${tarball}
                  WORKING_DIRECTORY ${DESTDIR})
endif()