summaryrefslogtreecommitdiffstats
path: root/cmake/addons/depends/windows/Install.cmake
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 18:07:22 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 18:07:22 +0000
commitc04dcc2e7d834218ef2d4194331e383402495ae1 (patch)
tree7333e38d10d75386e60f336b80c2443c1166031d /cmake/addons/depends/windows/Install.cmake
parentInitial commit. (diff)
downloadkodi-c04dcc2e7d834218ef2d4194331e383402495ae1.tar.xz
kodi-c04dcc2e7d834218ef2d4194331e383402495ae1.zip
Adding upstream version 2:20.4+dfsg.upstream/2%20.4+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'cmake/addons/depends/windows/Install.cmake')
-rw-r--r--cmake/addons/depends/windows/Install.cmake24
1 files changed, 24 insertions, 0 deletions
diff --git a/cmake/addons/depends/windows/Install.cmake b/cmake/addons/depends/windows/Install.cmake
new file mode 100644
index 0000000..9a3adbb
--- /dev/null
+++ b/cmake/addons/depends/windows/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