diff options
Diffstat (limited to 'project')
42 files changed, 657 insertions, 279 deletions
diff --git a/project/cmake/CMakeLists.txt b/project/cmake/CMakeLists.txt index fa1156d..c70b18d 100644 --- a/project/cmake/CMakeLists.txt +++ b/project/cmake/CMakeLists.txt | |||
| @@ -45,14 +45,14 @@ option(ENABLE_NONFREE "Enable non-free components?" ON) | |||
| 45 | option(ENABLE_AIRTUNES "Enable AirTunes support?" ON) | 45 | option(ENABLE_AIRTUNES "Enable AirTunes support?" ON) |
| 46 | option(ENABLE_CEC "Enable CEC support?" ON) | 46 | option(ENABLE_CEC "Enable CEC support?" ON) |
| 47 | option(ENABLE_OPTICAL "Enable optical support?" ON) | 47 | option(ENABLE_OPTICAL "Enable optical support?" ON) |
| 48 | # use ffmpeg from depends or system | ||
| 49 | option(ENABLE_INTERNAL_FFMPEG "Enable internal ffmpeg?" OFF) | ||
| 48 | if(UNIX) | 50 | if(UNIX) |
| 49 | if(NOT APPLE) | ||
| 50 | option(ENABLE_INTERNAL_FFMPEG "Enable internal ffmpeg?" ON) | ||
| 51 | endif() | ||
| 52 | option(FFMPEG_PATH "Path to external ffmpeg?" "") | 51 | option(FFMPEG_PATH "Path to external ffmpeg?" "") |
| 53 | option(ENABLE_INTERNAL_CROSSGUID "Enable internal crossguid?" ON) | 52 | option(ENABLE_INTERNAL_CROSSGUID "Enable internal crossguid?" ON) |
| 54 | option(ENABLE_OPENSSL "Enable OpenSSL?" ON) | 53 | option(ENABLE_OPENSSL "Enable OpenSSL?" ON) |
| 55 | option(ENABLE_SDL "Enable SDL?" OFF) | 54 | option(ENABLE_SDL "Enable SDL?" OFF) |
| 55 | option(ENABLE_MIR "Enable MIR?" OFF) | ||
| 56 | if(CORE_SYSTEM_NAME STREQUAL linux OR CORE_SYSTEM_NAME STREQUAL freebsd) | 56 | if(CORE_SYSTEM_NAME STREQUAL linux OR CORE_SYSTEM_NAME STREQUAL freebsd) |
| 57 | option(ENABLE_X11 "Enable X11 support?" ON) | 57 | option(ENABLE_X11 "Enable X11 support?" ON) |
| 58 | option(ENABLE_AML "Enable AML?" OFF) | 58 | option(ENABLE_AML "Enable AML?" OFF) |
| @@ -119,7 +119,7 @@ endif() | |||
| 119 | # Optional dependencies | 119 | # Optional dependencies |
| 120 | set(optional_deps MicroHttpd MySqlClient SSH XSLT | 120 | set(optional_deps MicroHttpd MySqlClient SSH XSLT |
| 121 | Alsa UDEV DBus Avahi SmbClient | 121 | Alsa UDEV DBus Avahi SmbClient |
| 122 | PulseAudio VDPAU VAAPI) | 122 | PulseAudio VDPAU VAAPI Bluetooth CAP) |
| 123 | 123 | ||
| 124 | # Required, dyloaded deps | 124 | # Required, dyloaded deps |
| 125 | set(required_dyload Curl ASS) | 125 | set(required_dyload Curl ASS) |
| @@ -197,14 +197,24 @@ endif() | |||
| 197 | if(NOT WIN32) | 197 | if(NOT WIN32) |
| 198 | core_optional_dep(OpenGl) | 198 | core_optional_dep(OpenGl) |
| 199 | if(OPENGL_FOUND) | 199 | if(OPENGL_FOUND) |
| 200 | core_optional_dep(X ENABLE_X11) | 200 | if(ENABLE_MIR) |
| 201 | core_optional_dep(LibDRM ENABLE_X11) | 201 | core_require_dep(Mir ENABLE_MIR) |
| 202 | core_optional_dep(XRandR ENABLE_X11) | 202 | core_optional_dep(LibDRM ENABLE_MIR) |
| 203 | else() | ||
| 204 | core_optional_dep(X ENABLE_X11) | ||
| 205 | core_optional_dep(XRandR ENABLE_X11) | ||
| 206 | core_optional_dep(LibDRM ENABLE_X11) | ||
| 207 | endif() | ||
| 203 | else() | 208 | else() |
| 204 | core_optional_dep(OpenGLES) | 209 | core_optional_dep(OpenGLES) |
| 205 | if(OPENGLES_FOUND) | 210 | if(OPENGLES_FOUND) |
| 206 | core_optional_dep(X ENABLE_X11) | 211 | if(ENABLE_MIR) |
| 207 | core_optional_dep(LibDRM ENABLE_X11) | 212 | core_require_dep(Mir ENABLE_MIR) |
| 213 | core_optional_dep(LibDRM ENABLE_MIR) | ||
| 214 | else() | ||
| 215 | core_optional_dep(X ENABLE_X11) | ||
| 216 | core_optional_dep(LibDRM ENABLE_X11) | ||
| 217 | endif() | ||
| 208 | endif() | 218 | endif() |
| 209 | endif() | 219 | endif() |
| 210 | if(NOT APPLE) | 220 | if(NOT APPLE) |
| @@ -337,9 +347,12 @@ unset(_MAIN_LIBRARIES) | |||
| 337 | if(WIN32) | 347 | if(WIN32) |
| 338 | set_target_properties(${APP_NAME_LC} PROPERTIES WIN32_EXECUTABLE ON) | 348 | set_target_properties(${APP_NAME_LC} PROPERTIES WIN32_EXECUTABLE ON) |
| 339 | set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT ${APP_NAME_LC}) | 349 | set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT ${APP_NAME_LC}) |
| 340 | target_sources(kodi PRIVATE ${CORE_SOURCE_DIR}/xbmc/platform/win32/app.manifest) | 350 | target_sources(${APP_NAME_LC} PRIVATE ${CORE_SOURCE_DIR}/xbmc/platform/win32/app.manifest) |
| 341 | elseif(CORE_SYSTEM_NAME STREQUAL android) | 351 | elseif(CORE_SYSTEM_NAME STREQUAL android) |
| 342 | # Nothing | 352 | # Nothing |
| 353 | elseif(CORE_SYSTEM_NAME STREQUAL ios) | ||
| 354 | set_target_properties(${APP_NAME_LC} PROPERTIES OUTPUT_NAME ${APP_NAME} | ||
| 355 | MACOSX_BUNDLE_INFO_PLIST ${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/Info.plist.in) | ||
| 343 | else() | 356 | else() |
| 344 | set_target_properties(${APP_NAME_LC} PROPERTIES SUFFIX ".bin") | 357 | set_target_properties(${APP_NAME_LC} PROPERTIES SUFFIX ".bin") |
| 345 | endif() | 358 | endif() |
diff --git a/project/cmake/addons/depends/windows/cmake/mingw/CMakeLists.txt b/project/cmake/addons/depends/windows/cmake/mingw/CMakeLists.txt new file mode 100644 index 0000000..2c2c4b8 --- /dev/null +++ b/project/cmake/addons/depends/windows/cmake/mingw/CMakeLists.txt | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | cmake_minimum_required(VERSION 3.1) | ||
| 2 | project(mingw) | ||
| 3 | |||
| 4 | function(generate_mingw32_wrapper cmd) | ||
| 5 | set(CMD ${cmd}) | ||
| 6 | configure_file(${PROJECT_SOURCE_DIR}/mingw32-cmd.bat.in ${MINGW_PATH}/bin/${CMD}.bat @ONLY) | ||
| 7 | endfunction() | ||
| 8 | |||
| 9 | get_filename_component(CORE_SOURCE_DIR ${PROJECT_SOURCE_DIR}/../../../../../../.. REALPATH) | ||
| 10 | |||
| 11 | set(MSYS_PATH "${CORE_SOURCE_DIR}/project/BuildDependencies/msys64") | ||
| 12 | set(MINGW_PATH "${MSYS_PATH}/mingw32") | ||
| 13 | |||
| 14 | # configure the MinGW toolchain file | ||
| 15 | configure_file(${PROJECT_SOURCE_DIR}/Toolchain_mingw32.cmake.in ${CMAKE_INSTALL_PREFIX}/Toolchain_mingw32.cmake @ONLY) | ||
| 16 | |||
| 17 | # configure MinGWConfig.cmake | ||
| 18 | configure_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 | ||
| 22 | if(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) | ||
| 24 | endif() | ||
| 25 | |||
| 26 | # configure the MinGW wrapper batch scripts | ||
| 27 | generate_mingw32_wrapper("make") | ||
| 28 | generate_mingw32_wrapper("gcc") | ||
| 29 | generate_mingw32_wrapper("cc") | ||
| 30 | generate_mingw32_wrapper("g++") | ||
| 31 | generate_mingw32_wrapper("ar") | ||
| 32 | generate_mingw32_wrapper("ld") | ||
| 33 | generate_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 new file mode 100644 index 0000000..2d6baa7 --- /dev/null +++ b/project/cmake/addons/depends/windows/cmake/mingw/MinGWConfig.cmake.in | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | set(MINGW_INCLUDE_DIRS @MINGW_PATH@/include) | ||
| 2 | set(MINGW_MAKE @MINGW_PATH@/bin/make.bat -j$ENV{NUMBER_OF_PROCESSORS}) | ||
| 3 | set(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 new file mode 100644 index 0000000..01d281d --- /dev/null +++ b/project/cmake/addons/depends/windows/cmake/mingw/Toolchain_mingw32.cmake.in | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | set(CMAKE_SYSTEM_VERSION 1) | ||
| 2 | set(CMAKE_SYSTEM_NAME Windows) | ||
| 3 | |||
| 4 | set(CMAKE_FIND_ROOT_PATH @CMAKE_FIND_ROOT_PATH@ @CMAKE_INSTALL_PREFIX@ @MSYS_PATH@ @MINGW_PATH@) | ||
| 5 | |||
| 6 | # specify the cross compiler | ||
| 7 | set(CMAKE_C_COMPILER @MINGW_PATH@/bin/gcc.bat) | ||
| 8 | set(CMAKE_CXX_COMPILER @MINGW_PATH@/bin/g++.bat) | ||
| 9 | set(CMAKE_AR @MINGW_PATH@/bin/ar.bat CACHE FILEPATH "Archiver") | ||
| 10 | set(CMAKE_LINKER @MINGW_PATH@/bin/ld.bat CACHE FILEPATH "Linker") | ||
| 11 | SET(CMAKE_RC_COMPILER @MINGW_PATH@/bin/windres.bat) | ||
| 12 | |||
| 13 | # search for programs in the build host directories | ||
| 14 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) | ||
| 15 | # for libraries and headers in the target directories | ||
| 16 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) | ||
| 17 | set(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 new file mode 100644 index 0000000..90aa6ae --- /dev/null +++ b/project/cmake/addons/depends/windows/cmake/mingw/mingw.txt | |||
| @@ -0,0 +1 @@ | |||
| mingw | |||
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 new file mode 100644 index 0000000..44a0ea2 --- /dev/null +++ b/project/cmake/addons/depends/windows/cmake/mingw/mingw32-cmd.bat.in | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | @ECHO OFF | ||
| 2 | SETLOCAL | ||
| 3 | |||
| 4 | SET 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 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/project/cmake/addons/depends/windows/cmake/mingw/noinstall.txt | |||
diff --git a/project/cmake/addons/depends/windows/cmake/msys/CMakeLists.txt b/project/cmake/addons/depends/windows/cmake/msys/CMakeLists.txt new file mode 100644 index 0000000..1c0536e --- /dev/null +++ b/project/cmake/addons/depends/windows/cmake/msys/CMakeLists.txt | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | cmake_minimum_required(VERSION 3.1) | ||
| 2 | project(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 new file mode 100644 index 0000000..00de9c2 --- /dev/null +++ b/project/cmake/addons/depends/windows/cmake/msys/msys.txt | |||
| @@ -0,0 +1 @@ | |||
| msys | |||
diff --git a/project/cmake/addons/depends/windows/cmake/msys/noinstall.txt b/project/cmake/addons/depends/windows/cmake/msys/noinstall.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/project/cmake/addons/depends/windows/cmake/msys/noinstall.txt | |||
diff --git a/project/cmake/cpack/deb/copyright b/project/cmake/cpack/deb/copyright index 5616264..a79cf54 100644 --- a/project/cmake/cpack/deb/copyright +++ b/project/cmake/cpack/deb/copyright | |||
| @@ -529,84 +529,6 @@ projectM - OpenGL based advanced music visualization program | |||
| 529 | You should have received a copy of the GNU Lesser General Public License | 529 | You should have received a copy of the GNU Lesser General Public License |
| 530 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 530 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 531 | 531 | ||
| 532 | GLEW - The OpenGL Extension Wrangler Library | ||
| 533 | <http://glew.sourceforge.net/> | ||
| 534 | |||
| 535 | Copyright © 2002-2008, Milan Ikits <milan ikits[]ieee org> | ||
| 536 | Copyright © 2002-2008, Marcelo E. Magallon <mmagallo[]debian org> | ||
| 537 | Copyright © 2002, Lev Povalahev | ||
| 538 | Copyright © 1999-2007 Brian Paul | ||
| 539 | Copyright © 2007 The Khronos Group Inc. | ||
| 540 | All Rights Reserved. | ||
| 541 | |||
| 542 | Falls under three licenses, which are the Modified BSD License, the Mesa 3-D | ||
| 543 | License (MIT License), and the Khronos License (MIT License). | ||
| 544 | |||
| 545 | Modified BSD License | ||
| 546 | |||
| 547 | Redistribution and use in source and binary forms, with or without | ||
| 548 | modification, are permitted provided that the following conditions are met: | ||
| 549 | |||
| 550 | * Redistributions of source code must retain the above copyright notice, | ||
| 551 | this list of conditions and the following disclaimer. | ||
| 552 | * Redistributions in binary form must reproduce the above copyright notice, | ||
| 553 | this list of conditions and the following disclaimer in the documentation | ||
| 554 | and/or other materials provided with the distribution. | ||
| 555 | * The name of the author may be used to endorse or promote products | ||
| 556 | derived from this software without specific prior written permission. | ||
| 557 | |||
| 558 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
| 559 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 560 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 561 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||
| 562 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
| 563 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
| 564 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
| 565 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
| 566 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 567 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF | ||
| 568 | THE POSSIBILITY OF SUCH DAMAGE. | ||
| 569 | |||
| 570 | Mesa 3-D License (MIT License) | ||
| 571 | |||
| 572 | Permission is hereby granted, free of charge, to any person obtaining a | ||
| 573 | copy of this software and associated documentation files (the "Software"), | ||
| 574 | to deal in the Software without restriction, including without limitation | ||
| 575 | the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
| 576 | and/or sell copies of the Software, and to permit persons to whom the | ||
| 577 | Software is furnished to do so, subject to the following conditions: | ||
| 578 | |||
| 579 | The above copyright notice and this permission notice shall be included | ||
| 580 | in all copies or substantial portions of the Software. | ||
| 581 | |||
| 582 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
| 583 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 584 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 585 | BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN | ||
| 586 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
| 587 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 588 | |||
| 589 | Khronos License (MIT License) | ||
| 590 | |||
| 591 | Permission is hereby granted, free of charge, to any person obtaining a | ||
| 592 | copy of this software and/or associated documentation files (the | ||
| 593 | "Materials"), to deal in the Materials without restriction, including | ||
| 594 | without limitation the rights to use, copy, modify, merge, publish, | ||
| 595 | distribute, sublicense, and/or sell copies of the Materials, and to | ||
| 596 | permit persons to whom the Materials are furnished to do so, subject to | ||
| 597 | the following conditions: | ||
| 598 | |||
| 599 | The above copyright notice and this permission notice shall be included | ||
| 600 | in all copies or substantial portions of the Materials. | ||
| 601 | |||
| 602 | THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
| 603 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
| 604 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
| 605 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
| 606 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
| 607 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
| 608 | MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. | ||
| 609 | |||
| 610 | OpenDAAP | 532 | OpenDAAP |
| 611 | <http://www.opendaap.org/> | 533 | <http://www.opendaap.org/> |
| 612 | 534 | ||
| @@ -809,28 +731,6 @@ GNU libmicrohttpd | |||
| 809 | You should have received a copy of the GNU Lesser General Public License | 731 | You should have received a copy of the GNU Lesser General Public License |
| 810 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 732 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 811 | 733 | ||
| 812 | libmodplug | ||
| 813 | <http://modplug-xmms.sourceforge.net> | ||
| 814 | |||
| 815 | Copyright 2002-2003 Kenton Varda <temporal@gauge3d.org>, | ||
| 816 | Olivier Lapicque <olivierl@jps.net>, | ||
| 817 | Colin DeVilbiss <crdevilb@mtu.edu>, | ||
| 818 | Markus Fick <marf@gmx.net>, | ||
| 819 | Adam Goode <adam@evdebs.org> | ||
| 820 | |||
| 821 | This library is free software; you can redistribute it and/or | ||
| 822 | modify it under the terms of the GNU Lesser General Public | ||
| 823 | License as published by the Free Software Foundation; either | ||
| 824 | version 2.1 of the License, or (at your option) any later version. | ||
| 825 | |||
| 826 | This library is distributed in the hope that it will be useful, | ||
| 827 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 828 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 829 | Lesser General Public License for more details. | ||
| 830 | |||
| 831 | You should have received a copy of the GNU Lesser General Public License | ||
| 832 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 833 | |||
| 834 | Python Programming Language | 734 | Python Programming Language |
| 835 | <http://www.python.org/> | 735 | <http://www.python.org/> |
| 836 | 736 | ||
| @@ -2430,24 +2330,6 @@ libnfs - NFS client library | |||
| 2430 | You should have received a copy of the GNU Lesser General Public License | 2330 | You should have received a copy of the GNU Lesser General Public License |
| 2431 | along with this library. If not, see <http://www.gnu.org/licenses/>. | 2331 | along with this library. If not, see <http://www.gnu.org/licenses/>. |
| 2432 | 2332 | ||
| 2433 | librtmp - toolkit for RTMP streams | ||
| 2434 | |||
| 2435 | Copyright (C) 2009 Andrej Stepanchuk | ||
| 2436 | Copyright (C) 2009-2010 Howard Chu | ||
| 2437 | |||
| 2438 | This program is free software; you can redistribute it and/or modify | ||
| 2439 | it under the terms of the GNU General Public License as published by | ||
| 2440 | the Free Software Foundation; either version 2 of the License, or | ||
| 2441 | (at your option) any later version. | ||
| 2442 | |||
| 2443 | This program is distributed in the hope that it will be useful, | ||
| 2444 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 2445 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 2446 | GNU General Public License for more details. | ||
| 2447 | |||
| 2448 | You should have received a copy of the GNU General Public License | ||
| 2449 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 2450 | |||
| 2451 | libsquish - Open source DXT compression library | 2333 | libsquish - Open source DXT compression library |
| 2452 | 2334 | ||
| 2453 | Copyright (C) 2006 Simon Brown <si@sjbrown.co.uk> | 2335 | Copyright (C) 2006 Simon Brown <si@sjbrown.co.uk> |
diff --git a/project/cmake/cpack/deb/packages/kodi.txt.in b/project/cmake/cpack/deb/packages/kodi.txt.in index 3a5cde1..4ca417b 100644 --- a/project/cmake/cpack/deb/packages/kodi.txt.in +++ b/project/cmake/cpack/deb/packages/kodi.txt.in | |||
| @@ -15,7 +15,7 @@ PACKAGE_ARCHITECTURE all | |||
| 15 | PACKAGE_SECTION video | 15 | PACKAGE_SECTION video |
| 16 | PACKAGE_PRIORITY optional | 16 | PACKAGE_PRIORITY optional |
| 17 | PACKAGE_SHLIBDEPS | 17 | PACKAGE_SHLIBDEPS |
| 18 | PACKAGE_DEPENDS @APP_NAME_LC@-bin (>= @CPACK_DEBIAN_PACKAGE_VERSION@), @APP_NAME_LC@-bin (<< @CPACK_DEBIAN_PACKAGE_VERSION@.1~), curl, libcurl3, mesa-utils, x11-utils, fonts-liberation | ttf-liberation, fonts-dejavu-core | ttf-dejavu-core, python-bluez | python-lightblue, python-imaging, python-simplejson, libmad0, libass5 | libass4, libgif5 | libgif7, libssh-4 | libssh2-1, libnfs8 | libnfs4 | libnfs1, libbluray1, libshairplay0, libvorbisfile3, libaacs0, libcec3, librtmp1 | librtmp0, libgnutls30 | libgnutls-deb0-28 | libgnutls28 | libgnutls26, libxslt1.1, libyajl2 | 18 | PACKAGE_DEPENDS @APP_NAME_LC@-bin (>= @CPACK_DEBIAN_PACKAGE_VERSION@), @APP_NAME_LC@-bin (<< @CPACK_DEBIAN_PACKAGE_VERSION@.1~), curl, libcurl3, mesa-utils, x11-utils, fonts-liberation | ttf-liberation, fonts-dejavu-core | ttf-dejavu-core, python-bluez | python-lightblue, python-imaging, python-simplejson, libass5 | libass4, libgif5 | libgif7, libssh-4 | libssh2-1, libnfs8 | libnfs4 | libnfs1, libbluray1, libshairplay0, libvorbisfile3, libaacs0, libcec4, libgnutls30 | libgnutls-deb0-28 | libgnutls28 | libgnutls26, libxslt1.1, libyajl2 |
| 19 | PACKAGE_RECOMMENDS libvdpau1, libva-intel-vaapi-driver, libva1 | 19 | PACKAGE_RECOMMENDS libvdpau1, libva-intel-vaapi-driver, libva1 |
| 20 | PACKAGE_SUGGESTS @APP_NAME_LC@-pvr-mythtv, @APP_NAME_LC@-pvr-vuplus, @APP_NAME_LC@-pvr-vdr-vnsi, @APP_NAME_LC@-pvr-njoy, @APP_NAME_LC@-pvr-nextpvr, @APP_NAME_LC@-pvr-mediaportal-tvserver, @APP_NAME_LC@-pvr-tvheadend-hts, @APP_NAME_LC@-pvr-dvbviewer, @APP_NAME_LC@-pvr-argustv, @APP_NAME_LC@-pvr-iptvsimple, @APP_NAME_LC@-audioencoder-vorbis, @APP_NAME_LC@-audioencoder-flac, @APP_NAME_LC@-audioencoder-lame | 20 | PACKAGE_SUGGESTS @APP_NAME_LC@-pvr-mythtv, @APP_NAME_LC@-pvr-vuplus, @APP_NAME_LC@-pvr-vdr-vnsi, @APP_NAME_LC@-pvr-njoy, @APP_NAME_LC@-pvr-nextpvr, @APP_NAME_LC@-pvr-mediaportal-tvserver, @APP_NAME_LC@-pvr-tvheadend-hts, @APP_NAME_LC@-pvr-dvbviewer, @APP_NAME_LC@-pvr-argustv, @APP_NAME_LC@-pvr-iptvsimple, @APP_NAME_LC@-audioencoder-vorbis, @APP_NAME_LC@-audioencoder-flac, @APP_NAME_LC@-audioencoder-lame |
| 21 | PACKAGE_BREAKS xbmc (<< 2:14.0~git20141019), xbmc-data, xbmc-standalone | 21 | PACKAGE_BREAKS xbmc (<< 2:14.0~git20141019), xbmc-data, xbmc-standalone |
diff --git a/project/cmake/installdata/common/addons.txt b/project/cmake/installdata/common/addons.txt index 1cbe4d6..5613ba7 100644 --- a/project/cmake/installdata/common/addons.txt +++ b/project/cmake/installdata/common/addons.txt | |||
| @@ -20,12 +20,11 @@ addons/xbmc.python/* | |||
| 20 | addons/xbmc.webinterface/* | 20 | addons/xbmc.webinterface/* |
| 21 | addons/library.kodi.adsp/* | 21 | addons/library.kodi.adsp/* |
| 22 | addons/library.kodi.audioengine/* | 22 | addons/library.kodi.audioengine/* |
| 23 | addons/library.kodi.game/* | ||
| 23 | addons/library.kodi.guilib/* | 24 | addons/library.kodi.guilib/* |
| 24 | addons/library.kodi.inputstream/* | ||
| 25 | addons/library.kodi.peripheral/* | 25 | addons/library.kodi.peripheral/* |
| 26 | addons/library.xbmc.addon/* | 26 | addons/library.xbmc.addon/* |
| 27 | addons/library.xbmc.codec/* | 27 | addons/library.xbmc.codec/* |
| 28 | addons/library.xbmc.pvr/* | ||
| 29 | addons/repository.xbmc.org/* | 28 | addons/repository.xbmc.org/* |
| 30 | addons/webinterface.default/* | 29 | addons/webinterface.default/* |
| 31 | addons/screensaver.xbmc.builtin.dim/* | 30 | addons/screensaver.xbmc.builtin.dim/* |
diff --git a/project/cmake/modules/FindBluetooth.cmake b/project/cmake/modules/FindBluetooth.cmake index 538e89c..a69980d 100644 --- a/project/cmake/modules/FindBluetooth.cmake +++ b/project/cmake/modules/FindBluetooth.cmake | |||
| @@ -14,12 +14,12 @@ | |||
| 14 | # Bluetooth::Bluetooth - The Bluetooth library | 14 | # Bluetooth::Bluetooth - The Bluetooth library |
| 15 | 15 | ||
| 16 | if(PKG_CONFIG_FOUND) | 16 | if(PKG_CONFIG_FOUND) |
| 17 | pkg_check_modules(PC_BLUETOOTH bluetooth QUIET) | 17 | pkg_check_modules(PC_BLUETOOTH bluez bluetooth QUIET) |
| 18 | endif() | 18 | endif() |
| 19 | 19 | ||
| 20 | find_path(BLUETOOTH_INCLUDE_DIR NAMES bluetooth/bluetooth.h | 20 | find_path(BLUETOOTH_INCLUDE_DIR NAMES bluetooth/bluetooth.h |
| 21 | PATHS ${PC_BLUETOOTH_INCLUDEDIR}) | 21 | PATHS ${PC_BLUETOOTH_INCLUDEDIR}) |
| 22 | find_library(BLUETOOTH_LIBRARY NAMES bluetooth | 22 | find_library(BLUETOOTH_LIBRARY NAMES bluetooth libbluetooth |
| 23 | PATHS ${PC_BLUETOOTH_LIBDIR}) | 23 | PATHS ${PC_BLUETOOTH_LIBDIR}) |
| 24 | 24 | ||
| 25 | set(BLUETOOTH_VERSION ${PC_BLUETOOTH_VERSION}) | 25 | set(BLUETOOTH_VERSION ${PC_BLUETOOTH_VERSION}) |
| @@ -27,7 +27,7 @@ set(BLUETOOTH_VERSION ${PC_BLUETOOTH_VERSION}) | |||
| 27 | include(FindPackageHandleStandardArgs) | 27 | include(FindPackageHandleStandardArgs) |
| 28 | find_package_handle_standard_args(Bluetooth | 28 | find_package_handle_standard_args(Bluetooth |
| 29 | REQUIRED_VARS BLUETOOTH_LIBRARY BLUETOOTH_INCLUDE_DIR | 29 | REQUIRED_VARS BLUETOOTH_LIBRARY BLUETOOTH_INCLUDE_DIR |
| 30 | VERSION_VAR ${BLUETOOTH_VERSION}) | 30 | VERSION_VAR BLUETOOTH_VERSION) |
| 31 | 31 | ||
| 32 | if(BLUETOOTH_FOUND) | 32 | if(BLUETOOTH_FOUND) |
| 33 | set(BLUETOOTH_INCLUDE_DIRS ${BLUETOOTH_INCLUDE_DIR}) | 33 | set(BLUETOOTH_INCLUDE_DIRS ${BLUETOOTH_INCLUDE_DIR}) |
diff --git a/project/cmake/modules/FindCAP.cmake b/project/cmake/modules/FindCAP.cmake new file mode 100644 index 0000000..04e8378 --- /dev/null +++ b/project/cmake/modules/FindCAP.cmake | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | #.rst: | ||
| 2 | # FindCAP | ||
| 3 | # ----------- | ||
| 4 | # Finds the POSIX 1003.1e capabilities library | ||
| 5 | # | ||
| 6 | # This will define the following variables:: | ||
| 7 | # | ||
| 8 | # CAP_FOUND - system has LibCap | ||
| 9 | # CAP_INCLUDE_DIRS - the LibCap include directory | ||
| 10 | # CAP_LIBRARIES - the LibCap libraries | ||
| 11 | # | ||
| 12 | # and the following imported targets:: | ||
| 13 | # | ||
| 14 | # CAP::CAP - The LibCap library | ||
| 15 | |||
| 16 | if(PKG_CONFIG_FOUND) | ||
| 17 | pkg_check_modules(PC_CAP libcap QUIET) | ||
| 18 | endif() | ||
| 19 | |||
| 20 | find_path(CAP_INCLUDE_DIR NAMES sys/capability.h | ||
| 21 | PATHS ${PC_CAP_INCLUDEDIR}) | ||
| 22 | find_library(CAP_LIBRARY NAMES cap libcap | ||
| 23 | PATHS ${PC_CAP_LIBDIR}) | ||
| 24 | |||
| 25 | set(CAP_VERSION ${PC_CAP_VERSION}) | ||
| 26 | |||
| 27 | include(FindPackageHandleStandardArgs) | ||
| 28 | find_package_handle_standard_args(CAP | ||
| 29 | REQUIRED_VARS CAP_LIBRARY CAP_INCLUDE_DIR | ||
| 30 | VERSION_VAR CAP_VERSION) | ||
| 31 | |||
| 32 | if(CAP_FOUND) | ||
| 33 | set(CAP_LIBRARIES ${CAP_LIBRARY}) | ||
| 34 | set(CAP_INCLUDE_DIRS ${CAP_INCLUDE_DIR}) | ||
| 35 | |||
| 36 | if(NOT TARGET CAP::CAP) | ||
| 37 | add_library(CAP::CAP UNKNOWN IMPORTED) | ||
| 38 | set_target_properties(CAP::CAP PROPERTIES | ||
| 39 | IMPORTED_LOCATION "${CAP_LIBRARY}" | ||
| 40 | INTERFACE_INCLUDE_DIRECTORIES "${CAP_INCLUDE_DIR}") | ||
| 41 | endif() | ||
| 42 | endif() | ||
| 43 | |||
| 44 | mark_as_advanced(CAP_INCLUDE_DIR CAP_LIBRARY) | ||
diff --git a/project/cmake/modules/FindCpluff.cmake b/project/cmake/modules/FindCpluff.cmake index fb2bb25..ce6c127 100644 --- a/project/cmake/modules/FindCpluff.cmake +++ b/project/cmake/modules/FindCpluff.cmake | |||
| @@ -10,6 +10,13 @@ if(NOT WIN32) | |||
| 10 | string(REPLACE ";" " " defines "${CMAKE_C_FLAGS} ${SYSTEM_DEFINES} -I${EXPAT_INCLUDE_DIR}") | 10 | string(REPLACE ";" " " defines "${CMAKE_C_FLAGS} ${SYSTEM_DEFINES} -I${EXPAT_INCLUDE_DIR}") |
| 11 | get_filename_component(expat_dir ${EXPAT_LIBRARY} DIRECTORY) | 11 | get_filename_component(expat_dir ${EXPAT_LIBRARY} DIRECTORY) |
| 12 | set(ldflags "-L${expat_dir}") | 12 | set(ldflags "-L${expat_dir}") |
| 13 | |||
| 14 | # iOS: Without specifying -arch, configure tries to use /bin/cpp as C-preprocessor | ||
| 15 | # http://stackoverflow.com/questions/38836754/cant-cross-compile-c-library-for-arm-ios | ||
| 16 | if(CORE_SYSTEM_NAME STREQUAL ios) | ||
| 17 | set(cppflags "-arch ${CPU}") | ||
| 18 | endif() | ||
| 19 | |||
| 13 | ExternalProject_Add(libcpluff SOURCE_DIR ${CORE_SOURCE_DIR}/lib/cpluff | 20 | ExternalProject_Add(libcpluff SOURCE_DIR ${CORE_SOURCE_DIR}/lib/cpluff |
| 14 | BUILD_IN_SOURCE 1 | 21 | BUILD_IN_SOURCE 1 |
| 15 | PREFIX ${CORE_BUILD_DIR}/cpluff | 22 | PREFIX ${CORE_BUILD_DIR}/cpluff |
| @@ -22,6 +29,7 @@ if(NOT WIN32) | |||
| 22 | --libdir=<INSTALL_DIR>/lib | 29 | --libdir=<INSTALL_DIR>/lib |
| 23 | --host=${ARCH} | 30 | --host=${ARCH} |
| 24 | CFLAGS=${defines} | 31 | CFLAGS=${defines} |
| 32 | CPPFLAGS=${cppflags} | ||
| 25 | LDFLAGS=${ldflags}) | 33 | LDFLAGS=${ldflags}) |
| 26 | ExternalProject_Add_Step(libcpluff autoreconf | 34 | ExternalProject_Add_Step(libcpluff autoreconf |
| 27 | DEPENDEES download update patch | 35 | DEPENDEES download update patch |
diff --git a/project/cmake/modules/FindCrossGUID.cmake b/project/cmake/modules/FindCrossGUID.cmake index bcae3d3..ba2823a 100644 --- a/project/cmake/modules/FindCrossGUID.cmake +++ b/project/cmake/modules/FindCrossGUID.cmake | |||
| @@ -16,6 +16,10 @@ if(ENABLE_INTERNAL_CROSSGUID) | |||
| 16 | message(STATUS "CROSSGUID_URL: ${CROSSGUID_URL}") | 16 | message(STATUS "CROSSGUID_URL: ${CROSSGUID_URL}") |
| 17 | endif() | 17 | endif() |
| 18 | 18 | ||
| 19 | if(APPLE) | ||
| 20 | set(EXTRA_ARGS "-DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}") | ||
| 21 | endif() | ||
| 22 | |||
| 19 | set(CROSSGUID_LIBRARY ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/libcrossguid.a) | 23 | set(CROSSGUID_LIBRARY ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/libcrossguid.a) |
| 20 | set(CROSSGUID_INCLUDE_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/include) | 24 | set(CROSSGUID_INCLUDE_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/include) |
| 21 | externalproject_add(crossguid | 25 | externalproject_add(crossguid |
| @@ -24,6 +28,7 @@ if(ENABLE_INTERNAL_CROSSGUID) | |||
| 24 | PREFIX ${CORE_BUILD_DIR}/crossguid | 28 | PREFIX ${CORE_BUILD_DIR}/crossguid |
| 25 | CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR} | 29 | CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR} |
| 26 | -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} | 30 | -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} |
| 31 | "${EXTRA_ARGS}" | ||
| 27 | PATCH_COMMAND ${CMAKE_COMMAND} -E copy | 32 | PATCH_COMMAND ${CMAKE_COMMAND} -E copy |
| 28 | ${CORE_SOURCE_DIR}/tools/depends/target/crossguid/CMakeLists.txt | 33 | ${CORE_SOURCE_DIR}/tools/depends/target/crossguid/CMakeLists.txt |
| 29 | <SOURCE_DIR> && | 34 | <SOURCE_DIR> && |
diff --git a/project/cmake/modules/FindFFMPEG.cmake b/project/cmake/modules/FindFFMPEG.cmake index a9f88fb..2b3f47b 100644 --- a/project/cmake/modules/FindFFMPEG.cmake +++ b/project/cmake/modules/FindFFMPEG.cmake | |||
| @@ -1,18 +1,224 @@ | |||
| 1 | include(ExternalProject) | 1 | # FindFFMPEG |
| 2 | file(STRINGS ${CORE_SOURCE_DIR}/tools/depends/target/ffmpeg/FFMPEG-VERSION VER) | 2 | # -------- |
| 3 | string(REGEX MATCH "VERSION=[^ ]*$.*" FFMPEG_VER "${VER}") | 3 | # Finds FFmpeg libraries |
| 4 | list(GET FFMPEG_VER 0 FFMPEG_VER) | 4 | # |
| 5 | string(SUBSTRING "${FFMPEG_VER}" 8 -1 FFMPEG_VER) | 5 | # This module will first look for the required library versions on the system. |
| 6 | string(REGEX MATCH "BASE_URL=([^ ]*)" FFMPEG_BASE_URL "${VER}") | 6 | # If they are not found, it will fall back to downloading and building kodi's own version |
| 7 | list(GET FFMPEG_BASE_URL 0 FFMPEG_BASE_URL) | 7 | # |
| 8 | string(SUBSTRING "${FFMPEG_BASE_URL}" 9 -1 FFMPEG_BASE_URL) | 8 | # -------- |
| 9 | # the following variables influence behaviour: | ||
| 10 | # ENABLE_INTERNAL_FFMPEG - if enabled, kodi's own version will always be built | ||
| 11 | # | ||
| 12 | # FFMPEG_PATH - use external ffmpeg not found in system paths | ||
| 13 | # usage: -DFFMPEG_PATH=/path/to/ffmpeg_install_prefix | ||
| 14 | # | ||
| 15 | # WITH_FFMPEG - use external ffmpeg not found in system paths | ||
| 16 | # WARNING: this option is for developers as it will _disable ffmpeg version checks_! | ||
| 17 | # Consider using FFMPEG_PATH instead, which _does_ check library versions | ||
| 18 | # usage: -DWITH_FFMPEG=/path/to/ffmpeg_install_prefix | ||
| 19 | # | ||
| 20 | # -------- | ||
| 21 | # This module will will define the following variables: | ||
| 22 | # | ||
| 23 | # FFMPEG_FOUND - system has FFmpeg | ||
| 24 | # FFMPEG_INCLUDE_DIRS - FFmpeg include directory | ||
| 25 | # FFMPEG_LIBRARIES - FFmpeg libraries | ||
| 26 | # FFMPEG_DEFINITIONS - pre-processor definitions | ||
| 27 | # FFMPEG_LDFLAGS - linker flags | ||
| 28 | # | ||
| 29 | # and the following imported targets:: | ||
| 30 | # | ||
| 31 | # ffmpeg - The FFmpeg libraries | ||
| 32 | # -------- | ||
| 33 | # | ||
| 9 | 34 | ||
| 35 | # required ffmpeg library versions | ||
| 36 | set(REQUIRED_FFMPEG_VERSION 3.1) | ||
| 37 | set(_avcodec_ver ">=57.48.101") | ||
| 38 | set(_avfilter_ver ">=6.47.100") | ||
| 39 | set(_avformat_ver ">=57.41.100") | ||
| 40 | set(_avutil_ver ">=55.28.100") | ||
| 41 | set(_swscale_ver ">=4.1.100") | ||
| 42 | set(_swresample_ver ">=2.1.100") | ||
| 43 | set(_postproc_ver ">=54.0.100") | ||
| 10 | 44 | ||
| 11 | if(ENABLE_INTERNAL_FFMPEG) | 45 | |
| 46 | # Allows building with external ffmpeg not found in system paths, | ||
| 47 | # without library version checks | ||
| 48 | if(WITH_FFMPEG) | ||
| 49 | set(FFMPEG_PATH ${WITH_FFMPEG}) | ||
| 50 | message(STATUS "Warning: FFmpeg version checking disabled") | ||
| 51 | set(REQUIRED_FFMPEG_VERSION undef) | ||
| 52 | unset(_avcodec_ver) | ||
| 53 | unset(_avfilter_ver) | ||
| 54 | unset(_avformat_ver) | ||
| 55 | unset(_avutil_ver) | ||
| 56 | unset(_swscale_ver) | ||
| 57 | unset(_swresample_ver) | ||
| 58 | unset(_postproc_ver) | ||
| 59 | endif() | ||
| 60 | |||
| 61 | # Allows building with external ffmpeg not found in system paths, | ||
| 62 | # with library version checks | ||
| 63 | if(FFMPEG_PATH) | ||
| 64 | set(ENABLE_INTERNAL_FFMPEG OFF) | ||
| 65 | endif() | ||
| 66 | |||
| 67 | # external FFMPEG | ||
| 68 | if(NOT ENABLE_INTERNAL_FFMPEG OR CMAKE_CROSSCOMPILING) | ||
| 12 | if(FFMPEG_PATH) | 69 | if(FFMPEG_PATH) |
| 13 | message(WARNING "Internal FFmpeg enabled, but FFMPEG_PATH given, ignoring") | 70 | set(ENV{PKG_CONFIG_PATH} "${FFMPEG_PATH}/lib/pkgconfig") |
| 71 | list(APPEND CMAKE_PREFIX_PATH ${FFMPEG_PATH}) | ||
| 14 | endif() | 72 | endif() |
| 15 | 73 | ||
| 74 | set(FFMPEG_PKGS libavcodec${_avcodec_ver} | ||
| 75 | libavfilter${_avfilter_ver} | ||
| 76 | libavformat${_avformat_ver} | ||
| 77 | libavutil${_avutil_ver} | ||
| 78 | libswscale${_swscale_ver} | ||
| 79 | libswresample${_swresample_ver} | ||
| 80 | libpostproc${_postproc_ver}) | ||
| 81 | |||
| 82 | if(PKG_CONFIG_FOUND) | ||
| 83 | pkg_check_modules(PC_FFMPEG ${FFMPEG_PKGS} QUIET) | ||
| 84 | string(REGEX REPLACE "framework;" "framework " PC_FFMPEG_LDFLAGS "${PC_FFMPEG_LDFLAGS}") | ||
| 85 | endif() | ||
| 86 | |||
| 87 | find_path(FFMPEG_INCLUDE_DIRS libavcodec/avcodec.h libavfilter/avfilter.h libavformat/avformat.h | ||
| 88 | libavutil/avutil.h libswscale/swscale.h libpostproc/postprocess.h | ||
| 89 | PATH_SUFFIXES ffmpeg | ||
| 90 | PATHS ${PC_FFMPEG_INCLUDE_DIRS} | ||
| 91 | NO_DEFAULT_PATH) | ||
| 92 | find_path(FFMPEG_INCLUDE_DIRS libavcodec/avcodec.h libavfilter/avfilter.h libavformat/avformat.h | ||
| 93 | libavutil/avutil.h libswscale/swscale.h libpostproc/postprocess.h) | ||
| 94 | |||
| 95 | find_library(FFMPEG_LIBAVCODEC | ||
| 96 | NAMES avcodec libavcodec | ||
| 97 | PATH_SUFFIXES ffmpeg/libavcodec | ||
| 98 | PATHS ${PC_FFMPEG_libavcodec_LIBDIR} | ||
| 99 | NO_DEFAULT_PATH) | ||
| 100 | find_library(FFMPEG_LIBAVCODEC NAMES avcodec libavcodec PATH_SUFFIXES ffmpeg/libavcodec) | ||
| 101 | |||
| 102 | find_library(FFMPEG_LIBAVFILTER | ||
| 103 | NAMES avfilter libavfilter | ||
| 104 | PATH_SUFFIXES ffmpeg/libavfilter | ||
| 105 | PATHS ${PC_FFMPEG_libavfilter_LIBDIR} | ||
| 106 | NO_DEFAULT_PATH) | ||
| 107 | find_library(FFMPEG_LIBAVFILTER NAMES avfilter libavfilter PATH_SUFFIXES ffmpeg/libavfilter) | ||
| 108 | |||
| 109 | find_library(FFMPEG_LIBAVFORMAT | ||
| 110 | NAMES avformat libavformat | ||
| 111 | PATH_SUFFIXES ffmpeg/libavformat | ||
| 112 | PATHS ${PC_FFMPEG_libavformat_LIBDIR} | ||
| 113 | NO_DEFAULT_PATH) | ||
| 114 | find_library(FFMPEG_LIBAVFORMAT NAMES avformat libavformat PATH_SUFFIXES ffmpeg/libavformat) | ||
| 115 | |||
| 116 | find_library(FFMPEG_LIBAVUTIL | ||
| 117 | NAMES avutil libavutil | ||
| 118 | PATH_SUFFIXES ffmpeg/libavutil | ||
| 119 | PATHS ${PC_FFMPEG_libavutil_LIBDIR} | ||
| 120 | NO_DEFAULT_PATH) | ||
| 121 | find_library(FFMPEG_LIBAVUTIL NAMES avutil libavutil PATH_SUFFIXES ffmpeg/libavutil) | ||
| 122 | |||
| 123 | find_library(FFMPEG_LIBSWSCALE | ||
| 124 | NAMES swscale libswscale | ||
| 125 | PATH_SUFFIXES ffmpeg/libswscale | ||
| 126 | PATHS ${PC_FFMPEG_libswscale_LIBDIR} | ||
| 127 | NO_DEFAULT_PATH) | ||
| 128 | find_library(FFMPEG_LIBSWSCALE NAMES swscale libswscale PATH_SUFFIXES ffmpeg/libswscale) | ||
| 129 | |||
| 130 | find_library(FFMPEG_LIBSWRESAMPLE | ||
| 131 | NAMES swresample libswresample | ||
| 132 | PATH_SUFFIXES ffmpeg/libswresample | ||
| 133 | PATHS ${PC_FFMPEG_libswresample_LIBDIR} | ||
| 134 | NO_DEFAULT_PATH) | ||
| 135 | find_library(FFMPEG_LIBSWRESAMPLE NAMES NAMES swresample libswresample PATH_SUFFIXES ffmpeg/libswresample) | ||
| 136 | |||
| 137 | find_library(FFMPEG_LIBPOSTPROC | ||
| 138 | NAMES postproc libpostproc | ||
| 139 | PATH_SUFFIXES ffmpeg/libpostproc | ||
| 140 | PATHS ${PC_FFMPEG_libpostproc_LIBDIR} | ||
| 141 | NO_DEFAULT_PATH) | ||
| 142 | find_library(FFMPEG_LIBPOSTPROC NAMES postproc libpostproc PATH_SUFFIXES ffmpeg/libpostproc) | ||
| 143 | |||
| 144 | if((PC_FFMPEG_FOUND | ||
| 145 | AND PC_FFMPEG_libavcodec_VERSION | ||
| 146 | AND PC_FFMPEG_libavfilter_VERSION | ||
| 147 | AND PC_FFMPEG_libavformat_VERSION | ||
| 148 | AND PC_FFMPEG_libavutil_VERSION | ||
| 149 | AND PC_FFMPEG_libswscale_VERSION | ||
| 150 | AND PC_FFMPEG_libswresample_VERSION | ||
| 151 | AND PC_FFMPEG_libpostproc_VERSION) | ||
| 152 | OR WIN32) | ||
| 153 | set(FFMPEG_VERSION ${REQUIRED_FFMPEG_VERSION}) | ||
| 154 | |||
| 155 | |||
| 156 | include(FindPackageHandleStandardArgs) | ||
| 157 | find_package_handle_standard_args(FFMPEG | ||
| 158 | VERSION_VAR FFMPEG_VERSION | ||
| 159 | REQUIRED_VARS FFMPEG_INCLUDE_DIRS | ||
| 160 | FFMPEG_LIBAVCODEC | ||
| 161 | FFMPEG_LIBAVFILTER | ||
| 162 | FFMPEG_LIBAVFORMAT | ||
| 163 | FFMPEG_LIBAVUTIL | ||
| 164 | FFMPEG_LIBSWSCALE | ||
| 165 | FFMPEG_LIBSWRESAMPLE | ||
| 166 | FFMPEG_LIBPOSTPROC | ||
| 167 | FFMPEG_VERSION | ||
| 168 | FAIL_MESSAGE "FFmpeg ${REQUIRED_FFMPEG_VERSION} not found, please consider using -DENABLE_INTERNAL_FFMPEG=ON") | ||
| 169 | |||
| 170 | else() | ||
| 171 | message(STATUS "FFmpeg ${REQUIRED_FFMPEG_VERSION} not found, falling back to internal build") | ||
| 172 | unset(FFMPEG_INCLUDE_DIRS) | ||
| 173 | unset(FFMPEG_INCLUDE_DIRS CACHE) | ||
| 174 | unset(FFMPEG_LIBRARIES) | ||
| 175 | unset(FFMPEG_LIBRARIES CACHE) | ||
| 176 | unset(FFMPEG_DEFINITIONS) | ||
| 177 | unset(FFMPEG_DEFINITIONS CACHE) | ||
| 178 | endif() | ||
| 179 | |||
| 180 | if(FFMPEG_FOUND) | ||
| 181 | set(FFMPEG_LDFLAGS ${PC_FFMPEG_LDFLAGS} CACHE STRING "ffmpeg linker flags") | ||
| 182 | |||
| 183 | # check if ffmpeg libs are statically linked | ||
| 184 | set(FFMPEG_LIB_TYPE SHARED) | ||
| 185 | foreach(_fflib IN LISTS FFMPEG_LIBRARIES) | ||
| 186 | if(${_fflib} MATCHES ".+\.a$" AND PC_FFMPEG_STATIC_LDFLAGS) | ||
| 187 | set(FFMPEG_LDFLAGS ${PC_FFMPEG_STATIC_LDFLAGS} CACHE STRING "ffmpeg linker flags" FORCE) | ||
| 188 | set(FFMPEG_LIB_TYPE STATIC) | ||
| 189 | break() | ||
| 190 | endif() | ||
| 191 | endforeach() | ||
| 192 | |||
| 193 | set(FFMPEG_LIBRARIES ${FFMPEG_LIBAVCODEC} ${FFMPEG_LIBAVFILTER} | ||
| 194 | ${FFMPEG_LIBAVFORMAT} ${FFMPEG_LIBAVUTIL} | ||
| 195 | ${FFMPEG_LIBSWSCALE} ${FFMPEG_LIBSWRESAMPLE} | ||
| 196 | ${FFMPEG_LIBPOSTPROC} ${FFMPEG_LDFLAGS}) | ||
| 197 | list(APPEND FFMPEG_DEFINITIONS -DFFMPEG_VER_SHA=\"${FFMPEG_VERSION}\") | ||
| 198 | |||
| 199 | if(NOT TARGET ffmpeg) | ||
| 200 | add_library(ffmpeg ${FFMPEG_LIB_TYPE} IMPORTED) | ||
| 201 | set_target_properties(ffmpeg PROPERTIES | ||
| 202 | FOLDER "External Projects" | ||
| 203 | IMPORTED_LOCATION "${FFMPEG_LIBRARIES}" | ||
| 204 | INTERFACE_INCLUDE_DIRECTORIES "${FFMPEG_INCLUDE_DIRS}" | ||
| 205 | INTERFACE_LINK_LIBRARIES "${FFMPEG_LDFLAGS}" | ||
| 206 | INTERFACE_COMPILE_DEFINITIONS "${FFMPEG_DEFINITIONS}") | ||
| 207 | endif() | ||
| 208 | endif() | ||
| 209 | endif() | ||
| 210 | |||
| 211 | # Internal FFMPEG | ||
| 212 | if(NOT FFMPEG_FOUND) | ||
| 213 | include(ExternalProject) | ||
| 214 | file(STRINGS ${CORE_SOURCE_DIR}/tools/depends/target/ffmpeg/FFMPEG-VERSION VER) | ||
| 215 | string(REGEX MATCH "VERSION=[^ ]*$.*" FFMPEG_VER "${VER}") | ||
| 216 | list(GET FFMPEG_VER 0 FFMPEG_VER) | ||
| 217 | string(SUBSTRING "${FFMPEG_VER}" 8 -1 FFMPEG_VER) | ||
| 218 | string(REGEX MATCH "BASE_URL=([^ ]*)" FFMPEG_BASE_URL "${VER}") | ||
| 219 | list(GET FFMPEG_BASE_URL 0 FFMPEG_BASE_URL) | ||
| 220 | string(SUBSTRING "${FFMPEG_BASE_URL}" 9 -1 FFMPEG_BASE_URL) | ||
| 221 | |||
| 16 | # allow user to override the download URL with a local tarball | 222 | # allow user to override the download URL with a local tarball |
| 17 | # needed for offline build envs | 223 | # needed for offline build envs |
| 18 | if(FFMPEG_URL) | 224 | if(FFMPEG_URL) |
| @@ -80,35 +286,7 @@ fi") | |||
| 80 | list(APPEND FFMPEG_DEFINITIONS -DFFMPEG_VER_SHA=\"${FFMPEG_VER}\" | 286 | list(APPEND FFMPEG_DEFINITIONS -DFFMPEG_VER_SHA=\"${FFMPEG_VER}\" |
| 81 | -DUSE_STATIC_FFMPEG=1) | 287 | -DUSE_STATIC_FFMPEG=1) |
| 82 | set(FFMPEG_FOUND 1) | 288 | set(FFMPEG_FOUND 1) |
| 83 | else() | 289 | set_target_properties(ffmpeg PROPERTIES FOLDER "External Projects") |
| 84 | if(FFMPEG_PATH) | ||
| 85 | set(ENV{PKG_CONFIG_PATH} "${FFMPEG_PATH}/lib/pkgconfig") | ||
| 86 | endif() | ||
| 87 | set(FFMPEG_PKGS libavcodec>=56.26.100 libavfilter>=5.11.100 libavformat>=56.25.101 | ||
| 88 | libavutil>=54.20.100 libswscale>=3.1.101 libswresample>=1.1.100 libpostproc>=53.3.100) | ||
| 89 | if(PKG_CONFIG_FOUND AND NOT WIN32) | ||
| 90 | pkg_check_modules (FFMPEG ${FFMPEG_PKGS}) | ||
| 91 | string(REGEX REPLACE "framework;" "framework " FFMPEG_LDFLAGS "${FFMPEG_LDFLAGS}") | ||
| 92 | set(FFMPEG_LIBRARIES ${FFMPEG_LDFLAGS}) | ||
| 93 | add_custom_target(ffmpeg) | ||
| 94 | else() | ||
| 95 | find_path(FFMPEG_INCLUDE_DIRS libavcodec/avcodec.h PATH_SUFFIXES ffmpeg) | ||
| 96 | find_library(FFMPEG_LIBAVCODEC NAMES avcodec libavcodec PATH_SUFFIXES ffmpeg/libavcodec) | ||
| 97 | find_library(FFMPEG_LIBAVFILTER NAMES avfilter libavfilter PATH_SUFFIXES ffmpeg/libavfilter) | ||
| 98 | find_library(FFMPEG_LIBAVFORMAT NAMES avformat libavformat PATH_SUFFIXES ffmpeg/libavformat) | ||
| 99 | find_library(FFMPEG_LIBAVUTIL NAMES avutil libavutil PATH_SUFFIXES ffmpeg/libavutil) | ||
| 100 | find_library(FFMPEG_LIBSWSCALE NAMES swscale libswscale PATH_SUFFIXES ffmpeg/libswscale) | ||
| 101 | find_library(FFMPEG_LIBPOSTPROC NAMES postproc libpostproc PATH_SUFFIXES ffmpeg/libpostproc) | ||
| 102 | set(FFMPEG_LIBRARIES ${FFMPEG_LIBAVCODEC} ${FFMPEG_LIBAVFILTER} ${FFMPEG_LIBAVFORMAT} | ||
| 103 | ${FFMPEG_LIBAVUTIL} ${FFMPEG_LIBSWSCALE} ${FFMPEG_LIBPOSTPROC}) | ||
| 104 | add_custom_target(ffmpeg DEPENDS ${FFMPEG_LIBRARIES}) | ||
| 105 | endif() | ||
| 106 | |||
| 107 | include(FindPackageHandleStandardArgs) | ||
| 108 | find_package_handle_standard_args(FFMPEG DEFAULT_MSG FFMPEG_INCLUDE_DIRS FFMPEG_LIBRARIES) | ||
| 109 | set(FFMPEG_FOUND 1) | ||
| 110 | list(APPEND FFMPEG_DEFINITIONS -DFFMPEG_VER_SHA=\"${FFMPEG_VER}\") | ||
| 111 | endif() | 290 | endif() |
| 112 | set_target_properties(ffmpeg PROPERTIES FOLDER "External Projects") | ||
| 113 | 291 | ||
| 114 | mark_as_advanced(FFMPEG_INCLUDE_DIRS FFMPEG_LIBRARIES FFMPEG_DEFINITIONS FFMPEG_FOUND) | 292 | mark_as_advanced(FFMPEG_INCLUDE_DIRS FFMPEG_LIBRARIES FFMPEG_LDFLAGS FFMPEG_DEFINITIONS FFMPEG_FOUND) |
diff --git a/project/cmake/modules/FindFribidi.cmake b/project/cmake/modules/FindFribidi.cmake index 03c2f53..dcaeb48 100644 --- a/project/cmake/modules/FindFribidi.cmake +++ b/project/cmake/modules/FindFribidi.cmake | |||
| @@ -32,12 +32,16 @@ find_package_handle_standard_args(FriBidi | |||
| 32 | if(FRIBIDI_FOUND) | 32 | if(FRIBIDI_FOUND) |
| 33 | set(FRIBIDI_LIBRARIES ${FRIBIDI_LIBRARY}) | 33 | set(FRIBIDI_LIBRARIES ${FRIBIDI_LIBRARY}) |
| 34 | set(FRIBIDI_INCLUDE_DIRS ${FRIBIDI_INCLUDE_DIR}) | 34 | set(FRIBIDI_INCLUDE_DIRS ${FRIBIDI_INCLUDE_DIR}) |
| 35 | if(PC_FRIBIDI_CFLAGS) | ||
| 36 | set(FRIBIDI_DEFINITIONS ${PC_FRIBIDI_CFLAGS}) | ||
| 37 | endif() | ||
| 35 | 38 | ||
| 36 | if(NOT TARGET FriBidi::FriBidi) | 39 | if(NOT TARGET FriBidi::FriBidi) |
| 37 | add_library(FriBidi::FriBidi UNKNOWN IMPORTED) | 40 | add_library(FriBidi::FriBidi UNKNOWN IMPORTED) |
| 38 | set_target_properties(FriBidi::FriBidi PROPERTIES | 41 | set_target_properties(FriBidi::FriBidi PROPERTIES |
| 39 | IMPORTED_LOCATION "${FRIBIDI_LIBRARY}" | 42 | IMPORTED_LOCATION "${FRIBIDI_LIBRARY}" |
| 40 | INTERFACE_INCLUDE_DIRECTORIES "${FRIBIDI_INCLUDE_DIR}") | 43 | INTERFACE_INCLUDE_DIRECTORIES "${FRIBIDI_INCLUDE_DIR}" |
| 44 | INTERFACE_COMPILE_OPTIONS "${FRIBIDI_DEFINITIONS}") | ||
| 41 | endif() | 45 | endif() |
| 42 | endif() | 46 | endif() |
| 43 | 47 | ||
diff --git a/project/cmake/modules/FindMir.cmake b/project/cmake/modules/FindMir.cmake new file mode 100644 index 0000000..8847a61 --- /dev/null +++ b/project/cmake/modules/FindMir.cmake | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | # FindMir | ||
| 2 | # ------- | ||
| 3 | # Finds the Mir library | ||
| 4 | # | ||
| 5 | # This will will define the following variables:: | ||
| 6 | # | ||
| 7 | # MIR_FOUND - the system has Mir | ||
| 8 | # MIR_INCLUDE_DIRS - the Mir include directory | ||
| 9 | # MIR_LIBRARIES - the Mir libraries | ||
| 10 | # MIR_DEFINITIONS - the Mir definitions | ||
| 11 | |||
| 12 | |||
| 13 | if(PKG_CONFIG_FOUND) | ||
| 14 | pkg_check_modules (PC_MIR mirclient QUIET) | ||
| 15 | endif() | ||
| 16 | |||
| 17 | find_path(MIR_INCLUDE_DIR NAMES mir_toolkit/mir_client_library.h | ||
| 18 | PATHS ${PC_MIR_INCLUDE_DIRS}) | ||
| 19 | |||
| 20 | find_library(MIR_LIBRARY NAMES mirclient | ||
| 21 | PATHS ${PC_MIR_LIBRARIES} ${PC_MIR_LIBRARY_DIRS}) | ||
| 22 | |||
| 23 | include (FindPackageHandleStandardArgs) | ||
| 24 | find_package_handle_standard_args (MIR | ||
| 25 | REQUIRED_VARS MIR_LIBRARY MIR_INCLUDE_DIR) | ||
| 26 | |||
| 27 | if (MIR_FOUND) | ||
| 28 | set(MIR_LIBRARIES ${MIR_LIBRARY}) | ||
| 29 | set(MIR_INCLUDE_DIRS ${PC_MIR_INCLUDE_DIRS}) | ||
| 30 | set(MIR_DEFINITIONS -DHAVE_MIR=1) | ||
| 31 | endif() | ||
| 32 | |||
| 33 | mark_as_advanced (MIR_LIBRARY MIR_INCLUDE_DIR) | ||
diff --git a/project/cmake/modules/FindTexturePacker.cmake b/project/cmake/modules/FindTexturePacker.cmake index 2229ff7..f9e4c75 100644 --- a/project/cmake/modules/FindTexturePacker.cmake +++ b/project/cmake/modules/FindTexturePacker.cmake | |||
| @@ -3,6 +3,10 @@ | |||
| 3 | # ----------------- | 3 | # ----------------- |
| 4 | # Finds the TexturePacker | 4 | # Finds the TexturePacker |
| 5 | # | 5 | # |
| 6 | # If WITH_TEXTUREPACKER is defined and points to a directory, | ||
| 7 | # this path will be used to search for the Texturepacker binary | ||
| 8 | # | ||
| 9 | # | ||
| 6 | # This will define the following (imported) targets:: | 10 | # This will define the following (imported) targets:: |
| 7 | # | 11 | # |
| 8 | # TexturePacker::TexturePacker - The TexturePacker executable | 12 | # TexturePacker::TexturePacker - The TexturePacker executable |
| @@ -17,7 +21,21 @@ if(NOT TARGET TexturePacker::TexturePacker) | |||
| 17 | set_target_properties(TexturePacker::TexturePacker PROPERTIES | 21 | set_target_properties(TexturePacker::TexturePacker PROPERTIES |
| 18 | IMPORTED_LOCATION "${CORE_SOURCE_DIR}/tools/TexturePacker/TexturePacker.exe") | 22 | IMPORTED_LOCATION "${CORE_SOURCE_DIR}/tools/TexturePacker/TexturePacker.exe") |
| 19 | else() | 23 | else() |
| 20 | add_subdirectory(${CORE_SOURCE_DIR}/tools/depends/native/TexturePacker build/texturepacker) | 24 | if(WITH_TEXTUREPACKER) |
| 21 | add_executable(TexturePacker::TexturePacker ALIAS TexturePacker) | 25 | get_filename_component(_tppath ${WITH_TEXTUREPACKER} ABSOLUTE) |
| 26 | find_program(TEXTUREPACKER_EXECUTABLE TexturePacker PATHS ${_tppath}) | ||
| 27 | |||
| 28 | include(FindPackageHandleStandardArgs) | ||
| 29 | find_package_handle_standard_args(TexturePacker DEFAULT_MSG TEXTUREPACKER_EXECUTABLE) | ||
| 30 | if(TEXTUREPACKER_FOUND) | ||
| 31 | add_executable(TexturePacker::TexturePacker IMPORTED GLOBAL) | ||
| 32 | set_target_properties(TexturePacker::TexturePacker PROPERTIES | ||
| 33 | IMPORTED_LOCATION "${TEXTUREPACKER_EXECUTABLE}") | ||
| 34 | endif() | ||
| 35 | mark_as_advanced(TEXTUREPACKER) | ||
| 36 | else() | ||
| 37 | add_subdirectory(${CORE_SOURCE_DIR}/tools/depends/native/TexturePacker build/texturepacker) | ||
| 38 | add_executable(TexturePacker::TexturePacker ALIAS TexturePacker) | ||
| 39 | endif() | ||
| 22 | endif() | 40 | endif() |
| 23 | endif() | 41 | endif() |
diff --git a/project/cmake/modules/FindVAAPI.cmake b/project/cmake/modules/FindVAAPI.cmake index ce3fe1a..ea9a3c9 100644 --- a/project/cmake/modules/FindVAAPI.cmake +++ b/project/cmake/modules/FindVAAPI.cmake | |||
| @@ -24,6 +24,8 @@ find_library(VAAPI_libva_LIBRARY NAMES va | |||
| 24 | PATHS ${PC_VAAPI_libva_LIBDIR}) | 24 | PATHS ${PC_VAAPI_libva_LIBDIR}) |
| 25 | find_library(VAAPI_libva-x11_LIBRARY NAMES va-x11 | 25 | find_library(VAAPI_libva-x11_LIBRARY NAMES va-x11 |
| 26 | PATHS ${PC_VAAPI_libva_LIBDIR}) | 26 | PATHS ${PC_VAAPI_libva_LIBDIR}) |
| 27 | find_library(VAAPI_libva-drm_LIBRARY NAMES va-drm | ||
| 28 | PATHS ${PC_VAAPI_libva_LIBDIR}) | ||
| 27 | 29 | ||
| 28 | if(PC_VAAPI_libva_VERSION) | 30 | if(PC_VAAPI_libva_VERSION) |
| 29 | set(VAAPI_VERSION_STRING ${PC_VAAPI_libva_VERSION}) | 31 | set(VAAPI_VERSION_STRING ${PC_VAAPI_libva_VERSION}) |
| @@ -39,12 +41,12 @@ endif() | |||
| 39 | 41 | ||
| 40 | include(FindPackageHandleStandardArgs) | 42 | include(FindPackageHandleStandardArgs) |
| 41 | find_package_handle_standard_args(VAAPI | 43 | find_package_handle_standard_args(VAAPI |
| 42 | REQUIRED_VARS VAAPI_libva_LIBRARY VAAPI_libva-x11_LIBRARY VAAPI_INCLUDE_DIR | 44 | REQUIRED_VARS VAAPI_libva_LIBRARY VAAPI_libva-x11_LIBRARY VAAPI_libva-drm_LIBRARY VAAPI_INCLUDE_DIR |
| 43 | VERSION_VAR VAAPI_VERSION_STRING) | 45 | VERSION_VAR VAAPI_VERSION_STRING) |
| 44 | 46 | ||
| 45 | if(VAAPI_FOUND) | 47 | if(VAAPI_FOUND) |
| 46 | set(VAAPI_INCLUDE_DIRS ${VAAPI_INCLUDE_DIR}) | 48 | set(VAAPI_INCLUDE_DIRS ${VAAPI_INCLUDE_DIR}) |
| 47 | set(VAAPI_LIBRARIES ${VAAPI_libva_LIBRARY} ${VAAPI_libva-x11_LIBRARY}) | 49 | set(VAAPI_LIBRARIES ${VAAPI_libva_LIBRARY} ${VAAPI_libva-x11_LIBRARY} ${VAAPI_libva-drm_LIBRARY}) |
| 48 | set(VAAPI_DEFINITIONS -DHAVE_LIBVA=1) | 50 | set(VAAPI_DEFINITIONS -DHAVE_LIBVA=1) |
| 49 | 51 | ||
| 50 | if(NOT TARGET VAAPI::VAAPI_X11) | 52 | if(NOT TARGET VAAPI::VAAPI_X11) |
| @@ -52,14 +54,19 @@ if(VAAPI_FOUND) | |||
| 52 | set_target_properties(VAAPI::VAAPI_X11 PROPERTIES | 54 | set_target_properties(VAAPI::VAAPI_X11 PROPERTIES |
| 53 | IMPORTED_LOCATION "${VAAPI_libva-x11_LIBRARY}") | 55 | IMPORTED_LOCATION "${VAAPI_libva-x11_LIBRARY}") |
| 54 | endif() | 56 | endif() |
| 57 | if (NOT TARGET VAAPI::VAAPI_DRM) | ||
| 58 | add_library(VAAPI::VAAPI_DRM UNKNOWN IMPORTED) | ||
| 59 | set_target_properties(VAAPI::VAAPI_DRM PROPERTIES | ||
| 60 | IMPORTED_LOCATION "${VAAPI_libva-drm_LIBRARY}") | ||
| 61 | endif() | ||
| 55 | if(NOT TARGET VAAPI::VAAPI) | 62 | if(NOT TARGET VAAPI::VAAPI) |
| 56 | add_library(VAAPI::VAAPI UNKNOWN IMPORTED) | 63 | add_library(VAAPI::VAAPI UNKNOWN IMPORTED) |
| 57 | set_target_properties(VAAPI::VAAPI PROPERTIES | 64 | set_target_properties(VAAPI::VAAPI PROPERTIES |
| 58 | IMPORTED_LOCATION "${VAAPI_libva_LIBRARY}" | 65 | IMPORTED_LOCATION "${VAAPI_libva_LIBRARY}" |
| 59 | INTERFACE_INCLUDE_DIRECTORIES "${VAAPI_INCLUDE_DIR}" | 66 | INTERFACE_INCLUDE_DIRECTORIES "${VAAPI_INCLUDE_DIR}" |
| 60 | INTERFACE_COMPILE_DEFINITIONS HAVE_LIBVA=1 | 67 | INTERFACE_COMPILE_DEFINITIONS HAVE_LIBVA=1 |
| 61 | INTERFACE_LINK_LIBRARIES VAAPI::VAAPI_X11) | 68 | INTERFACE_LINK_LIBRARIES "VAAPI::VAAPI_X11 VAAPI::VAAPI_DRM") |
| 62 | endif() | 69 | endif() |
| 63 | endif() | 70 | endif() |
| 64 | 71 | ||
| 65 | mark_as_advanced(VAAPI_INCLUDE_DIR VAAPI_libva_LIBRARY VAAPI_libva-x11_LIBRARY) | 72 | mark_as_advanced(VAAPI_INCLUDE_DIR VAAPI_libva_LIBRARY VAAPI_libva-x11_LIBRARY VAAPI_libva-drm_LIBRARY) |
diff --git a/project/cmake/modules/FindXSLT.cmake b/project/cmake/modules/FindXSLT.cmake index 9be51d3..f7fea9e 100644 --- a/project/cmake/modules/FindXSLT.cmake +++ b/project/cmake/modules/FindXSLT.cmake | |||
| @@ -43,7 +43,7 @@ if(XSLT_FOUND) | |||
| 43 | IMPORTED_LOCATION "${XSLT_LIBRARY}" | 43 | IMPORTED_LOCATION "${XSLT_LIBRARY}" |
| 44 | INTERFACE_INCLUDE_DIRECTORIES "${XSLT_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR}" | 44 | INTERFACE_INCLUDE_DIRECTORIES "${XSLT_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR}" |
| 45 | INTERFACE_COMPILE_DEFINITIONS HAVE_LIBXSLT=1 | 45 | INTERFACE_COMPILE_DEFINITIONS HAVE_LIBXSLT=1 |
| 46 | ITERFACE_LINK_LIBRARIES "${LIBXML2_LIBRARIES}") | 46 | INTERFACE_LINK_LIBRARIES "${LIBXML2_LIBRARIES}") |
| 47 | endif() | 47 | endif() |
| 48 | endif() | 48 | endif() |
| 49 | 49 | ||
diff --git a/project/cmake/scripts/android/Install.cmake b/project/cmake/scripts/android/Install.cmake index 5c66f41..025f194 100644 --- a/project/cmake/scripts/android/Install.cmake +++ b/project/cmake/scripts/android/Install.cmake | |||
| @@ -91,7 +91,6 @@ foreach(lib IN LISTS required_dyload dyload_optional ITEMS Shairplay) | |||
| 91 | endif() | 91 | endif() |
| 92 | endforeach() | 92 | endforeach() |
| 93 | add_bundle_file(${SMBCLIENT_LIBRARY} ${libdir} "") | 93 | add_bundle_file(${SMBCLIENT_LIBRARY} ${libdir} "") |
| 94 | add_bundle_file(${DEPENDS_PATH}/lib/librtmp.so ${libdir} "") | ||
| 95 | 94 | ||
| 96 | # Main targets from Makefile.in | 95 | # Main targets from Makefile.in |
| 97 | if(CPU MATCHES i686) | 96 | if(CPU MATCHES i686) |
diff --git a/project/cmake/scripts/common/ArchSetup.cmake b/project/cmake/scripts/common/ArchSetup.cmake index 438e3bd..538fcaf 100644 --- a/project/cmake/scripts/common/ArchSetup.cmake +++ b/project/cmake/scripts/common/ArchSetup.cmake | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | include(CheckCXXSourceCompiles) | 14 | include(CheckCXXSourceCompiles) |
| 15 | include(CheckSymbolExists) | 15 | include(CheckSymbolExists) |
| 16 | include(CheckFunctionExists) | 16 | include(CheckFunctionExists) |
| 17 | include(CheckIncludeFile) | ||
| 17 | 18 | ||
| 18 | # Macro to check if a given type exists in a given header | 19 | # Macro to check if a given type exists in a given header |
| 19 | # Arguments: | 20 | # Arguments: |
| @@ -109,6 +110,10 @@ check_symbol_exists(PRIdMAX inttypes.h HAVE_INTTYPES_H) | |||
| 109 | check_builtin("long* temp=0; long ret=__sync_add_and_fetch(temp, 1)" HAS_BUILTIN_SYNC_ADD_AND_FETCH) | 110 | check_builtin("long* temp=0; long ret=__sync_add_and_fetch(temp, 1)" HAS_BUILTIN_SYNC_ADD_AND_FETCH) |
| 110 | check_builtin("long* temp=0; long ret=__sync_sub_and_fetch(temp, 1)" HAS_BUILTIN_SYNC_SUB_AND_FETCH) | 111 | check_builtin("long* temp=0; long ret=__sync_sub_and_fetch(temp, 1)" HAS_BUILTIN_SYNC_SUB_AND_FETCH) |
| 111 | check_builtin("long* temp=0; long ret=__sync_val_compare_and_swap(temp, 1, 1)" HAS_BUILTIN_SYNC_VAL_COMPARE_AND_SWAP) | 112 | check_builtin("long* temp=0; long ret=__sync_val_compare_and_swap(temp, 1, 1)" HAS_BUILTIN_SYNC_VAL_COMPARE_AND_SWAP) |
| 113 | check_include_file(sys/inotify.h HAVE_INOTIFY) | ||
| 114 | if(HAVE_INOTIFY) | ||
| 115 | list(APPEND SYSTEM_DEFINES -DHAVE_INOTIFY=1) | ||
| 116 | endif() | ||
| 112 | if(HAVE_POSIX_FADVISE) | 117 | if(HAVE_POSIX_FADVISE) |
| 113 | list(APPEND SYSTEM_DEFINES -DHAVE_POSIX_FADVISE=1) | 118 | list(APPEND SYSTEM_DEFINES -DHAVE_POSIX_FADVISE=1) |
| 114 | endif() | 119 | endif() |
diff --git a/project/cmake/scripts/common/CheckTargetPlatform.cmake b/project/cmake/scripts/common/CheckTargetPlatform.cmake index 5b5d9a1..82ee668 100644 --- a/project/cmake/scripts/common/CheckTargetPlatform.cmake +++ b/project/cmake/scripts/common/CheckTargetPlatform.cmake | |||
| @@ -9,7 +9,11 @@ function(check_target_platform dir target_platform build) | |||
| 9 | if(EXISTS ${dir} AND EXISTS ${dir}/platforms.txt) | 9 | if(EXISTS ${dir} AND EXISTS ${dir}/platforms.txt) |
| 10 | # get all the specified platforms | 10 | # get all the specified platforms |
| 11 | file(STRINGS ${dir}/platforms.txt platforms) | 11 | file(STRINGS ${dir}/platforms.txt platforms) |
| 12 | string(REPLACE " " ";" platforms ${platforms}) | 12 | |
| 13 | list( LENGTH platforms listlen ) | ||
| 14 | if(${listlen} EQUAL 1) | ||
| 15 | string(REPLACE " " ";" platforms ${platforms}) | ||
| 16 | endif() | ||
| 13 | 17 | ||
| 14 | # check if the addon/dependency should be built for the current platform | 18 | # check if the addon/dependency should be built for the current platform |
| 15 | foreach(platform ${platforms}) | 19 | foreach(platform ${platforms}) |
diff --git a/project/cmake/scripts/common/HandleDepends.cmake b/project/cmake/scripts/common/HandleDepends.cmake index 880ccdf..adc105b 100644 --- a/project/cmake/scripts/common/HandleDepends.cmake +++ b/project/cmake/scripts/common/HandleDepends.cmake | |||
| @@ -17,6 +17,7 @@ function(add_addon_depends addon searchpath) | |||
| 17 | file MATCHES noinstall.txt OR | 17 | file MATCHES noinstall.txt OR |
| 18 | file MATCHES flags.txt OR | 18 | file MATCHES flags.txt OR |
| 19 | file MATCHES deps.txt OR | 19 | file MATCHES deps.txt OR |
| 20 | file MATCHES "[a-z]+-deps[.]txt" OR | ||
| 20 | file MATCHES platforms.txt)) | 21 | file MATCHES platforms.txt)) |
| 21 | message(STATUS "Processing ${file}") | 22 | message(STATUS "Processing ${file}") |
| 22 | file(STRINGS ${file} def) | 23 | file(STRINGS ${file} def) |
| @@ -49,7 +50,11 @@ function(add_addon_depends addon searchpath) | |||
| 49 | if(EXISTS ${dir}/flags.txt) | 50 | if(EXISTS ${dir}/flags.txt) |
| 50 | set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${dir}/flags.txt) | 51 | set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${dir}/flags.txt) |
| 51 | file(STRINGS ${dir}/flags.txt extraflags) | 52 | file(STRINGS ${dir}/flags.txt extraflags) |
| 53 | |||
| 54 | # replace some custom placeholders | ||
| 55 | string(REPLACE "@MINGW_TOOLCHAIN_FILE@" "${OUTPUT_DIR}/Toolchain_mingw32.cmake" extraflags "${extraflags}") | ||
| 52 | string(REPLACE " " ";" extraflags ${extraflags}) | 56 | string(REPLACE " " ";" extraflags ${extraflags}) |
| 57 | |||
| 53 | message(STATUS "${id} extraflags: ${extraflags}") | 58 | message(STATUS "${id} extraflags: ${extraflags}") |
| 54 | endif() | 59 | endif() |
| 55 | 60 | ||
| @@ -103,11 +108,18 @@ function(add_addon_depends addon searchpath) | |||
| 103 | endif() | 108 | endif() |
| 104 | endif() | 109 | endif() |
| 105 | 110 | ||
| 106 | # on windows "patch.exe" can only handle CR-LF line-endings so we | ||
| 107 | # need to force it to also handle LF-only line endings | ||
| 108 | set(PATCH_PROGRAM ${PATCH_EXECUTABLE}) | 111 | set(PATCH_PROGRAM ${PATCH_EXECUTABLE}) |
| 112 | |||
| 113 | # On Windows "patch.exe" can only handle CR-LF line-endings. | ||
| 114 | # Our patches have LF-only line endings - except when they | ||
| 115 | # have been checked out as part of a dependency hosted on Git | ||
| 116 | # and core.autocrlf=true. | ||
| 109 | if(WIN32) | 117 | if(WIN32) |
| 110 | set(PATCH_PROGRAM "\"${PATCH_PROGRAM}\" --binary") | 118 | file(READ ${patch} patch_content_hex HEX) |
| 119 | # Force handle LF-only line endings | ||
| 120 | if(NOT patch_content_hex MATCHES "0d0a") | ||
| 121 | set(PATCH_PROGRAM "\"${PATCH_PROGRAM}\" --binary") | ||
| 122 | endif() | ||
| 111 | endif() | 123 | endif() |
| 112 | endif() | 124 | endif() |
| 113 | 125 | ||
| @@ -131,8 +143,11 @@ function(add_addon_depends addon searchpath) | |||
| 131 | set(INSTALL_COMMAND INSTALL_COMMAND "") | 143 | set(INSTALL_COMMAND INSTALL_COMMAND "") |
| 132 | endif() | 144 | endif() |
| 133 | 145 | ||
| 134 | # check if there's a deps.txt containing dependencies on other libraries | 146 | # check if there's a platform-specific or generic deps.txt containing dependencies on other libraries |
| 135 | if(EXISTS ${dir}/deps.txt) | 147 | if(EXISTS ${dir}/${CORE_SYSTEM_NAME}-deps.txt) |
| 148 | file(STRINGS ${dir}/${CORE_SYSTEM_NAME}-deps.txt deps) | ||
| 149 | message(STATUS "${id} depends: ${deps}") | ||
| 150 | elseif(EXISTS ${dir}/deps.txt) | ||
| 136 | set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${dir}/deps.txt) | 151 | set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${dir}/deps.txt) |
| 137 | file(STRINGS ${dir}/deps.txt deps) | 152 | file(STRINGS ${dir}/deps.txt deps) |
| 138 | message(STATUS "${id} depends: ${deps}") | 153 | message(STATUS "${id} depends: ${deps}") |
| @@ -161,6 +176,10 @@ function(add_addon_depends addon searchpath) | |||
| 161 | PATCH_COMMAND ${PATCH_COMMAND} | 176 | PATCH_COMMAND ${PATCH_COMMAND} |
| 162 | "${INSTALL_COMMAND}") | 177 | "${INSTALL_COMMAND}") |
| 163 | 178 | ||
| 179 | if(CMAKE_VERSION VERSION_GREATER 3.5.9) | ||
| 180 | list(APPEND EXTERNALPROJECT_SETUP GIT_SHALLOW 1) | ||
| 181 | endif() | ||
| 182 | |||
| 164 | # if there's an url defined we need to pass that to externalproject_add() | 183 | # if there's an url defined we need to pass that to externalproject_add() |
| 165 | if(DEFINED url AND NOT "${url}" STREQUAL "") | 184 | if(DEFINED url AND NOT "${url}" STREQUAL "") |
| 166 | # check if there's a third parameter in the file | 185 | # check if there's a third parameter in the file |
| @@ -172,6 +191,20 @@ function(add_addon_depends addon searchpath) | |||
| 172 | GIT_REPOSITORY ${url} | 191 | GIT_REPOSITORY ${url} |
| 173 | GIT_TAG ${revision} | 192 | GIT_TAG ${revision} |
| 174 | "${EXTERNALPROJECT_SETUP}") | 193 | "${EXTERNALPROJECT_SETUP}") |
| 194 | |||
| 195 | # For patchfiles to work, disable (users globally set) autocrlf=true | ||
| 196 | if(CMAKE_MINIMUM_REQUIRED_VERSION VERSION_GREATER 3.7) | ||
| 197 | message(AUTHOR_WARNING "Make use of GIT_CONFIG") | ||
| 198 | endif() | ||
| 199 | if(WIN32 AND patches) | ||
| 200 | externalproject_add_step(${id} gitconfig | ||
| 201 | COMMAND git config core.autocrlf false | ||
| 202 | COMMAND git rm -rf --cached . | ||
| 203 | COMMAND git reset --hard HEAD | ||
| 204 | COMMENT "Performing gitconfig step: Disabling autocrlf to enable patching for '${id}'" | ||
| 205 | DEPENDERS patch | ||
| 206 | WORKING_DIRECTORY <SOURCE_DIR>) | ||
| 207 | endif() | ||
| 175 | else() | 208 | else() |
| 176 | set(CONFIGURE_COMMAND "") | 209 | set(CONFIGURE_COMMAND "") |
| 177 | if(NOT WIN32) | 210 | if(NOT WIN32) |
diff --git a/project/cmake/scripts/common/Macros.cmake b/project/cmake/scripts/common/Macros.cmake index 71c39ef..cce3245 100644 --- a/project/cmake/scripts/common/Macros.cmake +++ b/project/cmake/scripts/common/Macros.cmake | |||
| @@ -155,9 +155,12 @@ function(core_add_shared_library name) | |||
| 155 | add_library(${name} SHARED ${SOURCES} ${HEADERS} ${OTHERS}) | 155 | add_library(${name} SHARED ${SOURCES} ${HEADERS} ${OTHERS}) |
| 156 | set_target_properties(${name} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${OUTPUT_DIRECTORY} | 156 | set_target_properties(${name} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${OUTPUT_DIRECTORY} |
| 157 | RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${OUTPUT_DIRECTORY} | 157 | RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${OUTPUT_DIRECTORY} |
| 158 | RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/${OUTPUT_DIRECTORY} | ||
| 159 | RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/${OUTPUT_DIRECTORY} | ||
| 160 | OUTPUT_NAME ${OUTPUT_NAME} PREFIX "") | 158 | OUTPUT_NAME ${OUTPUT_NAME} PREFIX "") |
| 159 | foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES}) | ||
| 160 | string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG) | ||
| 161 | set_target_properties(${name} PROPERTIES LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_BINARY_DIR}/${OUTPUT_DIRECTORY} | ||
| 162 | RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_BINARY_DIR}/${OUTPUT_DIRECTORY}) | ||
| 163 | endforeach() | ||
| 161 | 164 | ||
| 162 | set(LIBRARY_FILES ${LIBRARY_FILES} ${CMAKE_BINARY_DIR}/${OUTPUT_DIRECTORY}/${OUTPUT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} CACHE STRING "" FORCE) | 165 | set(LIBRARY_FILES ${LIBRARY_FILES} ${CMAKE_BINARY_DIR}/${OUTPUT_DIRECTORY}/${OUTPUT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} CACHE STRING "" FORCE) |
| 163 | add_dependencies(${APP_NAME_LC}-libraries ${name}) | 166 | add_dependencies(${APP_NAME_LC}-libraries ${name}) |
| @@ -595,9 +598,9 @@ macro(core_find_versions) | |||
| 595 | set(APP_VERSION ${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}) | 598 | set(APP_VERSION ${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}) |
| 596 | if(APP_VERSION_TAG) | 599 | if(APP_VERSION_TAG) |
| 597 | set(APP_VERSION ${APP_VERSION}-${APP_VERSION_TAG}) | 600 | set(APP_VERSION ${APP_VERSION}-${APP_VERSION_TAG}) |
| 601 | string(TOLOWER ${APP_VERSION_TAG} APP_VERSION_TAG_LC) | ||
| 598 | endif() | 602 | endif() |
| 599 | string(REPLACE "." "," FILE_VERSION ${APP_ADDON_API}.0) | 603 | string(REPLACE "." "," FILE_VERSION ${APP_ADDON_API}.0) |
| 600 | string(TOLOWER ${APP_VERSION_TAG} APP_VERSION_TAG_LC) | ||
| 601 | file(STRINGS ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_guilib.h guilib_version REGEX "^.*GUILIB_API_VERSION (.*)$") | 604 | file(STRINGS ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_guilib.h guilib_version REGEX "^.*GUILIB_API_VERSION (.*)$") |
| 602 | string(REGEX REPLACE ".*\"(.*)\"" "\\1" guilib_version ${guilib_version}) | 605 | string(REGEX REPLACE ".*\"(.*)\"" "\\1" guilib_version ${guilib_version}) |
| 603 | file(STRINGS ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_guilib.h guilib_version_min REGEX "^.*GUILIB_MIN_API_VERSION (.*)$") | 606 | file(STRINGS ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_guilib.h guilib_version_min REGEX "^.*GUILIB_MIN_API_VERSION (.*)$") |
diff --git a/project/cmake/scripts/common/PrepareEnv.cmake b/project/cmake/scripts/common/PrepareEnv.cmake index 8e02382..51be739 100644 --- a/project/cmake/scripts/common/PrepareEnv.cmake +++ b/project/cmake/scripts/common/PrepareEnv.cmake | |||
| @@ -51,43 +51,14 @@ foreach(binding ${bindings}) | |||
| 51 | configure_file(${CORE_SOURCE_DIR}/${header} ${APP_INCLUDE_DIR} COPYONLY) | 51 | configure_file(${CORE_SOURCE_DIR}/${header} ${APP_INCLUDE_DIR} COPYONLY) |
| 52 | endforeach() | 52 | endforeach() |
| 53 | 53 | ||
| 54 | ### on windows we need a "patch" binary to be able to patch 3rd party sources | 54 | ### processing additional tools required by the platform |
| 55 | if(WIN32) | 55 | if(EXISTS ${CORE_SOURCE_DIR}/project/cmake/scripts/${CORE_SYSTEM_NAME}/tools/) |
| 56 | find_program(PATCH_FOUND NAMES patch patch.exe) | 56 | file(GLOB platform_tools ${CORE_SOURCE_DIR}/project/cmake/scripts/${CORE_SYSTEM_NAME}/tools/*.cmake) |
| 57 | if(PATCH_FOUND) | 57 | foreach(platform_tool ${platform_tools}) |
| 58 | message(STATUS "patch utility found at ${PATCH_FOUND}") | 58 | get_filename_component(platform_tool_name ${platform_tool} NAME_WE) |
| 59 | else() | 59 | message(STATUS "Processing ${CORE_SYSTEM_NAME} specific tool: ${platform_tool_name}") |
| 60 | set(PATCH_ARCHIVE_NAME "patch-2.5.9-7-bin-3") | ||
| 61 | set(PATCH_ARCHIVE "${PATCH_ARCHIVE_NAME}.zip") | ||
| 62 | set(PATCH_URL "${KODI_MIRROR}/build-deps/win32/${PATCH_ARCHIVE}") | ||
| 63 | set(PATCH_DOWNLOAD ${BUILD_DIR}/download/${PATCH_ARCHIVE}) | ||
| 64 | 60 | ||
| 65 | # download the archive containing patch.exe | 61 | # include the file |
| 66 | message(STATUS "Downloading patch utility from ${PATCH_URL}...") | 62 | include(${platform_tool}) |
| 67 | file(DOWNLOAD "${PATCH_URL}" "${PATCH_DOWNLOAD}" STATUS PATCH_DL_STATUS LOG PATCH_LOG SHOW_PROGRESS) | 63 | endforeach() |
| 68 | list(GET PATCH_DL_STATUS 0 PATCH_RETCODE) | ||
| 69 | if(NOT ${PATCH_RETCODE} EQUAL 0) | ||
| 70 | message(FATAL_ERROR "ERROR downloading ${PATCH_URL} - status: ${PATCH_DL_STATUS} log: ${PATCH_LOG}") | ||
| 71 | endif() | ||
| 72 | |||
| 73 | # extract the archive containing patch.exe | ||
| 74 | execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzvf ${PATCH_DOWNLOAD} | ||
| 75 | WORKING_DIRECTORY ${BUILD_DIR}) | ||
| 76 | |||
| 77 | # make sure the extraction worked and that patch.exe is there | ||
| 78 | set(PATCH_PATH ${BUILD_DIR}/${PATCH_ARCHIVE_NAME}) | ||
| 79 | set(PATCH_BINARY_PATH ${PATCH_PATH}/bin/patch.exe) | ||
| 80 | if(NOT EXISTS ${PATCH_PATH} OR NOT EXISTS ${PATCH_BINARY_PATH}) | ||
| 81 | message(FATAL_ERROR "ERROR extracting patch utility from ${PATCH_DOWNLOAD_DIR}") | ||
| 82 | endif() | ||
| 83 | |||
| 84 | # copy patch.exe into the output directory | ||
| 85 | file(INSTALL ${PATCH_BINARY_PATH} DESTINATION ${ADDON_DEPENDS_PATH}/bin) | ||
| 86 | |||
| 87 | # make sure that cmake can find the copied patch.exe | ||
| 88 | find_program(PATCH_FOUND NAMES patch patch.exe) | ||
| 89 | if(NOT PATCH_FOUND) | ||
| 90 | message(FATAL_ERROR "ERROR installing patch utility from ${PATCH_BINARY_PATH} to ${ADDON_DEPENDS_PATH}/bin") | ||
| 91 | endif() | ||
| 92 | endif() | ||
| 93 | endif() | 64 | endif() |
diff --git a/project/cmake/scripts/ios/ArchSetup.cmake b/project/cmake/scripts/ios/ArchSetup.cmake index 56661e2..f3e8590 100644 --- a/project/cmake/scripts/ios/ArchSetup.cmake +++ b/project/cmake/scripts/ios/ArchSetup.cmake | |||
| @@ -13,6 +13,7 @@ if(WITH_ARCH) | |||
| 13 | set(ARCH ${WITH_ARCH}) | 13 | set(ARCH ${WITH_ARCH}) |
| 14 | else() | 14 | else() |
| 15 | if(CPU STREQUAL armv7 OR CPU STREQUAL arm64) | 15 | if(CPU STREQUAL armv7 OR CPU STREQUAL arm64) |
| 16 | set(CMAKE_OSX_ARCHITECTURES ${CPU}) | ||
| 16 | set(ARCH arm-osx) | 17 | set(ARCH arm-osx) |
| 17 | set(NEON False) | 18 | set(NEON False) |
| 18 | else() | 19 | else() |
| @@ -34,3 +35,23 @@ list(APPEND DEPLIBS "-framework CoreFoundation" "-framework CoreVideo" | |||
| 34 | 35 | ||
| 35 | set(ENABLE_DVDCSS OFF CACHE BOOL "" FORCE) | 36 | set(ENABLE_DVDCSS OFF CACHE BOOL "" FORCE) |
| 36 | set(ENABLE_OPTICAL OFF CACHE BOOL "" FORCE) | 37 | set(ENABLE_OPTICAL OFF CACHE BOOL "" FORCE) |
| 38 | |||
| 39 | set(CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET "5.1") | ||
| 40 | set(CMAKE_XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2") | ||
| 41 | |||
| 42 | set(CMAKE_XCODE_ATTRIBUTE_INLINES_ARE_PRIVATE_EXTERN OFF) | ||
| 43 | set(CMAKE_XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN OFF) | ||
| 44 | set(CMAKE_XCODE_ATTRIBUTE_COPY_PHASE_STRIP OFF) | ||
| 45 | |||
| 46 | # Xcode strips dead code by default which breaks wrapping | ||
| 47 | set(CMAKE_XCODE_ATTRIBUTE_DEAD_CODE_STRIPPING OFF) | ||
| 48 | |||
| 49 | # Unify output directories for iOS packaging scripts | ||
| 50 | if(NOT CMAKE_GENERATOR MATCHES Xcode) | ||
| 51 | set(CORE_BUILD_CONFIG "${CORE_BUILD_CONFIG}-iphoneos") | ||
| 52 | endif() | ||
| 53 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CORE_BUILD_DIR}/${CORE_BUILD_CONFIG}) | ||
| 54 | foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES}) | ||
| 55 | string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG) | ||
| 56 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CORE_BUILD_DIR}/${CORE_BUILD_CONFIG}) | ||
| 57 | endforeach() | ||
diff --git a/project/cmake/scripts/ios/Install.cmake b/project/cmake/scripts/ios/Install.cmake index 052565f..c49fcd5 100644 --- a/project/cmake/scripts/ios/Install.cmake +++ b/project/cmake/scripts/ios/Install.cmake | |||
| @@ -1,42 +1,54 @@ | |||
| 1 | # IOS packaging | 1 | # IOS packaging |
| 2 | 2 | ||
| 3 | set(PACKAGE_OUTPUT_DIR ${CMAKE_BINARY_DIR}/build/${CORE_BUILD_CONFIG}-iphoneos) | 3 | set(BUNDLE_RESOURCES ${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-568h@2x.png |
| 4 | ${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-667h@2x.png | ||
| 5 | ${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-736h@3x.png | ||
| 6 | ${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-Landscape-736h@3x.png | ||
| 7 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon29x29.png | ||
| 8 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon29x29@2x.png | ||
| 9 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon40x40.png | ||
| 10 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon40x40@2x.png | ||
| 11 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon50x50.png | ||
| 12 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon50x50@2x.png | ||
| 13 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon57x57.png | ||
| 14 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon57x57@2x.png | ||
| 15 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon60x60.png | ||
| 16 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon60x60@2x.png | ||
| 17 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon72x72.png | ||
| 18 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon72x72@2x.png | ||
| 19 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon76x76.png | ||
| 20 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon76x76@2x.png) | ||
| 4 | 21 | ||
| 5 | file(MAKE_DIRECTORY ${PACKAGE_OUTPUT_DIR}/${APP_NAME}.app) | 22 | if(CMAKE_GENERATOR STREQUAL Xcode) |
| 6 | set(BUNDLE_RESOURCES xbmc/platform/darwin/ios/Default-568h@2x.png | 23 | set(RESOURCE_LOCATION ${APP_NAME}.app) |
| 7 | xbmc/platform/darwin/ios/Default-667h@2x.png | 24 | else() |
| 8 | xbmc/platform/darwin/ios/Default-736h@3x.png | 25 | set(RESOURCE_LOCATION ".") |
| 9 | xbmc/platform/darwin/ios/Default-Landscape-736h@3x.png | 26 | endif() |
| 10 | tools/darwin/packaging/media/ios/rounded/AppIcon29x29.png | ||
| 11 | tools/darwin/packaging/media/ios/rounded/AppIcon29x29@2x.png | ||
| 12 | tools/darwin/packaging/media/ios/rounded/AppIcon40x40.png | ||
| 13 | tools/darwin/packaging/media/ios/rounded/AppIcon40x40@2x.png | ||
| 14 | tools/darwin/packaging/media/ios/rounded/AppIcon50x50.png | ||
| 15 | tools/darwin/packaging/media/ios/rounded/AppIcon50x50@2x.png | ||
| 16 | tools/darwin/packaging/media/ios/rounded/AppIcon57x57.png | ||
| 17 | tools/darwin/packaging/media/ios/rounded/AppIcon57x57@2x.png | ||
| 18 | tools/darwin/packaging/media/ios/rounded/AppIcon60x60.png | ||
| 19 | tools/darwin/packaging/media/ios/rounded/AppIcon60x60@2x.png | ||
| 20 | tools/darwin/packaging/media/ios/rounded/AppIcon72x72.png | ||
| 21 | tools/darwin/packaging/media/ios/rounded/AppIcon72x72@2x.png | ||
| 22 | tools/darwin/packaging/media/ios/rounded/AppIcon76x76.png | ||
| 23 | tools/darwin/packaging/media/ios/rounded/AppIcon76x76@2x.png) | ||
| 24 | 27 | ||
| 25 | foreach(resource IN LISTS BUNDLE_RESOURCES) | 28 | target_sources(${APP_NAME_LC} PRIVATE ${BUNDLE_RESOURCES}) |
| 26 | configure_file(${CORE_SOURCE_DIR}/${resource} ${PACKAGE_OUTPUT_DIR}/${APP_NAME}.app COPYONLY) | 29 | foreach(file IN LISTS BUNDLE_RESOURCES) |
| 30 | set_source_files_properties(${file} PROPERTIES MACOSX_PACKAGE_LOCATION ${RESOURCE_LOCATION}) | ||
| 27 | endforeach() | 31 | endforeach() |
| 28 | configure_file(${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/English.lproj/InfoPlist.strings | ||
| 29 | ${PACKAGE_OUTPUT_DIR}/${APP_NAME}.app/English.lproj/InfoPlist.strings COPYONLY) | ||
| 30 | 32 | ||
| 31 | configure_file(${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/Info.plist.in | 33 | target_sources(${APP_NAME_LC} PRIVATE ${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/English.lproj/InfoPlist.strings) |
| 32 | ${PACKAGE_OUTPUT_DIR}/${APP_NAME}.app/Info.plist @ONLY) | 34 | set_source_files_properties(${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/English.lproj/InfoPlist.strings PROPERTIES MACOSX_PACKAGE_LOCATION "${RESOURCE_LOCATION}/English.lproj") |
| 35 | |||
| 36 | # Options for code signing propagated as env vars to Codesign.command via Xcode | ||
| 37 | set(IOS_CODE_SIGN_IDENTITY "" CACHE STRING "Code Sign Identity") | ||
| 38 | if(IOS_CODE_SIGN_IDENTITY) | ||
| 39 | set_target_properties(${APP_NAME_LC} PROPERTIES XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED TRUE | ||
| 40 | XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY ${IOS_CODE_SIGN_IDENTITY}) | ||
| 41 | endif() | ||
| 42 | |||
| 43 | add_custom_command(TARGET ${APP_NAME_LC} POST_BUILD | ||
| 44 | # TODO: Remove in sync with CopyRootFiles-ios expecting the ".bin" file | ||
| 45 | COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${APP_NAME_LC}> | ||
| 46 | $<TARGET_FILE_DIR:${APP_NAME_LC}>/${APP_NAME}.bin | ||
| 33 | 47 | ||
| 34 | add_custom_target(bundle | ||
| 35 | COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${APP_NAME_LC}> ${PACKAGE_OUTPUT_DIR}/${APP_NAME}.app/${APP_NAME}.bin | ||
| 36 | COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/DllPaths_generated.h | 48 | COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/DllPaths_generated.h |
| 37 | ${CMAKE_BINARY_DIR}/xbmc/DllPaths_generated.h | 49 | ${CMAKE_BINARY_DIR}/xbmc/DllPaths_generated.h |
| 38 | COMMAND "ACTION=build" | 50 | COMMAND "ACTION=build" |
| 39 | "TARGET_BUILD_DIR=${PACKAGE_OUTPUT_DIR}" | 51 | "TARGET_BUILD_DIR=$<TARGET_FILE_DIR:${APP_NAME_LC}>/.." |
| 40 | "TARGET_NAME=${APP_NAME}.app" | 52 | "TARGET_NAME=${APP_NAME}.app" |
| 41 | "APP_NAME=${APP_NAME}" | 53 | "APP_NAME=${APP_NAME}" |
| 42 | "PRODUCT_NAME=${APP_NAME}" | 54 | "PRODUCT_NAME=${APP_NAME}" |
| @@ -44,15 +56,22 @@ add_custom_target(bundle | |||
| 44 | "SRCROOT=${CMAKE_BINARY_DIR}" | 56 | "SRCROOT=${CMAKE_BINARY_DIR}" |
| 45 | ${CORE_SOURCE_DIR}/tools/darwin/Support/CopyRootFiles-ios.command | 57 | ${CORE_SOURCE_DIR}/tools/darwin/Support/CopyRootFiles-ios.command |
| 46 | COMMAND "XBMC_DEPENDS=${DEPENDS_PATH}" | 58 | COMMAND "XBMC_DEPENDS=${DEPENDS_PATH}" |
| 47 | "TARGET_BUILD_DIR=${PACKAGE_OUTPUT_DIR}" | 59 | "TARGET_BUILD_DIR=$<TARGET_FILE_DIR:${APP_NAME_LC}>/.." |
| 48 | "TARGET_NAME=${APP_NAME}.app" | 60 | "TARGET_NAME=${APP_NAME}.app" |
| 49 | "APP_NAME=${APP_NAME}" | 61 | "APP_NAME=${APP_NAME}" |
| 50 | "PRODUCT_NAME=${APP_NAME}" | 62 | "PRODUCT_NAME=${APP_NAME}" |
| 51 | "FULL_PRODUCT_NAME=${APP_NAME}.app" | 63 | "FULL_PRODUCT_NAME=${APP_NAME}.app" |
| 52 | "WRAPPER_EXTENSION=app" | 64 | "WRAPPER_EXTENSION=app" |
| 53 | "SRCROOT=${CMAKE_BINARY_DIR}" | 65 | "SRCROOT=${CMAKE_BINARY_DIR}" |
| 54 | ${CORE_SOURCE_DIR}/tools/darwin/Support/copyframeworks-ios.command) | 66 | ${CORE_SOURCE_DIR}/tools/darwin/Support/copyframeworks-ios.command |
| 55 | add_dependencies(bundle ${APP_NAME_LC}) | 67 | COMMAND "XBMC_DEPENDS_ROOT=${NATIVEPREFIX}/.." |
| 68 | "PLATFORM_NAME=${PLATFORM}" | ||
| 69 | "CODESIGNING_FOLDER_PATH=$<TARGET_FILE_DIR:${APP_NAME_LC}>" | ||
| 70 | "BUILT_PRODUCTS_DIR=$<TARGET_FILE_DIR:${APP_NAME_LC}>/.." | ||
| 71 | "WRAPPER_NAME=${APP_NAME}.app" | ||
| 72 | "APP_NAME=${APP_NAME}" | ||
| 73 | ${CORE_SOURCE_DIR}/tools/darwin/Support/Codesign.command | ||
| 74 | ) | ||
| 56 | 75 | ||
| 57 | set(DEPENDS_ROOT_FOR_XCODE ${NATIVEPREFIX}/..) | 76 | set(DEPENDS_ROOT_FOR_XCODE ${NATIVEPREFIX}/..) |
| 58 | configure_file(${CORE_SOURCE_DIR}/tools/darwin/packaging/ios/mkdeb-ios.sh.in | 77 | configure_file(${CORE_SOURCE_DIR}/tools/darwin/packaging/ios/mkdeb-ios.sh.in |
| @@ -61,14 +80,6 @@ configure_file(${CORE_SOURCE_DIR}/tools/darwin/packaging/migrate_to_kodi_ios.sh. | |||
| 61 | ${CMAKE_BINARY_DIR}/tools/darwin/packaging/migrate_to_kodi_ios.sh @ONLY) | 80 | ${CMAKE_BINARY_DIR}/tools/darwin/packaging/migrate_to_kodi_ios.sh @ONLY) |
| 62 | 81 | ||
| 63 | add_custom_target(deb | 82 | add_custom_target(deb |
| 64 | COMMAND "XBMC_DEPENDS_ROOT=${NATIVEPREFIX}/.." | ||
| 65 | "PLATFORM_NAME=${PLATFORM}" | ||
| 66 | "CODESIGNING_FOLDER_PATH=${PACKAGE_OUTPUT_DIR}/${APP_NAME}.app" | ||
| 67 | "BUILT_PRODUCTS_DIR=${PACKAGE_OUTPUT_DIR}" | ||
| 68 | "WRAPPER_NAME=${APP_NAME}.app" | ||
| 69 | "APP_NAME=${APP_NAME}" | ||
| 70 | "CODE_SIGN_IDENTITY=\"\"" | ||
| 71 | ${CORE_SOURCE_DIR}/tools/darwin/Support/Codesign.command | ||
| 72 | COMMAND sh ./mkdeb-ios.sh ${CORE_BUILD_CONFIG} | 83 | COMMAND sh ./mkdeb-ios.sh ${CORE_BUILD_CONFIG} |
| 73 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/tools/darwin/packaging/ios) | 84 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/tools/darwin/packaging/ios) |
| 74 | add_dependencies(deb bundle) | 85 | add_dependencies(deb ${APP_NAME_LC}) |
diff --git a/project/cmake/scripts/linux/ArchSetup.cmake b/project/cmake/scripts/linux/ArchSetup.cmake index cae0bb8..bcd70df 100644 --- a/project/cmake/scripts/linux/ArchSetup.cmake +++ b/project/cmake/scripts/linux/ArchSetup.cmake | |||
| @@ -39,3 +39,7 @@ if(CMAKE_BUILD_TYPE STREQUAL Coverage) | |||
| 39 | set(COVERAGE_DEPENDS "\${APP_NAME_LC}" "\${APP_NAME_LC}-test") | 39 | set(COVERAGE_DEPENDS "\${APP_NAME_LC}" "\${APP_NAME_LC}-test") |
| 40 | set(COVERAGE_EXCLUDES */test/* lib/* */lib/*) | 40 | set(COVERAGE_EXCLUDES */test/* lib/* */lib/*) |
| 41 | endif() | 41 | endif() |
| 42 | |||
| 43 | if(ENABLE_MIR) | ||
| 44 | set(ENABLE_VDPAU OFF CACHE BOOL "Disabling VDPAU since no Mir support" FORCE) | ||
| 45 | endif() | ||
diff --git a/project/cmake/scripts/linux/Install.cmake b/project/cmake/scripts/linux/Install.cmake index 5458707..43e2e5e 100644 --- a/project/cmake/scripts/linux/Install.cmake +++ b/project/cmake/scripts/linux/Install.cmake | |||
| @@ -137,9 +137,11 @@ install(FILES ${CORE_SOURCE_DIR}/privacy-policy.txt | |||
| 137 | COMPONENT kodi) | 137 | COMPONENT kodi) |
| 138 | 138 | ||
| 139 | # Install kodi-tools-texturepacker | 139 | # Install kodi-tools-texturepacker |
| 140 | install(PROGRAMS ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/texturepacker/TexturePacker | 140 | if(NOT WITH_TEXTUREPACKER) |
| 141 | DESTINATION ${bindir} | 141 | install(PROGRAMS ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/texturepacker/TexturePacker |
| 142 | COMPONENT kodi-tools-texturepacker) | 142 | DESTINATION ${bindir} |
| 143 | COMPONENT kodi-tools-texturepacker) | ||
| 144 | endif() | ||
| 143 | 145 | ||
| 144 | # Install kodi-addon-dev headers | 146 | # Install kodi-addon-dev headers |
| 145 | install(FILES ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_vfs_types.h | 147 | install(FILES ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_vfs_types.h |
| @@ -152,12 +154,14 @@ install(FILES ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kod | |||
| 152 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h | 154 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h |
| 153 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_codec.h | 155 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_codec.h |
| 154 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_pvr.h | 156 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_pvr.h |
| 157 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_game.h | ||
| 155 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_cpp_dll.h | 158 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_cpp_dll.h |
| 156 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_dll.h | 159 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_dll.h |
| 157 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_types.h | 160 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_types.h |
| 158 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_codec_types.h | 161 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_codec_types.h |
| 159 | ${CORE_SOURCE_DIR}/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxPacket.h | 162 | ${CORE_SOURCE_DIR}/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxPacket.h |
| 160 | ${CORE_SOURCE_DIR}/xbmc/filesystem/IFileTypes.h | 163 | ${CORE_SOURCE_DIR}/xbmc/filesystem/IFileTypes.h |
| 164 | ${CORE_SOURCE_DIR}/xbmc/input/XBMC_vkeys.h | ||
| 161 | DESTINATION ${includedir}/${APP_NAME_LC} | 165 | DESTINATION ${includedir}/${APP_NAME_LC} |
| 162 | COMPONENT kodi-addon-dev) | 166 | COMPONENT kodi-addon-dev) |
| 163 | 167 | ||
| @@ -310,6 +314,14 @@ install(FILES ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kod | |||
| 310 | DESTINATION ${includedir}/${APP_NAME_LC} | 314 | DESTINATION ${includedir}/${APP_NAME_LC} |
| 311 | COMPONENT kodi-peripheral-dev) | 315 | COMPONENT kodi-peripheral-dev) |
| 312 | 316 | ||
| 317 | # Install kodi-game-dev | ||
| 318 | install(FILES ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_callbacks.h | ||
| 319 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h | ||
| 320 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_types.h | ||
| 321 | DESTINATION ${includedir}/${APP_NAME_LC} | ||
| 322 | COMPONENT kodi-game-dev) | ||
| 323 | |||
| 324 | |||
| 313 | # Install XBT skin files | 325 | # Install XBT skin files |
| 314 | foreach(texture ${XBT_FILES}) | 326 | foreach(texture ${XBT_FILES}) |
| 315 | string(REPLACE "${CMAKE_BINARY_DIR}/" "" dir ${texture}) | 327 | string(REPLACE "${CMAKE_BINARY_DIR}/" "" dir ${texture}) |
diff --git a/project/cmake/scripts/osx/Macros.cmake b/project/cmake/scripts/osx/Macros.cmake index 0d04439..52f87d1 100644 --- a/project/cmake/scripts/osx/Macros.cmake +++ b/project/cmake/scripts/osx/Macros.cmake | |||
| @@ -2,7 +2,7 @@ function(core_link_library lib wraplib) | |||
| 2 | if(CMAKE_GENERATOR MATCHES "Unix Makefiles" OR CMAKE_GENERATOR STREQUAL Ninja) | 2 | if(CMAKE_GENERATOR MATCHES "Unix Makefiles" OR CMAKE_GENERATOR STREQUAL Ninja) |
| 3 | set(wrapper_obj cores/dll-loader/exports/CMakeFiles/wrapper.dir/wrapper.c.o) | 3 | set(wrapper_obj cores/dll-loader/exports/CMakeFiles/wrapper.dir/wrapper.c.o) |
| 4 | elseif(CMAKE_GENERATOR MATCHES "Xcode") | 4 | elseif(CMAKE_GENERATOR MATCHES "Xcode") |
| 5 | set(wrapper_obj cores/dll-loader/exports/kodi.build/$(CONFIGURATION)/wrapper.build/Objects-$(CURRENT_VARIANT)/$(CURRENT_ARCH)/wrapper.o) | 5 | set(wrapper_obj cores/dll-loader/exports/kodi.build/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/wrapper.build/Objects-$(CURRENT_VARIANT)/$(CURRENT_ARCH)/wrapper.o) |
| 6 | else() | 6 | else() |
| 7 | message(FATAL_ERROR "Unsupported generator in core_link_library") | 7 | message(FATAL_ERROR "Unsupported generator in core_link_library") |
| 8 | endif() | 8 | endif() |
| @@ -17,6 +17,13 @@ function(core_link_library lib wraplib) | |||
| 17 | set(link_lib $<TARGET_FILE:${lib}>) | 17 | set(link_lib $<TARGET_FILE:${lib}>) |
| 18 | set(check_arg ${ARGV2}) | 18 | set(check_arg ${ARGV2}) |
| 19 | set(data_arg ${ARGV3}) | 19 | set(data_arg ${ARGV3}) |
| 20 | |||
| 21 | # iOS: EFFECTIVE_PLATFORM_NAME is not resolved | ||
| 22 | # http://public.kitware.com/pipermail/cmake/2016-March/063049.html | ||
| 23 | if(CORE_SYSTEM_NAME STREQUAL ios AND CMAKE_GENERATOR STREQUAL Xcode) | ||
| 24 | get_target_property(dir ${lib} BINARY_DIR) | ||
| 25 | set(link_lib ${dir}/${CORE_BUILD_CONFIG}/${CMAKE_STATIC_LIBRARY_PREFIX}${lib}${CMAKE_STATIC_LIBRARY_SUFFIX}) | ||
| 26 | endif() | ||
| 20 | else() | 27 | else() |
| 21 | set(target ${ARGV2}) | 28 | set(target ${ARGV2}) |
| 22 | set(link_lib ${lib}) | 29 | set(link_lib ${lib}) |
diff --git a/project/cmake/scripts/windows/tools/patch.cmake b/project/cmake/scripts/windows/tools/patch.cmake new file mode 100644 index 0000000..0ef2952 --- /dev/null +++ b/project/cmake/scripts/windows/tools/patch.cmake | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | find_program(PATCH_FOUND NAMES patch patch.exe) | ||
| 2 | if(PATCH_FOUND) | ||
| 3 | message(STATUS "patch utility found at ${PATCH_FOUND}") | ||
| 4 | else() | ||
| 5 | set(PATCH_ARCHIVE_NAME "patch-2.5.9-7-bin-1") | ||
| 6 | set(PATCH_ARCHIVE "${PATCH_ARCHIVE_NAME}.zip") | ||
| 7 | set(PATCH_URL "${KODI_MIRROR}/build-deps/win32/${PATCH_ARCHIVE}") | ||
| 8 | set(PATCH_DOWNLOAD ${BUILD_DIR}/download/${PATCH_ARCHIVE}) | ||
| 9 | |||
| 10 | # download the archive containing patch.exe | ||
| 11 | message(STATUS "Downloading patch utility from ${PATCH_URL}...") | ||
| 12 | file(DOWNLOAD "${PATCH_URL}" "${PATCH_DOWNLOAD}" STATUS PATCH_DL_STATUS LOG PATCH_LOG SHOW_PROGRESS) | ||
| 13 | list(GET PATCH_DL_STATUS 0 PATCH_RETCODE) | ||
| 14 | if(NOT PATCH_RETCODE EQUAL 0) | ||
| 15 | message(FATAL_ERROR "ERROR downloading ${PATCH_URL} - status: ${PATCH_DL_STATUS} log: ${PATCH_LOG}") | ||
| 16 | endif() | ||
| 17 | |||
| 18 | # extract the archive containing patch.exe | ||
| 19 | execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzvf ${PATCH_DOWNLOAD} | ||
| 20 | WORKING_DIRECTORY ${BUILD_DIR}) | ||
| 21 | |||
| 22 | # make sure the extraction worked and that patch.exe is there | ||
| 23 | set(PATCH_PATH ${BUILD_DIR}/${PATCH_ARCHIVE_NAME}) | ||
| 24 | set(PATCH_BINARY_PATH ${PATCH_PATH}/bin/patch.exe) | ||
| 25 | if(NOT EXISTS ${PATCH_PATH} OR NOT EXISTS ${PATCH_BINARY_PATH}) | ||
| 26 | message(FATAL_ERROR "ERROR extracting patch utility from ${PATCH_PATH}") | ||
| 27 | endif() | ||
| 28 | |||
| 29 | # copy patch.exe into the output directory | ||
| 30 | file(INSTALL ${PATCH_BINARY_PATH} DESTINATION ${ADDON_DEPENDS_PATH}/bin) | ||
| 31 | |||
| 32 | # make sure that cmake can find the copied patch.exe | ||
| 33 | find_program(PATCH_FOUND NAMES patch patch.exe) | ||
| 34 | if(NOT PATCH_FOUND) | ||
| 35 | message(FATAL_ERROR "ERROR installing patch utility from ${PATCH_BINARY_PATH} to ${ADDON_DEPENDS_PATH}/bin") | ||
| 36 | endif() | ||
| 37 | endif() | ||
diff --git a/project/cmake/treedata/common/addons.txt b/project/cmake/treedata/common/addons.txt index 76410b7..f29e086 100644 --- a/project/cmake/treedata/common/addons.txt +++ b/project/cmake/treedata/common/addons.txt | |||
| @@ -1,8 +1,7 @@ | |||
| 1 | lib/addons/library.kodi.adsp KODI_adsp | 1 | lib/addons/library.kodi.adsp KODI_adsp |
| 2 | lib/addons/library.kodi.audioengine KODI_audioengine | 2 | lib/addons/library.kodi.audioengine KODI_audioengine |
| 3 | lib/addons/library.kodi.game KODI_game | ||
| 3 | lib/addons/library.kodi.guilib KODI_guilib | 4 | lib/addons/library.kodi.guilib KODI_guilib |
| 4 | lib/addons/library.kodi.inputstream KODI_inputstream | ||
| 5 | lib/addons/library.kodi.peripheral KODI_peripheral | 5 | lib/addons/library.kodi.peripheral KODI_peripheral |
| 6 | lib/addons/library.xbmc.addon XBMC_addon | 6 | lib/addons/library.xbmc.addon XBMC_addon |
| 7 | lib/addons/library.xbmc.codec XBMC_codec | 7 | lib/addons/library.xbmc.codec XBMC_codec |
| 8 | lib/addons/library.xbmc.pvr XBMC_pvr | ||
diff --git a/project/cmake/treedata/common/cores.txt b/project/cmake/treedata/common/cores.txt index d23939d..8d79dd1 100644 --- a/project/cmake/treedata/common/cores.txt +++ b/project/cmake/treedata/common/cores.txt | |||
| @@ -6,3 +6,4 @@ xbmc/cores/DllLoader/exports/util cores/dll-loader/exports/util | |||
| 6 | xbmc/cores/ExternalPlayer cores/externalplayer | 6 | xbmc/cores/ExternalPlayer cores/externalplayer |
| 7 | xbmc/cores/paplayer cores/paplayer | 7 | xbmc/cores/paplayer cores/paplayer |
| 8 | xbmc/cores/playercorefactory cores/playercorefactory | 8 | xbmc/cores/playercorefactory cores/playercorefactory |
| 9 | xbmc/cores/RetroPlayer cores/RetroPlayer | ||
diff --git a/project/cmake/treedata/common/games.txt b/project/cmake/treedata/common/games.txt index b622f5a..03d42bc 100644 --- a/project/cmake/treedata/common/games.txt +++ b/project/cmake/treedata/common/games.txt | |||
| @@ -1,4 +1,12 @@ | |||
| 1 | xbmc/games games | ||
| 2 | xbmc/games/addons games/addons | ||
| 3 | xbmc/games/addons/playback games/addons/playback | ||
| 4 | xbmc/games/addons/savestates games/addons/savestates | ||
| 1 | xbmc/games/controllers games/controllers | 5 | xbmc/games/controllers games/controllers |
| 2 | xbmc/games/controllers/dialogs games/controllers/dialogs | 6 | xbmc/games/controllers/dialogs games/controllers/dialogs |
| 3 | xbmc/games/controllers/guicontrols games/controllers/guicontrols | 7 | xbmc/games/controllers/guicontrols games/controllers/guicontrols |
| 4 | xbmc/games/controllers/windows games/controllers/windows | 8 | xbmc/games/controllers/windows games/controllers/windows |
| 9 | xbmc/games/dialogs games/dialogs | ||
| 10 | xbmc/games/ports games/ports | ||
| 11 | xbmc/games/tags games/tags | ||
| 12 | xbmc/games/windows games/windows | ||
diff --git a/project/cmake/treedata/common/network.txt b/project/cmake/treedata/common/network.txt index 6331b2d..46da314 100644 --- a/project/cmake/treedata/common/network.txt +++ b/project/cmake/treedata/common/network.txt | |||
| @@ -1,4 +1,2 @@ | |||
| 1 | xbmc/network network | 1 | xbmc/network network |
| 2 | xbmc/network/httprequesthandler network/httprequesthandler | ||
| 3 | xbmc/network/httprequesthandler/python network/httprequesthandler/python | ||
| 4 | xbmc/network/websocket network/websocket | 2 | xbmc/network/websocket network/websocket |
diff --git a/project/cmake/treedata/common/subdirs.txt b/project/cmake/treedata/common/subdirs.txt index e2bca7e..af91611 100644 --- a/project/cmake/treedata/common/subdirs.txt +++ b/project/cmake/treedata/common/subdirs.txt | |||
| @@ -5,6 +5,7 @@ xbmc/addons/binary/interfaces/api1/Addon api1AddonCallbacks_Addon | |||
| 5 | xbmc/addons/binary/interfaces/api1/AudioDSP api1AddonCallbacks_AudioDSP | 5 | xbmc/addons/binary/interfaces/api1/AudioDSP api1AddonCallbacks_AudioDSP |
| 6 | xbmc/addons/binary/interfaces/api1/AudioEngine api1AddonCallbacks_AudioEngine | 6 | xbmc/addons/binary/interfaces/api1/AudioEngine api1AddonCallbacks_AudioEngine |
| 7 | xbmc/addons/binary/interfaces/api1/Codec api1AddonCallbacks_Codec | 7 | xbmc/addons/binary/interfaces/api1/Codec api1AddonCallbacks_Codec |
| 8 | xbmc/addons/binary/interfaces/api1/Game api1AddonCallbacks_Game | ||
| 8 | xbmc/addons/binary/interfaces/api1/GUI api1AddonCallbacks_GUI | 9 | xbmc/addons/binary/interfaces/api1/GUI api1AddonCallbacks_GUI |
| 9 | xbmc/addons/binary/interfaces/api1/InputStream api1AddonCallbacks_InputStream | 10 | xbmc/addons/binary/interfaces/api1/InputStream api1AddonCallbacks_InputStream |
| 10 | xbmc/addons/binary/interfaces/api1/Peripheral api1AddonCallbacks_Peripheral | 11 | xbmc/addons/binary/interfaces/api1/Peripheral api1AddonCallbacks_Peripheral |
| @@ -18,6 +19,10 @@ xbmc/input input | |||
| 18 | xbmc/input/joysticks input/joysticks | 19 | xbmc/input/joysticks input/joysticks |
| 19 | xbmc/input/joysticks/dialogs input/joysticks/dialogs | 20 | xbmc/input/joysticks/dialogs input/joysticks/dialogs |
| 20 | xbmc/input/joysticks/generic input/joysticks/generic | 21 | xbmc/input/joysticks/generic input/joysticks/generic |
| 22 | xbmc/input/keyboard input/keyboard | ||
| 23 | xbmc/input/keyboard/generic input/keyboard/generic | ||
| 24 | xbmc/input/mouse input/mouse | ||
| 25 | xbmc/input/mouse/generic input/mouse/generic | ||
| 21 | xbmc/listproviders listproviders | 26 | xbmc/listproviders listproviders |
| 22 | xbmc/media media | 27 | xbmc/media media |
| 23 | xbmc/messaging messaging | 28 | xbmc/messaging messaging |
diff --git a/project/cmake/treedata/optional/common/mir.txt b/project/cmake/treedata/optional/common/mir.txt new file mode 100644 index 0000000..d681e8b --- /dev/null +++ b/project/cmake/treedata/optional/common/mir.txt | |||
| @@ -0,0 +1 @@ | |||
| xbmc/windowing/mir windowing/mir # MIR | |||
diff --git a/project/cmake/treedata/optional/common/webserver.txt b/project/cmake/treedata/optional/common/webserver.txt new file mode 100644 index 0000000..b492006 --- /dev/null +++ b/project/cmake/treedata/optional/common/webserver.txt | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | xbmc/network/httprequesthandler network/httprequesthandler # MICROHTTPD | ||
| 2 | xbmc/network/httprequesthandler/python network/httprequesthandler/python # MICROHTTPD | ||
