summaryrefslogtreecommitdiffstats
path: root/project/cmake/addons/depends/windows
diff options
context:
space:
mode:
Diffstat (limited to 'project/cmake/addons/depends/windows')
-rw-r--r--project/cmake/addons/depends/windows/CMakeLists.txt52
-rw-r--r--project/cmake/addons/depends/windows/Install.cmake24
-rw-r--r--project/cmake/addons/depends/windows/README19
-rw-r--r--project/cmake/addons/depends/windows/cmake/mingw/CMakeLists.txt33
-rw-r--r--project/cmake/addons/depends/windows/cmake/mingw/MinGWConfig.cmake.in3
-rw-r--r--project/cmake/addons/depends/windows/cmake/mingw/Toolchain_mingw32.cmake.in17
-rw-r--r--project/cmake/addons/depends/windows/cmake/mingw/mingw.txt1
-rw-r--r--project/cmake/addons/depends/windows/cmake/mingw/mingw32-cmd.bat.in6
-rw-r--r--project/cmake/addons/depends/windows/cmake/mingw/noinstall.txt0
-rw-r--r--project/cmake/addons/depends/windows/cmake/msys/CMakeLists.txt5
-rw-r--r--project/cmake/addons/depends/windows/cmake/msys/msys.txt1
-rw-r--r--project/cmake/addons/depends/windows/cmake/msys/noinstall.txt0
-rw-r--r--project/cmake/addons/depends/windows/prebuilt/README21
13 files changed, 0 insertions, 182 deletions
diff --git a/project/cmake/addons/depends/windows/CMakeLists.txt b/project/cmake/addons/depends/windows/CMakeLists.txt
deleted file mode 100644
index c8739c0..0000000
--- a/project/cmake/addons/depends/windows/CMakeLists.txt
+++ /dev/null
@@ -1,52 +0,0 @@
1cmake_minimum_required(VERSION 3.1)
2project(kodi-addons-depends-windows)
3
4list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})
5
6if(NOT CMAKE_BUILD_TYPE)
7 set(CMAKE_BUILD_TYPE Release)
8endif()
9
10include(ExternalProject)
11
12if(NOT ADDON_DEPENDS_PATH)
13 message(FATAL_ERROR "ADDON_DEPENDS_PATH (${ADDON_DEPENDS_PATH}) is not a valid target directory.")
14else()
15 file(TO_CMAKE_PATH "${ADDON_DEPENDS_PATH}" ADDON_DEPENDS_PATH)
16endif()
17get_filename_component(ADDON_DEPENDS_PATH "${ADDON_DEPENDS_PATH}" ABSOLUTE)
18list(APPEND CMAKE_PREFIX_PATH ${ADDON_DEPENDS_PATH})
19
20if(NOT DEPENDS_TO_BUILD)
21 set(DEPENDS_TO_BUILD "all")
22endif()
23
24function(add_internal id url inputfile)
25 externalproject_add(${id}
26 URL ${url}
27 PREFIX build/${id}
28 CONFIGURE_COMMAND ""
29 BUILD_COMMAND ""
30 INSTALL_COMMAND ${CMAKE_COMMAND}
31 -DINPUTDIR=${PROJECT_BINARY_DIR}/build/${id}/src/${id}
32 -DINPUTFILE=${inputfile}
33 -DDESTDIR=${ADDON_DEPENDS_PATH}
34 -P ${PROJECT_SOURCE_DIR}/Install.cmake
35 )
36endfunction()
37
38file(GLOB_RECURSE download_input_files prebuilt/*.txt)
39foreach(file ${download_input_files})
40 if(NOT file MATCHES install.txt)
41 file(STRINGS ${file} def)
42 get_filename_component(dir ${file} DIRECTORY)
43 string(REPLACE " " ";" def ${def})
44 list(GET def 0 id)
45
46 list(FIND DEPENDS_TO_BUILD ${id} idx)
47 if(idx GREATER -1 OR DEPENDS_TO_BUILD STREQUAL "all")
48 list(GET def 1 url)
49 add_internal(${id} ${url} ${dir}/install.txt)
50 endif()
51 endif()
52endforeach()
diff --git a/project/cmake/addons/depends/windows/Install.cmake b/project/cmake/addons/depends/windows/Install.cmake
deleted file mode 100644
index 9a3adbb..0000000
--- a/project/cmake/addons/depends/windows/Install.cmake
+++ /dev/null
@@ -1,24 +0,0 @@
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
diff --git a/project/cmake/addons/depends/windows/README b/project/cmake/addons/depends/windows/README
deleted file mode 100644
index 67dc594..0000000
--- a/project/cmake/addons/depends/windows/README
+++ /dev/null
@@ -1,19 +0,0 @@
1KODI WIN32 ADDON DEPENDENCIES
2=============================
3This directory contains the cmake-based buildsystem for dependencies (currently
4only prebuilt) used by one or multiple addons. The buildsystem looks into the
5"prebuilt" sub-directory, downloads all the specified dependencies, extracts
6them and places them into the "depends" sub-directory.
7
8To trigger the cmake-based buildsystem the following command must be executed
9with <path> being the path to this directory (absolute or relative, allowing for
10in-source and out-of-source builds).
11
12 cmake <path> [-G <generator>]
13
14cmake supports multiple generators, see
15http://www.cmake.org/cmake/help/v2.8.8/cmake.html#section_Generators for a list.
16For win32 builds one of the "Visual Studio XX" or the "NMake Makefiles"
17generators is preferred. For the "NMake Makefiles" generator to work the above
18command must be called from an environment prepared for VC++ builds (see
19http://msdn.microsoft.com/en-us/library/f2ccy3wt.aspx).
diff --git a/project/cmake/addons/depends/windows/cmake/mingw/CMakeLists.txt b/project/cmake/addons/depends/windows/cmake/mingw/CMakeLists.txt
deleted file mode 100644
index 2c2c4b8..0000000
--- a/project/cmake/addons/depends/windows/cmake/mingw/CMakeLists.txt
+++ /dev/null
@@ -1,33 +0,0 @@
1cmake_minimum_required(VERSION 3.1)
2project(mingw)
3
4function(generate_mingw32_wrapper cmd)
5 set(CMD ${cmd})
6 configure_file(${PROJECT_SOURCE_DIR}/mingw32-cmd.bat.in ${MINGW_PATH}/bin/${CMD}.bat @ONLY)
7endfunction()
8
9get_filename_component(CORE_SOURCE_DIR ${PROJECT_SOURCE_DIR}/../../../../../../.. REALPATH)
10
11set(MSYS_PATH "${CORE_SOURCE_DIR}/project/BuildDependencies/msys64")
12set(MINGW_PATH "${MSYS_PATH}/mingw32")
13
14# configure the MinGW toolchain file
15configure_file(${PROJECT_SOURCE_DIR}/Toolchain_mingw32.cmake.in ${CMAKE_INSTALL_PREFIX}/Toolchain_mingw32.cmake @ONLY)
16
17# configure MinGWConfig.cmake
18configure_file(${PROJECT_SOURCE_DIR}/MinGWConfig.cmake.in ${CMAKE_INSTALL_PREFIX}/MinGWConfig.cmake)
19
20# TODO: MinGW GCC 5.3.0-1 comes without cc.exe, Remove this once package is bumped to 5.3.0-p2
21# See https://github.com/Alexpux/MINGW-packages/pull/1034
22if(NOT EXISTS ${MINGW_PATH}/bin/cc.exe)
23 execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${MINGW_PATH}/bin/gcc.exe ${MINGW_PATH}/bin/cc.exe)
24endif()
25
26# configure the MinGW wrapper batch scripts
27generate_mingw32_wrapper("make")
28generate_mingw32_wrapper("gcc")
29generate_mingw32_wrapper("cc")
30generate_mingw32_wrapper("g++")
31generate_mingw32_wrapper("ar")
32generate_mingw32_wrapper("ld")
33generate_mingw32_wrapper("windres")
diff --git a/project/cmake/addons/depends/windows/cmake/mingw/MinGWConfig.cmake.in b/project/cmake/addons/depends/windows/cmake/mingw/MinGWConfig.cmake.in
deleted file mode 100644
index 2d6baa7..0000000
--- a/project/cmake/addons/depends/windows/cmake/mingw/MinGWConfig.cmake.in
+++ /dev/null
@@ -1,3 +0,0 @@
1set(MINGW_INCLUDE_DIRS @MINGW_PATH@/include)
2set(MINGW_MAKE @MINGW_PATH@/bin/make.bat -j$ENV{NUMBER_OF_PROCESSORS})
3set(MINGW_FOUND 1)
diff --git a/project/cmake/addons/depends/windows/cmake/mingw/Toolchain_mingw32.cmake.in b/project/cmake/addons/depends/windows/cmake/mingw/Toolchain_mingw32.cmake.in
deleted file mode 100644
index 01d281d..0000000
--- a/project/cmake/addons/depends/windows/cmake/mingw/Toolchain_mingw32.cmake.in
+++ /dev/null
@@ -1,17 +0,0 @@
1set(CMAKE_SYSTEM_VERSION 1)
2set(CMAKE_SYSTEM_NAME Windows)
3
4set(CMAKE_FIND_ROOT_PATH @CMAKE_FIND_ROOT_PATH@ @CMAKE_INSTALL_PREFIX@ @MSYS_PATH@ @MINGW_PATH@)
5
6# specify the cross compiler
7set(CMAKE_C_COMPILER @MINGW_PATH@/bin/gcc.bat)
8set(CMAKE_CXX_COMPILER @MINGW_PATH@/bin/g++.bat)
9set(CMAKE_AR @MINGW_PATH@/bin/ar.bat CACHE FILEPATH "Archiver")
10set(CMAKE_LINKER @MINGW_PATH@/bin/ld.bat CACHE FILEPATH "Linker")
11SET(CMAKE_RC_COMPILER @MINGW_PATH@/bin/windres.bat)
12
13# search for programs in the build host directories
14set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
15# for libraries and headers in the target directories
16set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
17set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
diff --git a/project/cmake/addons/depends/windows/cmake/mingw/mingw.txt b/project/cmake/addons/depends/windows/cmake/mingw/mingw.txt
deleted file mode 100644
index 90aa6ae..0000000
--- a/project/cmake/addons/depends/windows/cmake/mingw/mingw.txt
+++ /dev/null
@@ -1 +0,0 @@
1mingw
diff --git a/project/cmake/addons/depends/windows/cmake/mingw/mingw32-cmd.bat.in b/project/cmake/addons/depends/windows/cmake/mingw/mingw32-cmd.bat.in
deleted file mode 100644
index 44a0ea2..0000000
--- a/project/cmake/addons/depends/windows/cmake/mingw/mingw32-cmd.bat.in
+++ /dev/null
@@ -1,6 +0,0 @@
1@ECHO OFF
2SETLOCAL
3
4SET PATH=@MINGW_PATH@/bin;@MSYS_PATH@/usr/bin;%PATH%
5@CMD@.exe %*
6
diff --git a/project/cmake/addons/depends/windows/cmake/mingw/noinstall.txt b/project/cmake/addons/depends/windows/cmake/mingw/noinstall.txt
deleted file mode 100644
index e69de29..0000000
--- a/project/cmake/addons/depends/windows/cmake/mingw/noinstall.txt
+++ /dev/null
diff --git a/project/cmake/addons/depends/windows/cmake/msys/CMakeLists.txt b/project/cmake/addons/depends/windows/cmake/msys/CMakeLists.txt
deleted file mode 100644
index 1c0536e..0000000
--- a/project/cmake/addons/depends/windows/cmake/msys/CMakeLists.txt
+++ /dev/null
@@ -1,5 +0,0 @@
1cmake_minimum_required(VERSION 3.1)
2project(msys LANGUAGES NONE)
3
4# This is an empty dummy dependency because a lot of game addons depend on it.
5# After they got fixed, this can be removed.
diff --git a/project/cmake/addons/depends/windows/cmake/msys/msys.txt b/project/cmake/addons/depends/windows/cmake/msys/msys.txt
deleted file mode 100644
index 00de9c2..0000000
--- a/project/cmake/addons/depends/windows/cmake/msys/msys.txt
+++ /dev/null
@@ -1 +0,0 @@
1msys
diff --git a/project/cmake/addons/depends/windows/cmake/msys/noinstall.txt b/project/cmake/addons/depends/windows/cmake/msys/noinstall.txt
deleted file mode 100644
index e69de29..0000000
--- a/project/cmake/addons/depends/windows/cmake/msys/noinstall.txt
+++ /dev/null
diff --git a/project/cmake/addons/depends/windows/prebuilt/README b/project/cmake/addons/depends/windows/prebuilt/README
deleted file mode 100644
index a0c70d6..0000000
--- a/project/cmake/addons/depends/windows/prebuilt/README
+++ /dev/null
@@ -1,21 +0,0 @@
1KODI WIN32 PREBUILT ADDON DEPENDENCIES
2======================================
3This directory contains a file or sub-directory for every prebuilt dependency
4used by one of the addons being built. There are two different modes supported.
5Both include a file named <library-id>.txt which must follow the defined format
6 <library-id> <download-url>
7
8If the archive, which the <download-url> points at, contains
9 * only the necessary files and in the proper directory structure (i.e. an
10 "include" and a "lib" directory) then the file must be put into this
11 directory and nothing else is needed.
12 * unnecessary files and/or does not follow the defined directory structure
13 (i.e. an "include" and a "lib" directory) then the file must be put into a
14 sub-directory named <library-id>. Furthermore an additional file called
15 "install.txt" must be placed in that sub-directory. install.txt contains a
16 line for every path/directory/file with a destination where it must be copied
17 to. It must follow the defined format
18 <source> <destination> [<copy-destination>]
19 where <source> must be an existing file, directory or a path containing
20 wildcards, <destination> and the optional <copy-destination> must be existing
21 directories.