summaryrefslogtreecommitdiffstats
path: root/cmake/addons/depends/windowsstore/Install.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/addons/depends/windowsstore/Install.cmake')
-rw-r--r--cmake/addons/depends/windowsstore/Install.cmake24
1 files changed, 24 insertions, 0 deletions
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 @@
1if(EXISTS "${INPUTFILE}")
2 # if there's an input file we use it to determine which files to copy where
3 file(STRINGS ${INPUTFILE} FILES)
4 string(REPLACE "\n" ";" FILES "${FILES}")
5 foreach(file ${FILES})
6 string(REPLACE " " ";" file "${file}")
7 list(GET file 0 dir)
8 list(GET file 1 dest)
9 list(LENGTH file deflength)
10 if(deflength GREATER 2)
11 list(GET file 2 copy)
12 endif()
13 file(GLOB files ${INPUTDIR}/${dir})
14 foreach(instfile ${files})
15 file(COPY ${instfile} DESTINATION ${DESTDIR}/${dest})
16 if(copy)
17 file(COPY ${instfile} DESTINATION ${DESTDIR}/${copy})
18 endif()
19 endforeach()
20 endforeach()
21else()
22 # otherwise we assume that the content of the extracted archive is already well-formed and can just be copied
23 file(COPY ${INPUTDIR}/${dir} DESTINATION ${DESTDIR})
24endif() \ No newline at end of file