From 4830f27a40323fe859dc166337a2b861877b7121 Mon Sep 17 00:00:00 2001 From: manuel Date: Mon, 1 Jan 2018 13:40:09 +0100 Subject: sync with upstream --- cmake/addons/depends/windowsstore/Install.cmake | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 cmake/addons/depends/windowsstore/Install.cmake (limited to 'cmake/addons/depends/windowsstore/Install.cmake') diff --git a/cmake/addons/depends/windowsstore/Install.cmake b/cmake/addons/depends/windowsstore/Install.cmake new file mode 100644 index 0000000..9a3adbb --- /dev/null +++ b/cmake/addons/depends/windowsstore/Install.cmake @@ -0,0 +1,24 @@ +if(EXISTS "${INPUTFILE}") + # if there's an input file we use it to determine which files to copy where + file(STRINGS ${INPUTFILE} FILES) + string(REPLACE "\n" ";" FILES "${FILES}") + foreach(file ${FILES}) + string(REPLACE " " ";" file "${file}") + list(GET file 0 dir) + list(GET file 1 dest) + list(LENGTH file deflength) + if(deflength GREATER 2) + list(GET file 2 copy) + endif() + file(GLOB files ${INPUTDIR}/${dir}) + foreach(instfile ${files}) + file(COPY ${instfile} DESTINATION ${DESTDIR}/${dest}) + if(copy) + file(COPY ${instfile} DESTINATION ${DESTDIR}/${copy}) + endif() + endforeach() + endforeach() +else() + # otherwise we assume that the content of the extracted archive is already well-formed and can just be copied + file(COPY ${INPUTDIR}/${dir} DESTINATION ${DESTDIR}) +endif() \ No newline at end of file -- cgit v1.2.3