summaryrefslogtreecommitdiffstats
path: root/cmake/addons
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/addons')
-rw-r--r--cmake/addons/CMakeLists.txt8
-rw-r--r--cmake/addons/depends/common/kodi-platform/kodi-platform.txt2
-rw-r--r--cmake/addons/depends/windows/cmake/mingw/CMakeLists.txt37
-rw-r--r--cmake/addons/depends/windows/cmake/mingw/MinGWConfig.cmake.in3
-rw-r--r--cmake/addons/depends/windows/cmake/mingw/Toolchain_mingw32.cmake.in17
-rw-r--r--cmake/addons/depends/windows/cmake/mingw/mingw.txt1
-rw-r--r--cmake/addons/depends/windows/cmake/mingw/mingw32-cmd.bat.in6
-rw-r--r--cmake/addons/depends/windows/cmake/mingw/noinstall.txt0
-rw-r--r--cmake/addons/depends/windows/cmake/msys/CMakeLists.txt5
-rw-r--r--cmake/addons/depends/windows/cmake/msys/msys.txt1
-rw-r--r--cmake/addons/depends/windows/cmake/msys/noinstall.txt0
11 files changed, 7 insertions, 73 deletions
diff --git a/cmake/addons/CMakeLists.txt b/cmake/addons/CMakeLists.txt
index fd1d448..5db5dba 100644
--- a/cmake/addons/CMakeLists.txt
+++ b/cmake/addons/CMakeLists.txt
@@ -1,4 +1,4 @@
1cmake_minimum_required(VERSION 3.1) 1cmake_minimum_required(VERSION 3.3)
2project(kodi-addons) 2project(kodi-addons)
3 3
4list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}) 4list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})
@@ -403,8 +403,12 @@ foreach(addon ${addons})
403 endif() 403 endif()
404 404
405 # create a forwarding target to the addon-package target 405 # create a forwarding target to the addon-package target
406 get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
407 if(_isMultiConfig)
408 set(config --config $<CONFIG>)
409 endif()
406 add_custom_target(package-${id} 410 add_custom_target(package-${id}
407 COMMAND ${CMAKE_COMMAND} --build ${id}-prefix/src/${id}-build --target addon-package 411 COMMAND ${CMAKE_COMMAND} --build ${id}-prefix/src/${id}-build ${config} --target addon-package
408 DEPENDS ${id}) 412 DEPENDS ${id})
409 add_dependencies(package-addons package-${id}) 413 add_dependencies(package-addons package-${id})
410 414
diff --git a/cmake/addons/depends/common/kodi-platform/kodi-platform.txt b/cmake/addons/depends/common/kodi-platform/kodi-platform.txt
index 1b5c8bf..c553769 100644
--- a/cmake/addons/depends/common/kodi-platform/kodi-platform.txt
+++ b/cmake/addons/depends/common/kodi-platform/kodi-platform.txt
@@ -1 +1 @@
kodi-platform https://github.com/xbmc/kodi-platform 36fb49371dbce49bf470a5bb1fc51b74b4a3612d kodi-platform https://github.com/xbmc/kodi-platform e8574b883ffa2131f2eeb96ff3724d60b21130f7
diff --git a/cmake/addons/depends/windows/cmake/mingw/CMakeLists.txt b/cmake/addons/depends/windows/cmake/mingw/CMakeLists.txt
deleted file mode 100644
index 02d9724..0000000
--- a/cmake/addons/depends/windows/cmake/mingw/CMakeLists.txt
+++ /dev/null
@@ -1,37 +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")
12if(CMAKE_SIZEOF_VOID_P EQUAL 4)
13 set(MINGW_PATH "${MSYS_PATH}/mingw32")
14elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
15 set(MINGW_PATH "${MSYS_PATH}/mingw64")
16endif()
17
18# configure the MinGW toolchain file
19configure_file(${PROJECT_SOURCE_DIR}/Toolchain_mingw32.cmake.in ${CMAKE_INSTALL_PREFIX}/Toolchain_mingw32.cmake @ONLY)
20
21# configure MinGWConfig.cmake
22configure_file(${PROJECT_SOURCE_DIR}/MinGWConfig.cmake.in ${CMAKE_INSTALL_PREFIX}/MinGWConfig.cmake)
23
24# TODO: MinGW GCC 5.3.0-1 comes without cc.exe, Remove this once package is bumped to 5.3.0-p2
25# See https://github.com/Alexpux/MINGW-packages/pull/1034
26if(NOT EXISTS ${MINGW_PATH}/bin/cc.exe)
27 execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${MINGW_PATH}/bin/gcc.exe ${MINGW_PATH}/bin/cc.exe)
28endif()
29
30# configure the MinGW wrapper batch scripts
31generate_mingw32_wrapper("make")
32generate_mingw32_wrapper("gcc")
33generate_mingw32_wrapper("cc")
34generate_mingw32_wrapper("g++")
35generate_mingw32_wrapper("ar")
36generate_mingw32_wrapper("ld")
37generate_mingw32_wrapper("windres")
diff --git a/cmake/addons/depends/windows/cmake/mingw/MinGWConfig.cmake.in b/cmake/addons/depends/windows/cmake/mingw/MinGWConfig.cmake.in
deleted file mode 100644
index 2d6baa7..0000000
--- a/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/cmake/addons/depends/windows/cmake/mingw/Toolchain_mingw32.cmake.in b/cmake/addons/depends/windows/cmake/mingw/Toolchain_mingw32.cmake.in
deleted file mode 100644
index 01d281d..0000000
--- a/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/cmake/addons/depends/windows/cmake/mingw/mingw.txt b/cmake/addons/depends/windows/cmake/mingw/mingw.txt
deleted file mode 100644
index 90aa6ae..0000000
--- a/cmake/addons/depends/windows/cmake/mingw/mingw.txt
+++ /dev/null
@@ -1 +0,0 @@
1mingw
diff --git a/cmake/addons/depends/windows/cmake/mingw/mingw32-cmd.bat.in b/cmake/addons/depends/windows/cmake/mingw/mingw32-cmd.bat.in
deleted file mode 100644
index 44a0ea2..0000000
--- a/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/cmake/addons/depends/windows/cmake/mingw/noinstall.txt b/cmake/addons/depends/windows/cmake/mingw/noinstall.txt
deleted file mode 100644
index e69de29..0000000
--- a/cmake/addons/depends/windows/cmake/mingw/noinstall.txt
+++ /dev/null
diff --git a/cmake/addons/depends/windows/cmake/msys/CMakeLists.txt b/cmake/addons/depends/windows/cmake/msys/CMakeLists.txt
deleted file mode 100644
index 1c0536e..0000000
--- a/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/cmake/addons/depends/windows/cmake/msys/msys.txt b/cmake/addons/depends/windows/cmake/msys/msys.txt
deleted file mode 100644
index 00de9c2..0000000
--- a/cmake/addons/depends/windows/cmake/msys/msys.txt
+++ /dev/null
@@ -1 +0,0 @@
1msys
diff --git a/cmake/addons/depends/windows/cmake/msys/noinstall.txt b/cmake/addons/depends/windows/cmake/msys/noinstall.txt
deleted file mode 100644
index e69de29..0000000
--- a/cmake/addons/depends/windows/cmake/msys/noinstall.txt
+++ /dev/null