summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/README.md315
-rw-r--r--cmake/addons/CMakeLists.txt2
-rw-r--r--cmake/addons/README.md2
-rw-r--r--cmake/addons/depends/common/tinyxml/tinyxml.sha2561
-rw-r--r--cmake/cpack/deb/copyright216
-rw-r--r--cmake/cpack/deb/packages/kodi-bin.txt.in2
-rw-r--r--cmake/cpack/deb/packages/kodi-tools-texturepacker.txt.in2
-rw-r--r--cmake/cpack/deb/packages/kodi.txt.in2
-rw-r--r--cmake/installdata/common/certificates.txt (renamed from cmake/installdata/ios/certificates.txt)0
-rw-r--r--cmake/installdata/ios/packaging.txt2
-rw-r--r--cmake/installdata/osx/certificates.txt1
-rw-r--r--cmake/installdata/osx/packaging.txt2
-rw-r--r--cmake/installdata/windowsstore/certificates.txt1
-rw-r--r--cmake/messages/flatbuffers/retroplayer.txt1
-rw-r--r--cmake/modules/FindAML.cmake2
-rw-r--r--cmake/modules/FindASS.cmake2
-rw-r--r--cmake/modules/FindAlsa.cmake2
-rw-r--r--cmake/modules/FindAvahi.cmake2
-rw-r--r--cmake/modules/FindBluetooth.cmake2
-rw-r--r--cmake/modules/FindBluray.cmake21
-rw-r--r--cmake/modules/FindCEC.cmake21
-rw-r--r--cmake/modules/FindCWiid.cmake2
-rw-r--r--cmake/modules/FindCdio.cmake2
-rw-r--r--cmake/modules/FindCurl.cmake2
-rw-r--r--cmake/modules/FindDBus.cmake2
-rw-r--r--cmake/modules/FindEGL.cmake2
-rw-r--r--cmake/modules/FindFFMPEG.cmake28
-rw-r--r--cmake/modules/FindFlatBuffers.cmake72
-rw-r--r--cmake/modules/FindFmt.cmake15
-rw-r--r--cmake/modules/FindFreeType.cmake2
-rw-r--r--cmake/modules/FindFriBidi.cmake2
-rw-r--r--cmake/modules/FindGBM.cmake28
-rw-r--r--cmake/modules/FindGIF.cmake2
-rw-r--r--cmake/modules/FindGLX.cmake2
-rw-r--r--cmake/modules/FindIconv.cmake2
-rw-r--r--cmake/modules/FindLCMS2.cmake2
-rw-r--r--cmake/modules/FindLibDRM.cmake4
-rw-r--r--cmake/modules/FindLibDvd.cmake11
-rw-r--r--cmake/modules/FindLibInput.cmake36
-rw-r--r--cmake/modules/FindLibUSB.cmake2
-rw-r--r--cmake/modules/FindLircClient.cmake2
-rw-r--r--cmake/modules/FindLzo2.cmake2
-rw-r--r--cmake/modules/FindMDNS.cmake2
-rw-r--r--cmake/modules/FindMariaDBClient.cmake2
-rw-r--r--cmake/modules/FindMicroHttpd.cmake2
-rw-r--r--cmake/modules/FindMir.cmake33
-rw-r--r--cmake/modules/FindMySqlClient.cmake2
-rw-r--r--cmake/modules/FindNFS.cmake2
-rw-r--r--cmake/modules/FindOpenGLES.cmake2
-rw-r--r--cmake/modules/FindOpenGl.cmake2
-rw-r--r--cmake/modules/FindPCRE.cmake2
-rw-r--r--cmake/modules/FindPlist.cmake2
-rw-r--r--cmake/modules/FindSSE.cmake4
-rw-r--r--cmake/modules/FindSSH.cmake47
-rw-r--r--cmake/modules/FindSWIG.cmake2
-rw-r--r--cmake/modules/FindSdl.cmake2
-rw-r--r--cmake/modules/FindShairplay.cmake2
-rw-r--r--cmake/modules/FindSmbClient.cmake2
-rw-r--r--cmake/modules/FindSndio.cmake2
-rw-r--r--cmake/modules/FindSqlite3.cmake2
-rw-r--r--cmake/modules/FindTagLib.cmake2
-rw-r--r--cmake/modules/FindTinyXML.cmake2
-rw-r--r--cmake/modules/FindUDEV.cmake2
-rw-r--r--cmake/modules/FindUUID.cmake2
-rw-r--r--cmake/modules/FindVAAPI.cmake2
-rw-r--r--cmake/modules/FindVDPAU.cmake2
-rw-r--r--cmake/modules/FindWaylandProtocols.cmake2
-rw-r--r--cmake/modules/FindWaylandpp.cmake50
-rw-r--r--cmake/modules/FindX.cmake2
-rw-r--r--cmake/modules/FindXRandR.cmake2
-rw-r--r--cmake/modules/FindXSLT.cmake2
-rw-r--r--cmake/modules/FindXkbcommon.cmake39
-rw-r--r--cmake/modules/FindYajl.cmake2
-rw-r--r--cmake/modules/FindZip.cmake2
-rw-r--r--cmake/modules/Findfstrcmp.cmake80
-rw-r--r--cmake/platform/freebsd/gbm.cmake1
-rw-r--r--cmake/platform/freebsd/rbpi.cmake1
-rw-r--r--cmake/platform/linux/aml.cmake2
-rw-r--r--cmake/platform/linux/gbm.cmake19
-rw-r--r--cmake/platform/linux/mir.cmake3
-rw-r--r--cmake/platform/linux/rbpi.cmake2
-rw-r--r--cmake/platform/linux/wayland.cmake2
-rw-r--r--cmake/platform/linux/x11.cmake1
-rw-r--r--cmake/scripts/android/Install.cmake2
-rw-r--r--cmake/scripts/common/AddonHelpers.cmake19
-rw-r--r--cmake/scripts/common/ArchSetup.cmake7
-rw-r--r--cmake/scripts/common/CheckTargetPlatform.cmake4
-rw-r--r--cmake/scripts/common/HandleDepends.cmake16
-rw-r--r--cmake/scripts/common/Macros.cmake14
-rw-r--r--cmake/scripts/common/ProjectMacros.cmake2
-rw-r--r--cmake/scripts/freebsd/ArchSetup.cmake9
-rw-r--r--cmake/scripts/freebsd/ExtraTargets.cmake30
-rw-r--r--[l---------]cmake/scripts/freebsd/Macros.cmake96
-rw-r--r--cmake/scripts/ios/Install.cmake3
-rw-r--r--cmake/scripts/linux/ArchSetup.cmake4
-rw-r--r--cmake/scripts/linux/Install.cmake18
-rw-r--r--cmake/scripts/linux/Macros.cmake2
-rw-r--r--cmake/scripts/osx/ArchSetup.cmake2
-rw-r--r--cmake/scripts/windows/ArchSetup.cmake6
-rw-r--r--cmake/scripts/windowsstore/ArchSetup.cmake32
-rw-r--r--cmake/scripts/windowsstore/Macros.cmake14
-rw-r--r--cmake/treedata/android/subdirs.txt2
-rw-r--r--cmake/treedata/common/drm.txt1
-rw-r--r--cmake/treedata/common/games.txt3
-rw-r--r--cmake/treedata/common/retroplayer.txt7
-rw-r--r--cmake/treedata/freebsd/subdirs.txt4
-rw-r--r--cmake/treedata/optional/common/mir.txt1
107 files changed, 639 insertions, 820 deletions
diff --git a/cmake/README.md b/cmake/README.md
index c1b953f..8637da6 100644
--- a/cmake/README.md
+++ b/cmake/README.md
@@ -1,326 +1,85 @@
1# Kodi CMake based buildsystem 1![Kodi Logo](../docs/resources/banner_slim.png)
2 2
3This files describes Kodi's CMake based buildsystem. CMake is a cross-platform 3# Kodi's CMake Based Build System
4tool for generating makefiles as well as project files used by IDEs. 4Welcome to Kodi's CMake Based Build System. CMake is a cross-platform tool for generating makefiles as well as project files used by IDEs. The current version of the build system is capable of building and packaging Kodi for the following platforms:
5 5
6The current version of the buildsystem is capable of building and packaging 6* Linux (several distros)
7Kodi for the following platforms: 7* Windows
8* macOS and iOS
9* Android
10* FreeBSD
8 11
9- Linux (GNU Makefiles, Ninja) 12While the legacy build systems typically used in-source builds, it's recommended to use out-of-source builds with CMake. The necessary runtime dependencies such as dlls, skins and configuration files are copied over to the build directory automatically. Instructions are highly dependent on your operating system and target platform but we prepared a set of **[build guides](../docs/README.md)** for your convenience.
10- Windows (NMake Makefiles, Visual Studio 14 (2015), Ninja)
11- macOS and iOS (GNU Makefiles, Xcode, Ninja)
12- Android (GNU Makefiles)
13- FreeBSD (GNU Makefiles)
14 13
15Before building Kodi with CMake, please ensure that you have the platform 14## Build options
16specific dependencies installed. 15Kodi supports a number of build options that can enable or disable functionality. These options must be set when running CMake with `-DENABLE_<OPTION>=<ON|OFF|AUTO`. The default is `AUTO` which enables the option if a certain dependency is found. For example CEC support is enabled if `libCEC` is available. `ON` forcefully enables the dependency and the CMake run will **fail** if the related dependency is not available. `OFF` will disable the feature.
17
18While the legacy build systems typically used in-source builds it's recommended
19to use out-of-source builds with CMake. The necessary runtime dependencies such
20as dlls, skins and configuration files are copied over to the build directory
21automatically.
22
23## Dependency installation
24
25### Linux
26
27The dependencies required to build on Linux can be found in
28[docs/README.xxx](https://github.com/xbmc/xbmc/tree/master/docs).
29
30### Raspberry Pi
31
32The cross compilation environment for the Raspberry Pi as well as the
33dependencies have to be installed as explained in
34[docs/README.raspberrypi](https://github.com/xbmc/xbmc/tree/master/docs/README.raspberrypi).
35
36### Windows
37
38For Windows the dependencies can be found in the
39[Wiki](https://kodi.wiki/view/HOW-TO:Compile_Kodi_for_Windows#Setting_up_the_build_Environment) (Step 1-4). If not already available on your pc, you should
40install the [Windows Software Development Kit (SDK)](https://dev.windows.com/en-us/downloads/sdk-archive) for your Windows version. This is required for HLSL shader offline compiling with the [Effect-Compiler Tool](https://msdn.microsoft.com/de-de/library/windows/desktop/bb232919(v=vs.85).aspx) (fxc.exe).
41
42On Windows, the CMake based buildsystem requires that the binary dependencies
43are downloaded using `download-dependencies.bat` and `download-msys2.bat`
44and that the mingw libs (ffmpeg, libdvd and others) are built using
45`make-mingwlibs.bat`.
46
47### macOS
48
49For macOS the required dependencies can be found in
50[docs/README.osx.md](https://github.com/xbmc/xbmc/tree/master/docs/README.osx.md).
51
52On macOS it is necessary to build the dependencies in `tools/depends` using
53`./bootstrap && ./configure --host=<PLATFORM> && make`. The other steps such
54as `make -C tools/depends/target/xbmc` and `make xcode_depends` are not needed
55as these steps are covered already by the CMake project.
56
57### Android
58
59The dependencies needed to compile for Android can be found in
60[docs/README.android](https://github.com/xbmc/xbmc/tree/master/docs/README.android)
61. All described steps have to be executed (except 5.2 which is replaced by the
62respective CMake command below).
63
64## Building Kodi
65
66This section lists the necessary commands for building Kodi with CMake.
67CMake supports different generators that can be classified into two categories:
68single- and multiconfiguration generators.
69
70A single configuration generator (GNU/NMake Makefiles) generates project files
71for a single build type (e.g. Debug, Release) specified at configure time.
72Multi configuration generators (Visual Studio, Xcode) allow to specify the
73build type at compile time.
74
75All examples below are for out-of-source builds with Kodi checked out to
76`<KODI_SRC>`:
77
78```
79mkdir kodi-build && cd kodi-build
80```
81
82### Linux with GNU Makefiles
83
84```
85cmake <KODI_SRC>
86cmake --build . -- VERBOSE=1 -j$(nproc) # or: make VERBOSE=1 -j$(nproc)
87./kodi.bin
88```
89
90`CMAKE_BUILD_TYPE` defaults to `Release`.
91
92#### Debian package generation
93The buildsystem is capable of generating Debian packages using CPack. To generate them, `CPACK_GENERATOR` has to be set to *DEB*, i.e. executing CMake's configure step with `-DCPACK_GENERATOR=DEB`.
94You should use CMake/CPack 3.6.0 or higher. Lower versions can generate the packages but package names will be mangled.
95
96The following optional variables (which can be passed to buildsystem when executing cmake with the -D`<variable-name>=<value>` format) can be used to manipulate package type, name and version:
97
98- `DEBIAN_PACKAGE_TYPE` controls the name and version of generated packages. Accepted values are `stable`, `unstable` and `nightly` (default is `nightly`).
99- `DEBIAN_PACKAGE_EPOCH` controls package epoch (default is `2`)
100- `DEBIAN_PACKAGE_VERSION` controls package version (default is `0`)
101- `DEBIAN_PACKAGE_REVISION` controls package revision (no default is set)
102
103Packages metadata can be changed simply by editing files present in the `cpack/deb` folder
104A lot more variables are available (see cpack/CPackDebian.cmake file) but you shouldn't mess with them unless you know what you're doing.
105
106Generated packages can be found in <BUILD_DIR>/packages.
107
108### Raspberry Pi with GNU Makefiles
109
110```
111cmake -DCMAKE_TOOLCHAIN_FILE=<KODI_SRC>/tools/depends/target/Toolchain.cmake <KODI_SRC>
112cmake --build . -- VERBOSE=1 -j$(nproc) # or: make VERBOSE=1 -j$(nproc)
113```
114
115### Windows with Visual Studio project files
116These instructions are for Visual Studio 2015. If you want to build for Visal Studio 2017, you need to target `Visual Studio 15` instead of `Visual Studio 14`.
117
118#### Build for win32
119```
120cmake -G "Visual Studio 14" <KODI_SRC>
121cmake --build . --config "Debug" # or: Build solution with Visual Studio
122Debug\kodi.exe
123```
124
125Building on a x64 cpu can be improved, if you're on a cmake version > 3.8:
126```
127cmake -G "Visual Studio 14" -T host=x64 <KODI_SRC>
128cmake --build . --config "Debug" # or: Build solution with Visual Studio
129Debug\kodi.exe
130```
131This will choose the x64 toolset, as windows uses the x32 toolset by default.
132
133#### Build for x64
134```
135cmake -G "Visual Studio 14 Win64" <KODI_SRC>
136cmake --build . --config "Debug" # or: Build solution with Visual Studio
137Debug\kodi.exe
138```
139
140Building on a x64 cpu can be improved, if you're on a cmake version > 3.8:
141```
142cmake -G "Visual Studio 14 Win64" -T host=x64 <KODI_SRC>
143cmake --build . --config "Debug" # or: Build solution with Visual Studio
144Debug\kodi.exe
145```
146This will choose the x64 toolset, as windows uses the x32 toolset by default.
147
148You can always check ``cmake --help` to see which generators are available and how to call those.
149
150#### Windows installer generation
151
152The script [project/Win32BuildSetup](https://github.com/xbmc/xbmc/blob/master/tools/buildsteps/windows/win32/BuildSetup.bat) or [project/Win64BuildSetup](https://github.com/xbmc/xbmc/blob/master/tools/buildsteps/windows/x64/BuildSetup.bat)
153builds an installable package for Windows. Choose either 32bit or 64bit, depending on what your trying to build.
154
155### Windows with NMake Makefiles
156
157```
158cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release <KODI_SRC>
159cmake --build . # or: nmake
160kodi.exe
161```
162
163### macOS with GNU Makefiles
164
165```
166cmake -DCMAKE_TOOLCHAIN_FILE=<KODI_SRC>/tools/depends/target/Toolchain.cmake <KODI_SRC>
167cmake --build . -- VERBOSE=1 -j$(sysctl -n hw.ncpu) # or: make VERBOSE=1 -j$(sysctl -n hw.ncpu)
168./kodi.bin
169```
170
171### macOS with Xcode project files
172
173```
174cmake -DCMAKE_TOOLCHAIN_FILE=<KODI_SRC>/tools/depends/target/Toolchain.cmake -G "Xcode" <KODI_SRC>
175cmake --build . --config "Release" -- -verbose -jobs $(sysctl -n hw.ncpu) # or: Build solution with Xcode
176./Release/kodi.bin
177```
178
179#### macOS installer generation
180
181Afterwards an installable DMG for macOS can be built with the following command:
182
183```
184cmake --build . --config "Release" --target "dmg" # or: make dmg
185```
186
187#### iOS package generation
188
189Consequently an installable DEB for iOS can be built with the following command:
190
191```
192make deb
193```
194
195### Android with GNU Makefiles
196
197```
198cmake -DCMAKE_TOOLCHAIN_FILE=<KODI_SRC>/tools/depends/target/Toolchain.cmake <KODI_SRC>
199cmake --build . -- VERBOSE=1 -j$(nproc) # or: make VERBOSE=1 -j$(nproc)
200```
201
202#### Android package generation
203
204An installable APK for Android can be built with the following command:
205
206```
207make apk
208```
209
210## Options
211
212Kodi supports a number of build options that can enable or disable certain
213functionality.i These options must be set when running CMake with
214`-DENABLE_<OPTION>=<ON|OFF|AUTO`. The default is `AUTO` which enables
215the option if a certain dependency is found. For example CEC support is
216enabled if libCEC is available. `ON` forcefully enables the dependency
217and the CMake run will fail if the related dependency is not available.
218This is mostly useful for packagers. `OFF` will disable the feature.
219 16
220Example for forcefully enabling VAAPI and disabling VDPAU: 17Example for forcefully enabling VAAPI and disabling VDPAU:
221
222``` 18```
223cmake ... -DENABLE_VAAPI=ON -DENABLE_VDPAU=OFF ... 19cmake ... -DENABLE_VAAPI=ON -DENABLE_VDPAU=OFF ...
224``` 20```
225 21
226Example for building with external FFMPEG: 22Unfortunately, Kodi's CMake gazillion options are not fully documented yet. For more information and an updated list of options, please check the main **[CMakeLists.txt](../CMakeLists.txt)**.
227
228```
229cmake ... -DFFMPEG_PATH=/opt/ffmpeg -DENABLE_INTERNAL_FFMPEG=OFF ...
230```
231
232For more information and an updated list of option, please check the
233main [CMakeLists.txt](https://github.com/xbmc/xbmc/tree/master/CMakeLists.txt).
234 23
235## Tests 24## Tests
25Kodi uses Google Test as its testing framework. Each test file is scanned for tests and these are added to CTest, which is the native test driver for CMake.
236 26
237Kodi uses Google Test as its testing framework. Each test file is scanned for tests and these 27This scanning happens at configuration time. If tests depend on generated support files which should not be scanned, then those support files should be added to the `SUPPORT_SOURCES` variable as opposed to `SOURCES` before calling `core_add_test`. You might want to do this where the generated support files would not exist at configure time, or if they are so large that scanning them would take up an unreasonable amount of configure time.
238are added to CTest, which is the native test driver for CMake.
239
240This scanning happens at configuration time. If tests depend on generated support files which
241should not be scanned, then those support files should be added to the SUPPORT_SOURCES
242variable as opposed to SOURCES before calling core_add_test. You might want to do this where
243the generated support files would not exist at configure time, or if they are so large that
244scanning them would take up an unreasonable amount of configure time.
245 28
246## Extra targets 29## Extra targets
30When using makefile builds, a few extra targets are defined:
247 31
248When using the makefile builds a few extra targets are defined: 32* `make check` builds and executes the test suite.
249 33* `make check-valgrind` builds and executes the test suite with valgrind memcheck.
250- `make check` builds and executes the test suite. 34* `make doc` builds the Doxygen documentation.
251- `make check-valgrind` builds and executes the test suite with valgrind memcheck.
252- `make doc` builds the Doxygen documentation.
253 35
254Code coverage (with Gcov, LCOV and Gcovr) can be built on Linux: 36Code coverage (with Gcov, LCOV and Gcovr) can be built on Linux:
255 37
256- CMake has to be executed with `-DCMAKE_BUILD_TYPE=Coverage` 38* CMake has to be executed with `-DCMAKE_BUILD_TYPE=Coverage`.
257- `make coverage` generates an HTML code coverage report. 39* `make coverage` generates an HTML code coverage report.
258- `make coverage_xml` generates an XML code coverage report. 40* `make coverage_xml` generates an XML code coverage report.
259 41
260## Building binary addons 42## Building binary addons
43Kodi's CMake build system integrates with the add-on build system if the GNU Makefile generator is used. This offers an easy way to build add-ons for packagers or Kodi developers who don't work on add-ons.
261 44
262The CMake build system integrates with the addon build system if the GNU 45Build all add-ons:
263Makefile generator is used. This offers an easy way to build addons for
264packagers or Kodi developers who don't work on addons.
265
266``` 46```
267make binary-addons 47make binary-addons
268``` 48```
269 49
270Specific addons can be built with: 50Build specific add-ons:
271
272``` 51```
273make binary-addons ADDONS="visualization.spectrum pvr.demo" 52make binary-addons ADDONS="visualization.spectrum pvr.demo"
274``` 53```
275 54
276Addon developers can build single addons into the Kodi build directory 55Add-on developers can build single add-ons into the Kodi build directory so that the add-on can be tested with self-compiled specific versions of Kodi.
277so that the addon can be tested with self-compiled specific versions of Kodi.
278
279``` 56```
280mkdir pvr.demo-build && cd pvr.demo-build 57mkdir pvr.demo-build
58cd pvr.demo-build
281cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=<KODI_BUILD_DIR>/build -DKODI_BUILD_DIR=<KODI_BUILD_DIR> <pvr.demo-SRC> 59cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=<KODI_BUILD_DIR>/build -DKODI_BUILD_DIR=<KODI_BUILD_DIR> <pvr.demo-SRC>
282make 60make
283``` 61```
284 62
285It is recommended to specify the directories as absolute paths. If relative 63It is recommended to specify the directories as absolute paths. If relative paths are used, they are considered relative to the build directory in which `cmake` was executed (the current working directory).
286paths are used, they are considered relative to the build directory in which
287`cmake` was executed (aka the current working working directory).
288 64
289Both methods work only for already existing addons. See this 65Both methods work only for already existing add-ons. See this **[forum thread](https://forum.kodi.tv/showthread.php?tid=219166&pid=1934922)** and add-ons **[README](cmake/addons/README.md)**
290[forum thread](http://forum.kodi.tv/showthread.php?tid=219166&pid=1934922#pid1934922) 66for add-on development and detailed documentation about the add-on build system.
291and [addons/README.md](https://github.com/xbmc/xbmc/blob/master/cmake/addons/README.md)
292for addon development and detailed documentation about the addon build system.
293 67
294## Sanitizers 68## Sanitizers
69Clang and GCC support different kinds of sanitizers. To enable a sanitizer, call CMake with the option `-DECM_ENABLE_SANITIZERS=’san1;san2;...'`. For more information about enabling the
70sanitizers, read the module **[documentation](modules/extra/ECMEnableSanitizers.cmake)**.
295 71
296Clang and GCC support different kinds of Sanitizers. To enable a Sanitizer call CMake with the 72It is also recommended to read the sections about sanitizers in the [Clang documentation](http://clang.llvm.org/docs/).
297option `-DECM_ENABLE_SANITIZERS=’san1;san2;...'`. For more information about enabling the
298Sanitizers read the documentation in
299[modules/extra/ECMEnableSanitizers.cmake](https://github.com/xbmc/xbmc/tree/master/cmake/modules/extra/ECMEnableSanitizers.cmake).
300
301It is also recommended to read the sections about the Sanitizers in the [Clang
302documentation](http://clang.llvm.org/docs/).
303 73
304## Debugging the build 74## Debugging the build
75In order to see the exact compiler commands `make` and `nmake` can be executed with a `VERBOSE=1` parameter.
305 76
306This section covers some tips that can be useful for debugging a CMake 77On Windows, this is unfortunately not enough because `nmake` uses temporary files to workaround `nmake`'s command string length limitations.
307based build. 78In order to see verbose output the file **[Modules/Platform/Windows.cmake](https://github.com/Kitware/CMake/blob/master/Modules/Platform/Windows.cmake#L40)** in the local CMake installation has to be adapted by uncommenting these lines:
308
309### Verbosity (show compiler and linker parameters)
310
311In order to see the exact compiler commands `make` and `nmake` can be
312executed with a `VERBOSE=1` parameter.
313
314On Windows, this is unfortunately not enough because `nmake` uses
315temporary files to workaround `nmake`'s command string length limitations.
316In order to see verbose output the file
317[Modules/Platform/Windows.cmake](https://github.com/Kitware/CMake/blob/master/Modules/Platform/Windows.cmake#L40)
318in the local CMake installation has to be adapted by uncommenting these
319lines:
320
321``` 79```
322# uncomment these out to debug nmake and borland makefiles 80# uncomment these out to debug nmake and borland makefiles
323#set(CMAKE_START_TEMP_FILE "") 81#set(CMAKE_START_TEMP_FILE "")
324#set(CMAKE_END_TEMP_FILE "") 82#set(CMAKE_END_TEMP_FILE "")
325#set(CMAKE_VERBOSE_MAKEFILE 1) 83#set(CMAKE_VERBOSE_MAKEFILE 1)
326``` 84```
85
diff --git a/cmake/addons/CMakeLists.txt b/cmake/addons/CMakeLists.txt
index 5db5dba..5fc798b 100644
--- a/cmake/addons/CMakeLists.txt
+++ b/cmake/addons/CMakeLists.txt
@@ -1,4 +1,4 @@
1cmake_minimum_required(VERSION 3.3) 1cmake_minimum_required(VERSION 3.5)
2project(kodi-addons) 2project(kodi-addons)
3 3
4list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}) 4list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})
diff --git a/cmake/addons/README.md b/cmake/addons/README.md
index 6470ee1..e04c834 100644
--- a/cmake/addons/README.md
+++ b/cmake/addons/README.md
@@ -5,7 +5,7 @@ This directory contains the cmake-based buildsystem for Kodi add-ons. It looks i
5 - `<addon-id> <git-url> <git-revision>` 5 - `<addon-id> <git-url> <git-revision>`
6 - `<addon-id> <tarball-url>` 6 - `<addon-id> <tarball-url>`
7 - `<addon-id> <file://path>` 7 - `<addon-id> <file://path>`
8 8
9where 9where
10- `<addon-id>` must be identical to the add-on's ID as defined in the add-on's addon.xml 10- `<addon-id>` must be identical to the add-on's ID as defined in the add-on's addon.xml
11- `<git-url>` must be the URL of the git repository containing the add-on 11- `<git-url>` must be the URL of the git repository containing the add-on
diff --git a/cmake/addons/depends/common/tinyxml/tinyxml.sha256 b/cmake/addons/depends/common/tinyxml/tinyxml.sha256
new file mode 100644
index 0000000..78c07c8
--- /dev/null
+++ b/cmake/addons/depends/common/tinyxml/tinyxml.sha256
@@ -0,0 +1 @@
8164c9ad48b9028667768a584d62f7760cfbfb90d0dd6214ad174403058da10c
diff --git a/cmake/cpack/deb/copyright b/cmake/cpack/deb/copyright
index ba82f18..3033afd 100644
--- a/cmake/cpack/deb/copyright
+++ b/cmake/cpack/deb/copyright
@@ -1920,14 +1920,6 @@ Crystal HD
1920 You should have received a copy of the GNU General Public License 1920 You should have received a copy of the GNU General Public License
1921 along with this driver. If not, see <http://www.gnu.org/licenses/>. 1921 along with this driver. If not, see <http://www.gnu.org/licenses/>.
1922 1922
1923OpenSSH
1924<http://www.openssh.org/>
1925
1926 Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
1927 All rights reserved.
1928
1929 See the section 'License: OpenSSH' for full license terms.
1930
1931Enca - Extremely Naive Charset Analyser 1923Enca - Extremely Naive Charset Analyser
1932<http://freshmeat.net/projects/enca/> 1924<http://freshmeat.net/projects/enca/>
1933 1925
@@ -2916,211 +2908,3 @@ We are required to state that
2916 CompuServe Incorporated." 2908 CompuServe Incorporated."
2917 2909
2918-- End of IJG License -- 2910-- End of IJG License --
2919
2920License: OpenSSH
2921
2922This file is part of the OpenSSH software.
2923
2924The licences which components of this software fall under are as
2925follows. First, we will summarize and say that all components
2926are under a BSD licence, or a licence more free than that.
2927
2928OpenSSH contains no GPL code.
2929
29301)
2931 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
2932 * All rights reserved
2933 *
2934 * As far as I am concerned, the code I have written for this software
2935 * can be used freely for any purpose. Any derived versions of this
2936 * software must be clearly marked as such, and if the derived work is
2937 * incompatible with the protocol description in the RFC file, it must be
2938 * called by a name other than "ssh" or "Secure Shell".
2939
2940 [Tatu continues]
2941 * However, I am not implying to give any licenses to any patents or
2942 * copyrights held by third parties, and the software includes parts that
2943 * are not under my direct control. As far as I know, all included
2944 * source code is used in accordance with the relevant license agreements
2945 * and can be used freely for any purpose (the GNU license being the most
2946 * restrictive); see below for details.
2947
2948 [However, none of that term is relevant at this point in time. All of
2949 these restrictively licenced software components which he talks about
2950 have been removed from OpenSSH, i.e.,
2951
2952 - RSA is no longer included, found in the OpenSSL library
2953 - IDEA is no longer included, its use is deprecated
2954 - DES is now external, in the OpenSSL library
2955 - GMP is no longer used, and instead we call BN code from OpenSSL
2956 - Zlib is now external, in a library
2957 - The make-ssh-known-hosts script is no longer included
2958 - TSS has been removed
2959 - MD5 is now external, in the OpenSSL library
2960 - RC4 support has been replaced with ARC4 support from OpenSSL
2961 - Blowfish is now external, in the OpenSSL library
2962
2963 [The licence continues]
2964
2965 Note that any information and cryptographic algorithms used in this
2966 software are publicly available on the Internet and at any major
2967 bookstore, scientific library, and patent office worldwide. More
2968 information can be found e.g. at "http://www.cs.hut.fi/crypto".
2969
2970 The legal status of this program is some combination of all these
2971 permissions and restrictions. Use only at your own responsibility.
2972 You will be responsible for any legal consequences yourself; I am not
2973 making any claims whether possessing or using this is legal or not in
2974 your country, and I am not taking any responsibility on your behalf.
2975
2976
2977 NO WARRANTY
2978
2979 BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
2980 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
2981 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
2982 PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
2983 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
2984 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
2985 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
2986 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
2987 REPAIR OR CORRECTION.
2988
2989 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
2990 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
2991 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
2992 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
2993 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
2994 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
2995 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
2996 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
2997 POSSIBILITY OF SUCH DAMAGES.
2998
29992)
3000 The 32-bit CRC compensation attack detector in deattack.c was
3001 contributed by CORE SDI S.A. under a BSD-style license.
3002
3003 * Cryptographic attack detector for ssh - source code
3004 *
3005 * Copyright (c) 1998 CORE SDI S.A., Buenos Aires, Argentina.
3006 *
3007 * All rights reserved. Redistribution and use in source and binary
3008 * forms, with or without modification, are permitted provided that
3009 * this copyright notice is retained.
3010 *
3011 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
3012 * WARRANTIES ARE DISCLAIMED. IN NO EVENT SHALL CORE SDI S.A. BE
3013 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR
3014 * CONSEQUENTIAL DAMAGES RESULTING FROM THE USE OR MISUSE OF THIS
3015 * SOFTWARE.
3016 *
3017 * Ariel Futoransky <futo@core-sdi.com>
3018 * <http://www.core-sdi.com>
3019
30203)
3021 ssh-keyscan was contributed by David Mazieres under a BSD-style
3022 license.
3023
3024 * Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>.
3025 *
3026 * Modification and redistribution in source and binary forms is
3027 * permitted provided that due credit is given to the author and the
3028 * OpenBSD project by leaving this copyright notice intact.
3029
30304)
3031 The Rijndael implementation by Vincent Rijmen, Antoon Bosselaers
3032 and Paulo Barreto is in the public domain and distributed
3033 with the following license:
3034
3035 * @version 3.0 (December 2000)
3036 *
3037 * Optimised ANSI C code for the Rijndael cipher (now AES)
3038 *
3039 * @author Vincent Rijmen <vincent.rijmen@esat.kuleuven.ac.be>
3040 * @author Antoon Bosselaers <antoon.bosselaers@esat.kuleuven.ac.be>
3041 * @author Paulo Barreto <paulo.barreto@terra.com.br>
3042 *
3043 * This code is hereby placed in the public domain.
3044 *
3045 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS
3046 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3047 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
3048 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
3049 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
3050 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
3051 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
3052 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
3053 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
3054 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
3055 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3056
30575)
3058 One component of the ssh source code is under a 3-clause BSD license,
3059 held by the University of California, since we pulled these parts from
3060 original Berkeley code.
3061
3062 * Copyright (c) 1983, 1990, 1992, 1993, 1995
3063 * The Regents of the University of California. All rights reserved.
3064 *
3065 * Redistribution and use in source and binary forms, with or without
3066 * modification, are permitted provided that the following conditions
3067 * are met:
3068 * 1. Redistributions of source code must retain the above copyright
3069 * notice, this list of conditions and the following disclaimer.
3070 * 2. Redistributions in binary form must reproduce the above copyright
3071 * notice, this list of conditions and the following disclaimer in the
3072 * documentation and/or other materials provided with the distribution.
3073 * 3. Neither the name of the University nor the names of its contributors
3074 * may be used to endorse or promote products derived from this software
3075 * without specific prior written permission.
3076 *
3077 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
3078 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
3079 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
3080 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
3081 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
3082 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
3083 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
3084 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
3085 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
3086 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
3087 * THE POSSIBILITY OF SUCH DAMAGE.
3088
30896)
3090 Remaining components of the software are provided under a standard
3091 2-term BSD licence with the following names as copyright holders:
3092
3093 Markus Friedl
3094 Theo de Raadt
3095 Niels Provos
3096 Dug Song
3097 Aaron Campbell
3098 Damien Miller
3099 Kevin Steves
3100 Daniel Kouril
3101 Wesley Griffin
3102 Per Allansson
3103 Nils Nordman
3104 Simon Wilkinson
3105
3106 * Redistribution and use in source and binary forms, with or without
3107 * modification, are permitted provided that the following conditions
3108 * are met:
3109 * 1. Redistributions of source code must retain the above copyright
3110 * notice, this list of conditions and the following disclaimer.
3111 * 2. Redistributions in binary form must reproduce the above copyright
3112 * notice, this list of conditions and the following disclaimer in the
3113 * documentation and/or other materials provided with the distribution.
3114 *
3115 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
3116 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
3117 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
3118 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
3119 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
3120 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3121 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3122 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3123 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
3124 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3125
3126-- End of OpenSSH License --
diff --git a/cmake/cpack/deb/packages/kodi-bin.txt.in b/cmake/cpack/deb/packages/kodi-bin.txt.in
index 2ece66f..0e31451 100644
--- a/cmake/cpack/deb/packages/kodi-bin.txt.in
+++ b/cmake/cpack/deb/packages/kodi-bin.txt.in
@@ -15,7 +15,7 @@ PACKAGE_ARCHITECTURE
15PACKAGE_SECTION video 15PACKAGE_SECTION video
16PACKAGE_PRIORITY optional 16PACKAGE_PRIORITY optional
17PACKAGE_SHLIBDEPS ON 17PACKAGE_SHLIBDEPS ON
18PACKAGE_DEPENDS 18PACKAGE_DEPENDS
19PACKAGE_RECOMMENDS 19PACKAGE_RECOMMENDS
20PACKAGE_SUGGESTS 20PACKAGE_SUGGESTS
21PACKAGE_BREAKS xbmc-bin (<< 2:14.0~git20141019), xbmc-common 21PACKAGE_BREAKS xbmc-bin (<< 2:14.0~git20141019), xbmc-common
diff --git a/cmake/cpack/deb/packages/kodi-tools-texturepacker.txt.in b/cmake/cpack/deb/packages/kodi-tools-texturepacker.txt.in
index 36e8297..79c1f0f 100644
--- a/cmake/cpack/deb/packages/kodi-tools-texturepacker.txt.in
+++ b/cmake/cpack/deb/packages/kodi-tools-texturepacker.txt.in
@@ -15,7 +15,7 @@ PACKAGE_ARCHITECTURE
15PACKAGE_SECTION video 15PACKAGE_SECTION video
16PACKAGE_PRIORITY optional 16PACKAGE_PRIORITY optional
17PACKAGE_SHLIBDEPS ON 17PACKAGE_SHLIBDEPS ON
18PACKAGE_DEPENDS 18PACKAGE_DEPENDS
19PACKAGE_RECOMMENDS 19PACKAGE_RECOMMENDS
20PACKAGE_SUGGESTS 20PACKAGE_SUGGESTS
21PACKAGE_BREAKS 21PACKAGE_BREAKS
diff --git a/cmake/cpack/deb/packages/kodi.txt.in b/cmake/cpack/deb/packages/kodi.txt.in
index 90ae9ea..5ab8905 100644
--- a/cmake/cpack/deb/packages/kodi.txt.in
+++ b/cmake/cpack/deb/packages/kodi.txt.in
@@ -15,7 +15,7 @@ PACKAGE_ARCHITECTURE all
15PACKAGE_SECTION video 15PACKAGE_SECTION video
16PACKAGE_PRIORITY optional 16PACKAGE_PRIORITY optional
17PACKAGE_SHLIBDEPS 17PACKAGE_SHLIBDEPS
18PACKAGE_DEPENDS @APP_NAME_LC@-bin (>= @CPACK_DEBIAN_PACKAGE_VERSION@), @APP_NAME_LC@-bin (<< @CPACK_DEBIAN_PACKAGE_VERSION@.1~), curl, libcurl4 | libcurl3, mesa-utils, x11-utils, fonts-liberation | ttf-liberation, fonts-dejavu-core | ttf-dejavu-core, python-bluez | python-lightblue, python-imaging | python-pil, python-simplejson, libass9 | libass5 | libass4, libgif5 | libgif7, libssh-4 | libssh2-1, libnfs8 | libnfs4 | libnfs1, libbluray1 | libbluray2, libshairplay0, libvorbisfile3, libaacs0, libcec4, libgnutls30 | libgnutls-deb0-28 | libgnutls28 | libgnutls26, libxslt1.1, libyajl2 18PACKAGE_DEPENDS @APP_NAME_LC@-bin (>= @CPACK_DEBIAN_PACKAGE_VERSION@), @APP_NAME_LC@-bin (<< @CPACK_DEBIAN_PACKAGE_VERSION@.1~), curl, libcurl4 | libcurl3, mesa-utils, x11-utils, fonts-liberation | ttf-liberation, fonts-dejavu-core | ttf-dejavu-core, python-bluez | python-lightblue, python-imaging | python-pil, python-simplejson, libass9 | libass5 | libass4, libgif5 | libgif7, libnfs8 | libnfs4 | libnfs1, libbluray1 | libbluray2, libshairplay0, libvorbisfile3, libaacs0, libcec4, libgnutls30 | libgnutls-deb0-28 | libgnutls28 | libgnutls26, libxslt1.1, libyajl2
19PACKAGE_RECOMMENDS libvdpau1, libva-intel-vaapi-driver, libva1 19PACKAGE_RECOMMENDS libvdpau1, libva-intel-vaapi-driver, libva1
20PACKAGE_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 20PACKAGE_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
21PACKAGE_BREAKS xbmc (<< 2:14.0~git20141019), xbmc-data, xbmc-standalone 21PACKAGE_BREAKS xbmc (<< 2:14.0~git20141019), xbmc-data, xbmc-standalone
diff --git a/cmake/installdata/ios/certificates.txt b/cmake/installdata/common/certificates.txt
index 14e74a7..14e74a7 100644
--- a/cmake/installdata/ios/certificates.txt
+++ b/cmake/installdata/common/certificates.txt
diff --git a/cmake/installdata/ios/packaging.txt b/cmake/installdata/ios/packaging.txt
index ce990b5..3d5ae4a 100644
--- a/cmake/installdata/ios/packaging.txt
+++ b/cmake/installdata/ios/packaging.txt
@@ -1,3 +1,3 @@
1LICENSE.gpl 1LICENSE.md
2privacy-policy.txt 2privacy-policy.txt
3xbmc/platform/darwin/Credits.html 3xbmc/platform/darwin/Credits.html
diff --git a/cmake/installdata/osx/certificates.txt b/cmake/installdata/osx/certificates.txt
deleted file mode 100644
index 14e74a7..0000000
--- a/cmake/installdata/osx/certificates.txt
+++ /dev/null
@@ -1 +0,0 @@
1tools/depends/target/openssl/cacert.pem system/certs \ No newline at end of file
diff --git a/cmake/installdata/osx/packaging.txt b/cmake/installdata/osx/packaging.txt
index f869e4c..f9ae368 100644
--- a/cmake/installdata/osx/packaging.txt
+++ b/cmake/installdata/osx/packaging.txt
@@ -1,4 +1,4 @@
1LICENSE.gpl 1LICENSE.md
2privacy-policy.txt 2privacy-policy.txt
3xbmc/platform/darwin/Credits.html 3xbmc/platform/darwin/Credits.html
4tools/darwin/packaging/media/osx/icon.iconset/* 4tools/darwin/packaging/media/osx/icon.iconset/*
diff --git a/cmake/installdata/windowsstore/certificates.txt b/cmake/installdata/windowsstore/certificates.txt
deleted file mode 100644
index 14e74a7..0000000
--- a/cmake/installdata/windowsstore/certificates.txt
+++ /dev/null
@@ -1 +0,0 @@
1tools/depends/target/openssl/cacert.pem system/certs \ No newline at end of file
diff --git a/cmake/messages/flatbuffers/retroplayer.txt b/cmake/messages/flatbuffers/retroplayer.txt
new file mode 100644
index 0000000..3d42d5c
--- /dev/null
+++ b/cmake/messages/flatbuffers/retroplayer.txt
@@ -0,0 +1 @@
xbmc/cores/RetroPlayer/messages cores/RetroPlayer/messages
diff --git a/cmake/modules/FindAML.cmake b/cmake/modules/FindAML.cmake
index 602f5d9..89d1fd9 100644
--- a/cmake/modules/FindAML.cmake
+++ b/cmake/modules/FindAML.cmake
@@ -3,7 +3,7 @@
3# ------- 3# -------
4# Finds the AML codec 4# Finds the AML codec
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# AML_FOUND - system has AML 8# AML_FOUND - system has AML
9# AML_INCLUDE_DIRS - the AML include directory 9# AML_INCLUDE_DIRS - the AML include directory
diff --git a/cmake/modules/FindASS.cmake b/cmake/modules/FindASS.cmake
index 2d592fa..cb9d732 100644
--- a/cmake/modules/FindASS.cmake
+++ b/cmake/modules/FindASS.cmake
@@ -3,7 +3,7 @@
3# ------- 3# -------
4# Finds the ASS library 4# Finds the ASS library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# ASS_FOUND - system has ASS 8# ASS_FOUND - system has ASS
9# ASS_INCLUDE_DIRS - the ASS include directory 9# ASS_INCLUDE_DIRS - the ASS include directory
diff --git a/cmake/modules/FindAlsa.cmake b/cmake/modules/FindAlsa.cmake
index ae05817..fdc7db8 100644
--- a/cmake/modules/FindAlsa.cmake
+++ b/cmake/modules/FindAlsa.cmake
@@ -3,7 +3,7 @@
3# -------- 3# --------
4# Finds the Alsa library 4# Finds the Alsa library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# ALSA_FOUND - system has Alsa 8# ALSA_FOUND - system has Alsa
9# ALSA_INCLUDE_DIRS - the Alsa include directory 9# ALSA_INCLUDE_DIRS - the Alsa include directory
diff --git a/cmake/modules/FindAvahi.cmake b/cmake/modules/FindAvahi.cmake
index 068b292..e0e6689 100644
--- a/cmake/modules/FindAvahi.cmake
+++ b/cmake/modules/FindAvahi.cmake
@@ -3,7 +3,7 @@
3# --------- 3# ---------
4# Finds the avahi library 4# Finds the avahi library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# AVAHI_FOUND - system has avahi 8# AVAHI_FOUND - system has avahi
9# AVAHI_INCLUDE_DIRS - the avahi include directory 9# AVAHI_INCLUDE_DIRS - the avahi include directory
diff --git a/cmake/modules/FindBluetooth.cmake b/cmake/modules/FindBluetooth.cmake
index a69980d..7ca99bb 100644
--- a/cmake/modules/FindBluetooth.cmake
+++ b/cmake/modules/FindBluetooth.cmake
@@ -3,7 +3,7 @@
3# --------- 3# ---------
4# Finds the Bluetooth library 4# Finds the Bluetooth library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# BLUETOOTH_FOUND - system has Bluetooth 8# BLUETOOTH_FOUND - system has Bluetooth
9# BLUETOOTH_INCLUDE_DIRS - the Bluetooth include directory 9# BLUETOOTH_INCLUDE_DIRS - the Bluetooth include directory
diff --git a/cmake/modules/FindBluray.cmake b/cmake/modules/FindBluray.cmake
index 3c29f54..58a9a91 100644
--- a/cmake/modules/FindBluray.cmake
+++ b/cmake/modules/FindBluray.cmake
@@ -3,7 +3,7 @@
3# ---------- 3# ----------
4# Finds the libbluray library 4# Finds the libbluray library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# BLURAY_FOUND - system has libbluray 8# BLURAY_FOUND - system has libbluray
9# BLURAY_INCLUDE_DIRS - the libbluray include directory 9# BLURAY_INCLUDE_DIRS - the libbluray include directory
@@ -30,20 +30,13 @@ if(NOT BLURAY_VERSION AND EXISTS ${BLURAY_INCLUDE_DIR}/libbluray/bluray-version.
30 unset(_bluray_version_str) 30 unset(_bluray_version_str)
31endif() 31endif()
32 32
33include(FindPackageHandleStandardArgs) 33find_library(BLURAY_LIBRARY NAMES bluray libbluray
34if(NOT WIN32) 34 PATHS ${PC_BLURAY_LIBDIR})
35 find_library(BLURAY_LIBRARY NAMES bluray
36 PATHS ${PC_BLURAY_LIBDIR})
37 35
38 find_package_handle_standard_args(Bluray 36include(FindPackageHandleStandardArgs)
39 REQUIRED_VARS BLURAY_LIBRARY BLURAY_INCLUDE_DIR BLURAY_VERSION 37find_package_handle_standard_args(Bluray
40 VERSION_VAR BLURAY_VERSION) 38 REQUIRED_VARS BLURAY_LIBRARY BLURAY_INCLUDE_DIR BLURAY_VERSION
41else() 39 VERSION_VAR BLURAY_VERSION)
42 # Dynamically loaded DLL
43 find_package_handle_standard_args(Bluray
44 REQUIRED_VARS BLURAY_INCLUDE_DIR
45 VERSION_VAR BLURAY_VERSION)
46endif()
47 40
48if(BLURAY_FOUND) 41if(BLURAY_FOUND)
49 set(BLURAY_LIBRARIES ${BLURAY_LIBRARY}) 42 set(BLURAY_LIBRARIES ${BLURAY_LIBRARY})
diff --git a/cmake/modules/FindCEC.cmake b/cmake/modules/FindCEC.cmake
index bd6fd1d..00b2e12 100644
--- a/cmake/modules/FindCEC.cmake
+++ b/cmake/modules/FindCEC.cmake
@@ -3,7 +3,7 @@
3# ------- 3# -------
4# Finds the libCEC library 4# Finds the libCEC library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# CEC_FOUND - system has libCEC 8# CEC_FOUND - system has libCEC
9# CEC_INCLUDE_DIRS - the libCEC include directory 9# CEC_INCLUDE_DIRS - the libCEC include directory
@@ -33,20 +33,13 @@ if(NOT CEC_FIND_VERSION)
33 set(CEC_FIND_VERSION 4.0.0) 33 set(CEC_FIND_VERSION 4.0.0)
34endif() 34endif()
35 35
36include(FindPackageHandleStandardArgs) 36find_library(CEC_LIBRARY NAMES cec
37if(NOT WIN32) 37 PATHS ${PC_CEC_LIBDIR})
38 find_library(CEC_LIBRARY NAMES cec
39 PATHS ${PC_CEC_LIBDIR})
40 38
41 find_package_handle_standard_args(CEC 39include(FindPackageHandleStandardArgs)
42 REQUIRED_VARS CEC_LIBRARY CEC_INCLUDE_DIR 40find_package_handle_standard_args(CEC
43 VERSION_VAR CEC_VERSION) 41 REQUIRED_VARS CEC_LIBRARY CEC_INCLUDE_DIR
44else() 42 VERSION_VAR CEC_VERSION)
45 # Dynamically loaded DLL
46 find_package_handle_standard_args(CEC
47 REQUIRED_VARS CEC_INCLUDE_DIR
48 VERSION_VAR CEC_VERSION)
49endif()
50 43
51if(CEC_FOUND) 44if(CEC_FOUND)
52 set(CEC_LIBRARIES ${CEC_LIBRARY}) 45 set(CEC_LIBRARIES ${CEC_LIBRARY})
diff --git a/cmake/modules/FindCWiid.cmake b/cmake/modules/FindCWiid.cmake
index 88cfbef..af9e391 100644
--- a/cmake/modules/FindCWiid.cmake
+++ b/cmake/modules/FindCWiid.cmake
@@ -3,7 +3,7 @@
3# --------- 3# ---------
4# Finds the CWiid library 4# Finds the CWiid library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# CWIID_FOUND - system has CWiid 8# CWIID_FOUND - system has CWiid
9# CWIID_INCLUDE_DIRS - the CWiid include directory 9# CWIID_INCLUDE_DIRS - the CWiid include directory
diff --git a/cmake/modules/FindCdio.cmake b/cmake/modules/FindCdio.cmake
index cce7f2a..91ba7bc 100644
--- a/cmake/modules/FindCdio.cmake
+++ b/cmake/modules/FindCdio.cmake
@@ -3,7 +3,7 @@
3# -------- 3# --------
4# Finds the cdio library 4# Finds the cdio library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# CDIO_FOUND - system has cdio 8# CDIO_FOUND - system has cdio
9# CDIO_INCLUDE_DIRS - the cdio include directory 9# CDIO_INCLUDE_DIRS - the cdio include directory
diff --git a/cmake/modules/FindCurl.cmake b/cmake/modules/FindCurl.cmake
index 17c1f01..6ccf44a 100644
--- a/cmake/modules/FindCurl.cmake
+++ b/cmake/modules/FindCurl.cmake
@@ -3,7 +3,7 @@
3# -------- 3# --------
4# Finds the Curl library 4# Finds the Curl library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# CURL_FOUND - system has Curl 8# CURL_FOUND - system has Curl
9# CURL_INCLUDE_DIRS - the Curl include directory 9# CURL_INCLUDE_DIRS - the Curl include directory
diff --git a/cmake/modules/FindDBus.cmake b/cmake/modules/FindDBus.cmake
index 9ea4f8f..df3edc5 100644
--- a/cmake/modules/FindDBus.cmake
+++ b/cmake/modules/FindDBus.cmake
@@ -3,7 +3,7 @@
3# ------- 3# -------
4# Finds the DBUS library 4# Finds the DBUS library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# DBUS_FOUND - system has DBUS 8# DBUS_FOUND - system has DBUS
9# DBUS_INCLUDE_DIRS - the DBUS include directory 9# DBUS_INCLUDE_DIRS - the DBUS include directory
diff --git a/cmake/modules/FindEGL.cmake b/cmake/modules/FindEGL.cmake
index 331ac39..0b73eb8 100644
--- a/cmake/modules/FindEGL.cmake
+++ b/cmake/modules/FindEGL.cmake
@@ -3,7 +3,7 @@
3# ------- 3# -------
4# Finds the EGL library 4# Finds the EGL library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# EGL_FOUND - system has EGL 8# EGL_FOUND - system has EGL
9# EGL_INCLUDE_DIRS - the EGL include directory 9# EGL_INCLUDE_DIRS - the EGL include directory
diff --git a/cmake/modules/FindFFMPEG.cmake b/cmake/modules/FindFFMPEG.cmake
index e2fbe8d..ef74671 100644
--- a/cmake/modules/FindFFMPEG.cmake
+++ b/cmake/modules/FindFFMPEG.cmake
@@ -18,7 +18,7 @@
18# usage: -DWITH_FFMPEG=/path/to/ffmpeg_install_prefix 18# usage: -DWITH_FFMPEG=/path/to/ffmpeg_install_prefix
19# 19#
20# -------- 20# --------
21# This module will will define the following variables: 21# This module will define the following variables:
22# 22#
23# FFMPEG_FOUND - system has FFmpeg 23# FFMPEG_FOUND - system has FFmpeg
24# FFMPEG_INCLUDE_DIRS - FFmpeg include directory 24# FFMPEG_INCLUDE_DIRS - FFmpeg include directory
@@ -33,14 +33,14 @@
33# 33#
34 34
35# required ffmpeg library versions 35# required ffmpeg library versions
36set(REQUIRED_FFMPEG_VERSION 3.4) 36set(REQUIRED_FFMPEG_VERSION 4.0)
37set(_avcodec_ver ">=57.107.100") 37set(_avcodec_ver ">=58.18.100")
38set(_avfilter_ver ">=6.107.100") 38set(_avfilter_ver ">=7.16.100")
39set(_avformat_ver ">=57.83.100") 39set(_avformat_ver ">=58.12.100")
40set(_avutil_ver ">=55.78.100") 40set(_avutil_ver ">=56.14.100")
41set(_swscale_ver ">=4.8.100") 41set(_swscale_ver ">=5.1.100")
42set(_swresample_ver ">=2.9.100") 42set(_swresample_ver ">=3.1.100")
43set(_postproc_ver ">=54.7.100") 43set(_postproc_ver ">=55.1.100")
44 44
45 45
46# Allows building with external ffmpeg not found in system paths, 46# Allows building with external ffmpeg not found in system paths,
@@ -229,6 +229,11 @@ if(NOT FFMPEG_FOUND)
229 message(STATUS "FFMPEG_URL: ${FFMPEG_URL}") 229 message(STATUS "FFMPEG_URL: ${FFMPEG_URL}")
230 endif() 230 endif()
231 231
232 set(FFMPEG_OPTIONS -DENABLE_CCACHE=${ENABLE_CCACHE}
233 -DCCACHE_PROGRAM=${CCACHE_PROGRAM}
234 -DENABLE_VAAPI=${ENABLE_VAAPI}
235 -DENABLE_VDPAU=${ENABLE_VDPAU})
236
232 if(KODI_DEPENDSBUILD) 237 if(KODI_DEPENDSBUILD)
233 set(CROSS_ARGS -DDEPENDS_PATH=${DEPENDS_PATH} 238 set(CROSS_ARGS -DDEPENDS_PATH=${DEPENDS_PATH}
234 -DPKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE} 239 -DPKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}
@@ -237,6 +242,8 @@ if(NOT FFMPEG_FOUND)
237 -DOS=${OS} 242 -DOS=${OS}
238 -DCMAKE_AR=${CMAKE_AR}) 243 -DCMAKE_AR=${CMAKE_AR})
239 endif() 244 endif()
245 set(LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS})
246 list(APPEND LINKER_FLAGS ${SYSTEM_LDFLAGS})
240 247
241 externalproject_add(ffmpeg 248 externalproject_add(ffmpeg
242 URL ${FFMPEG_URL} 249 URL ${FFMPEG_URL}
@@ -255,8 +262,9 @@ if(NOT FFMPEG_FOUND)
255 -DENABLE_CCACHE=${ENABLE_CCACHE} 262 -DENABLE_CCACHE=${ENABLE_CCACHE}
256 -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} 263 -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
257 -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} 264 -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
258 -DCMAKE_EXE_LINKER_FLAGS=${CMAKE_EXE_LINKER_FLAGS} 265 -DCMAKE_EXE_LINKER_FLAGS=${LINKER_FLAGS}
259 ${CROSS_ARGS} 266 ${CROSS_ARGS}
267 ${FFMPEG_OPTIONS}
260 PATCH_COMMAND ${CMAKE_COMMAND} -E copy 268 PATCH_COMMAND ${CMAKE_COMMAND} -E copy
261 ${CMAKE_SOURCE_DIR}/tools/depends/target/ffmpeg/CMakeLists.txt 269 ${CMAKE_SOURCE_DIR}/tools/depends/target/ffmpeg/CMakeLists.txt
262 <SOURCE_DIR> && 270 <SOURCE_DIR> &&
diff --git a/cmake/modules/FindFlatBuffers.cmake b/cmake/modules/FindFlatBuffers.cmake
new file mode 100644
index 0000000..6f7e6a2
--- /dev/null
+++ b/cmake/modules/FindFlatBuffers.cmake
@@ -0,0 +1,72 @@
1# FindFlatBuffers
2# --------
3# Find the FlatBuffers schema compiler and headers
4#
5# This will define the following variables:
6#
7# FLATBUFFERS_FOUND - system has FlatBuffers compiler and headers
8# FLATBUFFERS_FLATC_EXECUTABLE - the flatc compiler executable
9# FLATBUFFERS_INCLUDE_DIRS - the FlatFuffers include directory
10# FLATBUFFERS_MESSAGES_INCLUDE_DIR - the directory for generated headers
11
12if(ENABLE_INTERNAL_FLATBUFFERS)
13 include(ExternalProject)
14 file(STRINGS ${CMAKE_SOURCE_DIR}/tools/depends/native/flatbuffers-native/Makefile VER REGEX "^[ ]*VERSION[ ]*=.+$")
15 string(REGEX REPLACE "^[ ]*VERSION[ ]*=[ ]*" "" FLATBUFFERS_VER "${VER}")
16
17 # Allow user to override the download URL with a local tarball
18 # Needed for offline build envs
19 if(FLATBUFFERS_URL)
20 get_filename_component(FLATBUFFERS_URL "${FLATBUFFERS_URL}" ABSOLUTE)
21 else()
22 set(FLATBUFFERS_URL http://mirrors.kodi.tv/build-deps/sources/flatbuffers-${FLATBUFFERS_VER}.tar.gz)
23 endif()
24 if(VERBOSE)
25 message(STATUS "FLATBUFFERS_URL: ${FLATBUFFERS_URL}")
26 endif()
27
28 set(FLATBUFFERS_FLATC_EXECUTABLE ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/bin/flatc CACHE INTERNAL "FlatBuffer compiler")
29 set(FLATBUFFERS_INCLUDE_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/include CACHE INTERNAL "FlatBuffer include dir")
30
31 externalproject_add(flatbuffers
32 URL ${FLATBUFFERS_URL}
33 DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download
34 PREFIX ${CORE_BUILD_DIR}/flatbuffers
35 CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}
36 -DCMAKE_BUILD_TYPE=Release
37 -DFLATBUFFERS_CODE_COVERAGE=OFF
38 -DFLATBUFFERS_BUILD_TESTS=OFF
39 -DFLATBUFFERS_INSTALL=ON
40 -DFLATBUFFERS_BUILD_FLATLIB=OFF
41 -DFLATBUFFERS_BUILD_FLATC=ON
42 -DFLATBUFFERS_BUILD_FLATHASH=OFF
43 -DFLATBUFFERS_BUILD_GRPCTEST=OFF
44 -DFLATBUFFERS_BUILD_SHAREDLIB=OFF
45 "${EXTRA_ARGS}"
46 PATCH_COMMAND patch -p1 < ${CORE_SOURCE_DIR}/tools/depends/native/flatbuffers-native/0001-Fix-compiler-warning.patch
47 BUILD_BYPRODUCTS ${FLATBUFFERS_FLATC_EXECUTABLE})
48 set_target_properties(flatbuffers PROPERTIES FOLDER "External Projects"
49 INTERFACE_INCLUDE_DIRECTORIES ${FLATBUFFERS_INCLUDE_DIR})
50else()
51 find_program(FLATBUFFERS_FLATC_EXECUTABLE NAMES flatc)
52 find_path(FLATBUFFERS_INCLUDE_DIR NAMES flatbuffers/flatbuffers.h)
53endif()
54
55include(FindPackageHandleStandardArgs)
56find_package_handle_standard_args(FlatBuffers
57 REQUIRED_VARS FLATBUFFERS_FLATC_EXECUTABLE FLATBUFFERS_INCLUDE_DIR
58 VERSION_VAR FLATBUFFERS_VER)
59
60if(FLATBUFFERS_FOUND)
61 set(FLATBUFFERS_MESSAGES_INCLUDE_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/cores/RetroPlayer/messages CACHE INTERNAL "Generated FlatBuffer headers")
62 set(FLATBUFFERS_INCLUDE_DIRS ${FLATBUFFERS_INCLUDE_DIR} ${FLATBUFFERS_MESSAGES_INCLUDE_DIR})
63
64 if(NOT TARGET flatbuffers)
65 add_library(flatbuffers UNKNOWN IMPORTED)
66 set_target_properties(flatbuffers PROPERTIES
67 FOLDER "External Projects"
68 INTERFACE_INCLUDE_DIRECTORIES ${FLATBUFFERS_INCLUDE_DIR})
69 endif()
70endif()
71
72mark_as_advanced(FLATBUFFERS_FLATC_EXECUTABLE FLATBUFFERS_INCLUDE_DIR)
diff --git a/cmake/modules/FindFmt.cmake b/cmake/modules/FindFmt.cmake
index 5e47509..df18d85 100644
--- a/cmake/modules/FindFmt.cmake
+++ b/cmake/modules/FindFmt.cmake
@@ -30,7 +30,7 @@ if(ENABLE_INTERNAL_FMT)
30 30
31 if(APPLE) 31 if(APPLE)
32 set(EXTRA_ARGS "-DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}") 32 set(EXTRA_ARGS "-DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}")
33 endif() 33 endif()
34 34
35 set(FMT_LIBRARY ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/libfmt.a) 35 set(FMT_LIBRARY ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/libfmt.a)
36 set(FMT_INCLUDE_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/include) 36 set(FMT_INCLUDE_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/include)
@@ -90,14 +90,13 @@ if(FMT_FOUND)
90 set(FMT_LIBRARIES ${FMT_LIBRARY}) 90 set(FMT_LIBRARIES ${FMT_LIBRARY})
91 set(FMT_INCLUDE_DIRS ${FMT_INCLUDE_DIR}) 91 set(FMT_INCLUDE_DIRS ${FMT_INCLUDE_DIR})
92 92
93 if(NOT TARGET Fmt::Fmt) 93 if(NOT TARGET fmt)
94 add_library(Fmt::Fmt UNKNOWN IMPORTED) 94 add_library(fmt UNKNOWN IMPORTED)
95 set_target_properties(Fmt::Fmt PROPERTIES 95 set_target_properties(fmt PROPERTIES
96 IMPORTED_LOCATION "${FMT_LIBRARY}" 96 IMPORTED_LOCATION "${FMT_LIBRARY}"
97 INTERFACE_INCLUDE_DIRECTORIES "${FMT_INCLUDE_DIR}") 97 INTERFACE_INCLUDE_DIRECTORIES "${FMT_INCLUDE_DIR}")
98 endif() 98 endif()
99endif() 99endif()
100 100
101mark_as_advanced(FMT_INCLUDE_DIR FMT_LIBRARY)
102
103endif() 101endif()
102mark_as_advanced(FMT_INCLUDE_DIR FMT_LIBRARY)
diff --git a/cmake/modules/FindFreeType.cmake b/cmake/modules/FindFreeType.cmake
index fb4c668..8a39555 100644
--- a/cmake/modules/FindFreeType.cmake
+++ b/cmake/modules/FindFreeType.cmake
@@ -3,7 +3,7 @@
3# ------------ 3# ------------
4# Finds the FreeType library 4# Finds the FreeType library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# FREETYPE_FOUND - system has FreeType 8# FREETYPE_FOUND - system has FreeType
9# FREETYPE_INCLUDE_DIRS - the FreeType include directory 9# FREETYPE_INCLUDE_DIRS - the FreeType include directory
diff --git a/cmake/modules/FindFriBidi.cmake b/cmake/modules/FindFriBidi.cmake
index dcaeb48..91f3994 100644
--- a/cmake/modules/FindFriBidi.cmake
+++ b/cmake/modules/FindFriBidi.cmake
@@ -3,7 +3,7 @@
3# ----------- 3# -----------
4# Finds the GNU FriBidi library 4# Finds the GNU FriBidi library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# FRIBIDI_FOUND - system has FriBidi 8# FRIBIDI_FOUND - system has FriBidi
9# FRIBIDI_INCLUDE_DIRS - the FriBidi include directory 9# FRIBIDI_INCLUDE_DIRS - the FriBidi include directory
diff --git a/cmake/modules/FindGBM.cmake b/cmake/modules/FindGBM.cmake
index ac95241..37a26a7 100644
--- a/cmake/modules/FindGBM.cmake
+++ b/cmake/modules/FindGBM.cmake
@@ -2,7 +2,7 @@
2# ---------- 2# ----------
3# Finds the GBM library 3# Finds the GBM library
4# 4#
5# This will will define the following variables:: 5# This will define the following variables::
6# 6#
7# GBM_FOUND - system has GBM 7# GBM_FOUND - system has GBM
8# GBM_INCLUDE_DIRS - the GBM include directory 8# GBM_INCLUDE_DIRS - the GBM include directory
@@ -29,11 +29,35 @@ find_package_handle_standard_args(GBM
29 REQUIRED_VARS GBM_LIBRARY GBM_INCLUDE_DIR 29 REQUIRED_VARS GBM_LIBRARY GBM_INCLUDE_DIR
30 VERSION_VAR GBM_VERSION) 30 VERSION_VAR GBM_VERSION)
31 31
32include(CheckCSourceCompiles)
33set(CMAKE_REQUIRED_LIBRARIES ${GBM_LIBRARY})
34check_c_source_compiles("#include <gbm.h>
35
36 int main()
37 {
38 gbm_bo_map(NULL, 0, 0, 0, 0, GBM_BO_TRANSFER_WRITE, NULL, NULL);
39 }
40 " GBM_HAS_BO_MAP)
41
42check_c_source_compiles("#include <gbm.h>
43
44 int main()
45 {
46 gbm_surface_create_with_modifiers(NULL, 0, 0, 0, NULL, 0);
47 }
48 " GBM_HAS_MODIFIERS)
49
32if(GBM_FOUND) 50if(GBM_FOUND)
33 set(GBM_LIBRARIES ${GBM_LIBRARY}) 51 set(GBM_LIBRARIES ${GBM_LIBRARY})
34 set(GBM_INCLUDE_DIRS ${GBM_INCLUDE_DIR}) 52 set(GBM_INCLUDE_DIRS ${GBM_INCLUDE_DIR})
35 set(GBM_DEFINITIONS -DHAVE_GBM=1) 53 set(GBM_DEFINITIONS -DHAVE_GBM=1)
36 if(NOT TARGET GBM::GBM) 54 if(GBM_HAS_BO_MAP)
55 list(APPEND GBM_DEFINITIONS -DHAS_GBM_BO_MAP=1)
56 endif()
57 if(GBM_HAS_MODIFIERS)
58 list(APPEND GBM_DEFINITIONS -DHAS_GBM_MODIFIERS=1)
59 endif()
60 if(NOT TARGET GBM::GBM)
37 add_library(GBM::GBM UNKNOWN IMPORTED) 61 add_library(GBM::GBM UNKNOWN IMPORTED)
38 set_target_properties(GBM::GBM PROPERTIES 62 set_target_properties(GBM::GBM PROPERTIES
39 IMPORTED_LOCATION "${GBM_LIBRARY}" 63 IMPORTED_LOCATION "${GBM_LIBRARY}"
diff --git a/cmake/modules/FindGIF.cmake b/cmake/modules/FindGIF.cmake
index 8649bd4..1c616e0 100644
--- a/cmake/modules/FindGIF.cmake
+++ b/cmake/modules/FindGIF.cmake
@@ -3,7 +3,7 @@
3# ------- 3# -------
4# Finds the libgif library 4# Finds the libgif library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# GIF_FOUND - system has libgif 8# GIF_FOUND - system has libgif
9# GIF_INCLUDE_DIRS - the libgif include directory 9# GIF_INCLUDE_DIRS - the libgif include directory
diff --git a/cmake/modules/FindGLX.cmake b/cmake/modules/FindGLX.cmake
index 77c8fce..ab74dfd 100644
--- a/cmake/modules/FindGLX.cmake
+++ b/cmake/modules/FindGLX.cmake
@@ -3,7 +3,7 @@
3# ----- 3# -----
4# Finds the GLX library 4# Finds the GLX library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# GLX_FOUND - system has GLX 8# GLX_FOUND - system has GLX
9# GLX_INCLUDE_DIRS - the GLX include directory 9# GLX_INCLUDE_DIRS - the GLX include directory
diff --git a/cmake/modules/FindIconv.cmake b/cmake/modules/FindIconv.cmake
index 8ee01fb..ae7d8d7 100644
--- a/cmake/modules/FindIconv.cmake
+++ b/cmake/modules/FindIconv.cmake
@@ -3,7 +3,7 @@
3# -------- 3# --------
4# Finds the ICONV library 4# Finds the ICONV library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# ICONV_FOUND - system has ICONV 8# ICONV_FOUND - system has ICONV
9# ICONV_INCLUDE_DIRS - the ICONV include directory 9# ICONV_INCLUDE_DIRS - the ICONV include directory
diff --git a/cmake/modules/FindLCMS2.cmake b/cmake/modules/FindLCMS2.cmake
index 5ec7a77..7cc1497 100644
--- a/cmake/modules/FindLCMS2.cmake
+++ b/cmake/modules/FindLCMS2.cmake
@@ -3,7 +3,7 @@
3# ----------- 3# -----------
4# Finds the LCMS Color Management library 4# Finds the LCMS Color Management library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# LCMS2_FOUND - system has LCMS Color Management 8# LCMS2_FOUND - system has LCMS Color Management
9# LCMS2_INCLUDE_DIRS - the LCMS Color Management include directory 9# LCMS2_INCLUDE_DIRS - the LCMS Color Management include directory
diff --git a/cmake/modules/FindLibDRM.cmake b/cmake/modules/FindLibDRM.cmake
index 35d632e..ec30920 100644
--- a/cmake/modules/FindLibDRM.cmake
+++ b/cmake/modules/FindLibDRM.cmake
@@ -3,7 +3,7 @@
3# ---------- 3# ----------
4# Finds the LibDRM library 4# Finds the LibDRM library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# LIBDRM_FOUND - system has LibDRM 8# LIBDRM_FOUND - system has LibDRM
9# LIBDRM_INCLUDE_DIRS - the LibDRM include directory 9# LIBDRM_INCLUDE_DIRS - the LibDRM include directory
@@ -14,7 +14,7 @@
14# LibDRM::LibDRM - The LibDRM library 14# LibDRM::LibDRM - The LibDRM library
15 15
16if(PKG_CONFIG_FOUND) 16if(PKG_CONFIG_FOUND)
17 pkg_check_modules(PC_LIBDRM libdrm QUIET) 17 pkg_check_modules(PC_LIBDRM libdrm>=2.4.71 QUIET)
18endif() 18endif()
19 19
20find_path(LIBDRM_INCLUDE_DIR NAMES drm.h 20find_path(LIBDRM_INCLUDE_DIR NAMES drm.h
diff --git a/cmake/modules/FindLibDvd.cmake b/cmake/modules/FindLibDvd.cmake
index 5c72826..bd08b94 100644
--- a/cmake/modules/FindLibDvd.cmake
+++ b/cmake/modules/FindLibDvd.cmake
@@ -76,9 +76,6 @@ else()
76 endforeach() 76 endforeach()
77 77
78 set(DVDREAD_CFLAGS "${DVDREAD_CFLAGS} -I${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/include") 78 set(DVDREAD_CFLAGS "${DVDREAD_CFLAGS} -I${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/include")
79 if(CMAKE_CROSSCOMPILING)
80 set(EXTRA_FLAGS "CC=${CMAKE_C_COMPILER}")
81 endif()
82 79
83 if(APPLE) 80 if(APPLE)
84 set(CMAKE_LD_FLAGS "-framework IOKit -framework CoreFoundation") 81 set(CMAKE_LD_FLAGS "-framework IOKit -framework CoreFoundation")
@@ -113,7 +110,7 @@ else()
113 --with-pic 110 --with-pic
114 --prefix=<INSTALL_DIR> 111 --prefix=<INSTALL_DIR>
115 --libdir=<INSTALL_DIR>/lib 112 --libdir=<INSTALL_DIR>/lib
116 "${EXTRA_FLAGS}" 113 "CC=${CMAKE_C_COMPILER}"
117 "CFLAGS=${CMAKE_C_FLAGS} ${DVDREAD_CFLAGS}" 114 "CFLAGS=${CMAKE_C_FLAGS} ${DVDREAD_CFLAGS}"
118 "LDFLAGS=${CMAKE_LD_FLAGS}" 115 "LDFLAGS=${CMAKE_LD_FLAGS}"
119 BUILD_BYPRODUCTS ${DVDCSS_LIBRARY}) 116 BUILD_BYPRODUCTS ${DVDCSS_LIBRARY})
@@ -154,7 +151,7 @@ else()
154 --with-pic 151 --with-pic
155 --prefix=<INSTALL_DIR> 152 --prefix=<INSTALL_DIR>
156 --libdir=<INSTALL_DIR>/lib 153 --libdir=<INSTALL_DIR>/lib
157 "${EXTRA_FLAGS}" 154 "CC=${CMAKE_C_COMPILER}"
158 "CFLAGS=${CMAKE_C_FLAGS} ${DVDREAD_CFLAGS}" 155 "CFLAGS=${CMAKE_C_FLAGS} ${DVDREAD_CFLAGS}"
159 "LDFLAGS=${CMAKE_LD_FLAGS}" 156 "LDFLAGS=${CMAKE_LD_FLAGS}"
160 BUILD_BYPRODUCTS ${DVDREAD_LIBRARY}) 157 BUILD_BYPRODUCTS ${DVDREAD_LIBRARY})
@@ -198,7 +195,7 @@ else()
198 --with-pic 195 --with-pic
199 --prefix=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd 196 --prefix=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd
200 --libdir=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/lib 197 --libdir=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/lib
201 "${EXTRA_FLAGS}" 198 "CC=${CMAKE_C_COMPILER}"
202 "LDFLAGS=${CMAKE_LD_FLAGS} -L${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/lib" 199 "LDFLAGS=${CMAKE_LD_FLAGS} -L${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/lib"
203 "CFLAGS=${CMAKE_C_FLAGS} ${DVDREAD_CFLAGS}" 200 "CFLAGS=${CMAKE_C_FLAGS} ${DVDREAD_CFLAGS}"
204 "DVDREAD_CFLAGS=${DVDREAD_CFLAGS}" 201 "DVDREAD_CFLAGS=${DVDREAD_CFLAGS}"
@@ -245,4 +242,4 @@ else()
245 endif() 242 endif()
246 set(LIBDVD_LIBRARIES ${LIBDVD_LIBRARIES} CACHE STRING "libdvd libraries" FORCE) 243 set(LIBDVD_LIBRARIES ${LIBDVD_LIBRARIES} CACHE STRING "libdvd libraries" FORCE)
247 set(LIBDVD_FOUND 1 CACHE BOOL "libdvd found" FORCE) 244 set(LIBDVD_FOUND 1 CACHE BOOL "libdvd found" FORCE)
248endif() \ No newline at end of file 245endif()
diff --git a/cmake/modules/FindLibInput.cmake b/cmake/modules/FindLibInput.cmake
new file mode 100644
index 0000000..069df5f
--- /dev/null
+++ b/cmake/modules/FindLibInput.cmake
@@ -0,0 +1,36 @@
1#.rst:
2# FindLibinput
3# --------
4# Finds the libinput library
5#
6# This will define the following variables::
7#
8# LIBINPUT_FOUND - system has libinput
9# LIBINPUT_INCLUDE_DIRS - the libinput include directory
10# LIBINPUT_LIBRARIES - the libinput libraries
11# LIBINPUT_DEFINITIONS - the libinput compile definitions
12#
13
14if(PKG_CONFIG_FOUND)
15 pkg_check_modules(PC_LIBINPUT libinput QUIET)
16endif()
17
18find_path(LIBINPUT_INCLUDE_DIR NAMES libinput.h
19 PATHS ${PC_LIBINPUT_INCLUDEDIR})
20
21find_library(LIBINPUT_LIBRARY NAMES input
22 PATHS ${PC_LIBINPUT_LIBDIR})
23
24set(LIBINPUT_VERSION ${PC_LIBINPUT_VERSION})
25
26include(FindPackageHandleStandardArgs)
27find_package_handle_standard_args(LibInput
28 REQUIRED_VARS LIBINPUT_LIBRARY LIBINPUT_INCLUDE_DIR
29 VERSION_VAR LIBINPUT_VERSION)
30
31if(LIBINPUT_FOUND)
32 set(LIBINPUT_INCLUDE_DIRS ${LIBINPUT_INCLUDE_DIR})
33 set(LIBINPUT_LIBRARIES ${LIBINPUT_LIBRARY})
34endif()
35
36mark_as_advanced(LIBINPUT_INCLUDE_DIR LIBINPUT_LIBRARY)
diff --git a/cmake/modules/FindLibUSB.cmake b/cmake/modules/FindLibUSB.cmake
index e976bf4..17cf6ec 100644
--- a/cmake/modules/FindLibUSB.cmake
+++ b/cmake/modules/FindLibUSB.cmake
@@ -3,7 +3,7 @@
3# ---------- 3# ----------
4# Finds the USB library 4# Finds the USB library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# LIBUSB_FOUND - system has LibUSB 8# LIBUSB_FOUND - system has LibUSB
9# LIBUSB_INCLUDE_DIRS - the USB include directory 9# LIBUSB_INCLUDE_DIRS - the USB include directory
diff --git a/cmake/modules/FindLircClient.cmake b/cmake/modules/FindLircClient.cmake
index 528c38e..c469af5 100644
--- a/cmake/modules/FindLircClient.cmake
+++ b/cmake/modules/FindLircClient.cmake
@@ -2,7 +2,7 @@
2# ----------- 2# -----------
3# Finds the liblirc_client library 3# Finds the liblirc_client library
4# 4#
5# This will will define the following variables:: 5# This will define the following variables::
6# 6#
7# LIRCCLIENT_FOUND - if false, do not try to link to lirc_client 7# LIRCCLIENT_FOUND - if false, do not try to link to lirc_client
8# LIRCCLIENT_INCLUDE_DIRS - where to find lirc/lirc_client.h 8# LIRCCLIENT_INCLUDE_DIRS - where to find lirc/lirc_client.h
diff --git a/cmake/modules/FindLzo2.cmake b/cmake/modules/FindLzo2.cmake
index 4f7313f..5e3e686 100644
--- a/cmake/modules/FindLzo2.cmake
+++ b/cmake/modules/FindLzo2.cmake
@@ -3,7 +3,7 @@
3# -------- 3# --------
4# Finds the Lzo2 library 4# Finds the Lzo2 library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# LZO2_FOUND - system has Lzo2 8# LZO2_FOUND - system has Lzo2
9# LZO2_INCLUDE_DIRS - the Lzo2 include directory 9# LZO2_INCLUDE_DIRS - the Lzo2 include directory
diff --git a/cmake/modules/FindMDNS.cmake b/cmake/modules/FindMDNS.cmake
index 9294708..c2574c8 100644
--- a/cmake/modules/FindMDNS.cmake
+++ b/cmake/modules/FindMDNS.cmake
@@ -3,7 +3,7 @@
3# -------- 3# --------
4# Finds the mDNS library 4# Finds the mDNS library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# MDNS_FOUND - system has mDNS 8# MDNS_FOUND - system has mDNS
9# MDNS_INCLUDE_DIRS - the mDNS include directory 9# MDNS_INCLUDE_DIRS - the mDNS include directory
diff --git a/cmake/modules/FindMariaDBClient.cmake b/cmake/modules/FindMariaDBClient.cmake
index 1e5e736..8a28670 100644
--- a/cmake/modules/FindMariaDBClient.cmake
+++ b/cmake/modules/FindMariaDBClient.cmake
@@ -3,7 +3,7 @@
3# --------------- 3# ---------------
4# Finds the MariaDBClient library 4# Finds the MariaDBClient library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# MARIADBCLIENT_FOUND - system has MariaDBClient 8# MARIADBCLIENT_FOUND - system has MariaDBClient
9# MARIADBCLIENT_INCLUDE_DIRS - the MariaDBClient include directory 9# MARIADBCLIENT_INCLUDE_DIRS - the MariaDBClient include directory
diff --git a/cmake/modules/FindMicroHttpd.cmake b/cmake/modules/FindMicroHttpd.cmake
index d04878c..e6127f3 100644
--- a/cmake/modules/FindMicroHttpd.cmake
+++ b/cmake/modules/FindMicroHttpd.cmake
@@ -3,7 +3,7 @@
3# -------------- 3# --------------
4# Finds the MicroHttpd library 4# Finds the MicroHttpd library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# MICROHTTPD_FOUND - system has MicroHttpd 8# MICROHTTPD_FOUND - system has MicroHttpd
9# MICROHTTPD_INCLUDE_DIRS - the MicroHttpd include directory 9# MICROHTTPD_INCLUDE_DIRS - the MicroHttpd include directory
diff --git a/cmake/modules/FindMir.cmake b/cmake/modules/FindMir.cmake
deleted file mode 100644
index e66ff02..0000000
--- a/cmake/modules/FindMir.cmake
+++ /dev/null
@@ -1,33 +0,0 @@
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
13if(PKG_CONFIG_FOUND)
14 pkg_check_modules (PC_MIR mirclient>=0.26.2 QUIET)
15endif()
16
17find_path(MIR_INCLUDE_DIR NAMES mir_toolkit/mir_client_library.h
18 PATHS ${PC_MIR_INCLUDE_DIRS})
19
20find_library(MIR_LIBRARY NAMES mirclient
21 PATHS ${PC_MIR_LIBRARIES} ${PC_MIR_LIBRARY_DIRS})
22
23include (FindPackageHandleStandardArgs)
24find_package_handle_standard_args (Mir
25 REQUIRED_VARS MIR_LIBRARY MIR_INCLUDE_DIR)
26
27if (MIR_FOUND)
28 set(MIR_LIBRARIES ${MIR_LIBRARY})
29 set(MIR_INCLUDE_DIRS ${PC_MIR_INCLUDE_DIRS})
30 set(MIR_DEFINITIONS -DHAVE_MIR=1)
31endif()
32
33mark_as_advanced (MIR_LIBRARY MIR_INCLUDE_DIR)
diff --git a/cmake/modules/FindMySqlClient.cmake b/cmake/modules/FindMySqlClient.cmake
index 50db582..05d3f57 100644
--- a/cmake/modules/FindMySqlClient.cmake
+++ b/cmake/modules/FindMySqlClient.cmake
@@ -3,7 +3,7 @@
3# --------------- 3# ---------------
4# Finds the MySqlClient library 4# Finds the MySqlClient library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# MYSQLCLIENT_FOUND - system has MySqlClient 8# MYSQLCLIENT_FOUND - system has MySqlClient
9# MYSQLCLIENT_INCLUDE_DIRS - the MySqlClient include directory 9# MYSQLCLIENT_INCLUDE_DIRS - the MySqlClient include directory
diff --git a/cmake/modules/FindNFS.cmake b/cmake/modules/FindNFS.cmake
index b304bf3..36727c0 100644
--- a/cmake/modules/FindNFS.cmake
+++ b/cmake/modules/FindNFS.cmake
@@ -3,7 +3,7 @@
3# ------- 3# -------
4# Finds the libnfs library 4# Finds the libnfs library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# NFS_FOUND - system has libnfs 8# NFS_FOUND - system has libnfs
9# NFS_INCLUDE_DIRS - the libnfs include directory 9# NFS_INCLUDE_DIRS - the libnfs include directory
diff --git a/cmake/modules/FindOpenGLES.cmake b/cmake/modules/FindOpenGLES.cmake
index fac21bc..0191d9e 100644
--- a/cmake/modules/FindOpenGLES.cmake
+++ b/cmake/modules/FindOpenGLES.cmake
@@ -3,7 +3,7 @@
3# ------------ 3# ------------
4# Finds the OpenGLES2 library 4# Finds the OpenGLES2 library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# OPENGLES_FOUND - system has OpenGLES 8# OPENGLES_FOUND - system has OpenGLES
9# OPENGLES_INCLUDE_DIRS - the OpenGLES include directory 9# OPENGLES_INCLUDE_DIRS - the OpenGLES include directory
diff --git a/cmake/modules/FindOpenGl.cmake b/cmake/modules/FindOpenGl.cmake
index af1c433..cb695a6 100644
--- a/cmake/modules/FindOpenGl.cmake
+++ b/cmake/modules/FindOpenGl.cmake
@@ -3,7 +3,7 @@
3# ---------- 3# ----------
4# Finds the FindOpenGl library 4# Finds the FindOpenGl library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# OPENGL_FOUND - system has OpenGl 8# OPENGL_FOUND - system has OpenGl
9# OPENGL_INCLUDE_DIRS - the OpenGl include directory 9# OPENGL_INCLUDE_DIRS - the OpenGl include directory
diff --git a/cmake/modules/FindPCRE.cmake b/cmake/modules/FindPCRE.cmake
index 8babed3..d549d19 100644
--- a/cmake/modules/FindPCRE.cmake
+++ b/cmake/modules/FindPCRE.cmake
@@ -3,7 +3,7 @@
3# -------- 3# --------
4# Finds the PCRECPP library 4# Finds the PCRECPP library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# PCRE_FOUND - system has libpcrecpp 8# PCRE_FOUND - system has libpcrecpp
9# PCRE_INCLUDE_DIRS - the libpcrecpp include directory 9# PCRE_INCLUDE_DIRS - the libpcrecpp include directory
diff --git a/cmake/modules/FindPlist.cmake b/cmake/modules/FindPlist.cmake
index 0664c10..cd143e9 100644
--- a/cmake/modules/FindPlist.cmake
+++ b/cmake/modules/FindPlist.cmake
@@ -3,7 +3,7 @@
3# --------- 3# ---------
4# Finds the Plist library 4# Finds the Plist library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# PLIST_FOUND - system has Plist library 8# PLIST_FOUND - system has Plist library
9# PLIST_INCLUDE_DIRS - the Plist library include directory 9# PLIST_INCLUDE_DIRS - the Plist library include directory
diff --git a/cmake/modules/FindSSE.cmake b/cmake/modules/FindSSE.cmake
index b860dca..08e3630 100644
--- a/cmake/modules/FindSSE.cmake
+++ b/cmake/modules/FindSSE.cmake
@@ -1,4 +1,4 @@
1# Check if SSE instructions are available on the machine where 1# Check if SSE instructions are available on the machine where
2# the project is compiled. 2# the project is compiled.
3include(TestCXXAcceptsFlag) 3include(TestCXXAcceptsFlag)
4 4
@@ -74,7 +74,7 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
74 string(REGEX REPLACE "^.*(AVX2).*$" "\\1" _SSE_THERE ${CPUINFO}) 74 string(REGEX REPLACE "^.*(AVX2).*$" "\\1" _SSE_THERE ${CPUINFO})
75 string(COMPARE EQUAL "AVX2" "${_SSE_THERE}" _AVX2_TRUE) 75 string(COMPARE EQUAL "AVX2" "${_SSE_THERE}" _AVX2_TRUE)
76 CHECK_CXX_ACCEPTS_FLAG("-mavx2" _AVX2_OK) 76 CHECK_CXX_ACCEPTS_FLAG("-mavx2" _AVX2_OK)
77 endif() 77 endif()
78elseif(CMAKE_SYSTEM_NAME MATCHES "Android") 78elseif(CMAKE_SYSTEM_NAME MATCHES "Android")
79 if(CPU MATCHES "x86_64" OR CPU MATCHES "i.86") 79 if(CPU MATCHES "x86_64" OR CPU MATCHES "i.86")
80 set(_SSE_TRUE TRUE) 80 set(_SSE_TRUE TRUE)
diff --git a/cmake/modules/FindSSH.cmake b/cmake/modules/FindSSH.cmake
deleted file mode 100644
index bf3837e..0000000
--- a/cmake/modules/FindSSH.cmake
+++ /dev/null
@@ -1,47 +0,0 @@
1#.rst:
2# FindSSH
3# -------
4# Finds the SSH library
5#
6# This will will define the following variables::
7#
8# SSH_FOUND - system has SSH
9# SSH_INCLUDE_DIRS - the SSH include directory
10# SSH_LIBRARIES - the SSH libraries
11# SSH_DEFINITIONS - the SSH definitions
12#
13# and the following imported targets::
14#
15# SSH::SSH - The SSH library
16
17if(PKG_CONFIG_FOUND)
18 pkg_check_modules(PC_SSH libssh>=0.6 QUIET)
19endif()
20
21find_path(SSH_INCLUDE_DIR NAMES libssh/libssh.h
22 PATHS ${PC_SSH_INCLUDEDIR})
23find_library(SSH_LIBRARY NAMES ssh
24 PATHS ${PC_SSH_LIBDIR})
25
26set(SSH_VERSION ${PC_SSH_VERSION})
27
28include(FindPackageHandleStandardArgs)
29find_package_handle_standard_args(SSH
30 REQUIRED_VARS SSH_LIBRARY SSH_INCLUDE_DIR
31 VERSION_VAR SSH_VERSION)
32
33if(SSH_FOUND)
34 set(SSH_LIBRARIES ${SSH_LIBRARY})
35 set(SSH_INCLUDE_DIRS ${SSH_INCLUDE_DIR})
36 set(SSH_DEFINITIONS -DHAS_FILESYSTEM_SFTP=1)
37
38 if(NOT TARGET SSH::SSH)
39 add_library(SSH::SSH UNKNOWN IMPORTED)
40 set_target_properties(SSH::SSH PROPERTIES
41 IMPORTED_LOCATION "${SSH_LIBRARY}"
42 INTERFACE_INCLUDE_DIRECTORIES "${SSH_INCLUDE_DIR}"
43 INTERFACE_COMPILE_DEFINITIONS HAS_FILESYSTEM_SFTP=1)
44 endif()
45endif()
46
47mark_as_advanced(SSH_INCLUDE_DIR SSH_LIBRARY)
diff --git a/cmake/modules/FindSWIG.cmake b/cmake/modules/FindSWIG.cmake
index 523b49b..f9b27c2 100644
--- a/cmake/modules/FindSWIG.cmake
+++ b/cmake/modules/FindSWIG.cmake
@@ -3,7 +3,7 @@
3# -------- 3# --------
4# Finds the SWIG executable 4# Finds the SWIG executable
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# SWIG_FOUND - system has SWIG 8# SWIG_FOUND - system has SWIG
9# SWIG_EXECUTABLE - the SWIG executable 9# SWIG_EXECUTABLE - the SWIG executable
diff --git a/cmake/modules/FindSdl.cmake b/cmake/modules/FindSdl.cmake
index 81c1793..60959cb 100644
--- a/cmake/modules/FindSdl.cmake
+++ b/cmake/modules/FindSdl.cmake
@@ -3,7 +3,7 @@
3# ------- 3# -------
4# Finds the SDL library 4# Finds the SDL library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# SDL_FOUND - system has SDL 8# SDL_FOUND - system has SDL
9# SDL_INCLUDE_DIRS - the SDL include directory 9# SDL_INCLUDE_DIRS - the SDL include directory
diff --git a/cmake/modules/FindShairplay.cmake b/cmake/modules/FindShairplay.cmake
index 699fb7a..bbb3372 100644
--- a/cmake/modules/FindShairplay.cmake
+++ b/cmake/modules/FindShairplay.cmake
@@ -3,7 +3,7 @@
3# ------------- 3# -------------
4# Finds the Shairplay library 4# Finds the Shairplay library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# SHAIRPLAY_FOUND - system has Shairplay 8# SHAIRPLAY_FOUND - system has Shairplay
9# SHAIRPLAY_INCLUDE_DIRS - the Shairplay include directory 9# SHAIRPLAY_INCLUDE_DIRS - the Shairplay include directory
diff --git a/cmake/modules/FindSmbClient.cmake b/cmake/modules/FindSmbClient.cmake
index 9a8b197..70492ff 100644
--- a/cmake/modules/FindSmbClient.cmake
+++ b/cmake/modules/FindSmbClient.cmake
@@ -3,7 +3,7 @@
3# ------------- 3# -------------
4# Finds the SMB Client library 4# Finds the SMB Client library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# SMBCLIENT_FOUND - system has SmbClient 8# SMBCLIENT_FOUND - system has SmbClient
9# SMBCLIENT_INCLUDE_DIRS - the SmbClient include directory 9# SMBCLIENT_INCLUDE_DIRS - the SmbClient include directory
diff --git a/cmake/modules/FindSndio.cmake b/cmake/modules/FindSndio.cmake
index 5f08acd..992c0b1 100644
--- a/cmake/modules/FindSndio.cmake
+++ b/cmake/modules/FindSndio.cmake
@@ -3,7 +3,7 @@
3# --------- 3# ---------
4# Finds the Sndio Library 4# Finds the Sndio Library
5# 5#
6# This will will define the following variables: 6# This will define the following variables:
7# 7#
8# SNDIO_FOUND - system has sndio 8# SNDIO_FOUND - system has sndio
9# SNDIO_INCLUDE_DIRS - sndio include directory 9# SNDIO_INCLUDE_DIRS - sndio include directory
diff --git a/cmake/modules/FindSqlite3.cmake b/cmake/modules/FindSqlite3.cmake
index abde0cf..8fd9719 100644
--- a/cmake/modules/FindSqlite3.cmake
+++ b/cmake/modules/FindSqlite3.cmake
@@ -3,7 +3,7 @@
3# ----------- 3# -----------
4# Finds the SQLite3 library 4# Finds the SQLite3 library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# SQLITE3_FOUND - system has SQLite3 8# SQLITE3_FOUND - system has SQLite3
9# SQLITE3_INCLUDE_DIRS - the SQLite3 include directory 9# SQLITE3_INCLUDE_DIRS - the SQLite3 include directory
diff --git a/cmake/modules/FindTagLib.cmake b/cmake/modules/FindTagLib.cmake
index 8c8c2f3..ac7b7ec 100644
--- a/cmake/modules/FindTagLib.cmake
+++ b/cmake/modules/FindTagLib.cmake
@@ -3,7 +3,7 @@
3# ---------- 3# ----------
4# Finds the TagLib library 4# Finds the TagLib library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# TAGLIB_FOUND - system has TagLib 8# TAGLIB_FOUND - system has TagLib
9# TAGLIB_INCLUDE_DIRS - the TagLib include directory 9# TAGLIB_INCLUDE_DIRS - the TagLib include directory
diff --git a/cmake/modules/FindTinyXML.cmake b/cmake/modules/FindTinyXML.cmake
index 1220a94..5e9539e 100644
--- a/cmake/modules/FindTinyXML.cmake
+++ b/cmake/modules/FindTinyXML.cmake
@@ -3,7 +3,7 @@
3# ----------- 3# -----------
4# Finds the TinyXML library 4# Finds the TinyXML library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# TINYXML_FOUND - system has TinyXML 8# TINYXML_FOUND - system has TinyXML
9# TINYXML_INCLUDE_DIRS - the TinyXML include directory 9# TINYXML_INCLUDE_DIRS - the TinyXML include directory
diff --git a/cmake/modules/FindUDEV.cmake b/cmake/modules/FindUDEV.cmake
index 422c437..a884025 100644
--- a/cmake/modules/FindUDEV.cmake
+++ b/cmake/modules/FindUDEV.cmake
@@ -3,7 +3,7 @@
3# ------- 3# -------
4# Finds the UDEV library 4# Finds the UDEV library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# UDEV_FOUND - system has UDEV 8# UDEV_FOUND - system has UDEV
9# UDEV_INCLUDE_DIRS - the UDEV include directory 9# UDEV_INCLUDE_DIRS - the UDEV include directory
diff --git a/cmake/modules/FindUUID.cmake b/cmake/modules/FindUUID.cmake
index 173fac2..0c2ff5a 100644
--- a/cmake/modules/FindUUID.cmake
+++ b/cmake/modules/FindUUID.cmake
@@ -3,7 +3,7 @@
3# -------- 3# --------
4# Finds the libuuid library 4# Finds the libuuid library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# UUID_FOUND - system has libuuid 8# UUID_FOUND - system has libuuid
9# UUID_INCLUDE_DIRS - the libuuid include directory 9# UUID_INCLUDE_DIRS - the libuuid include directory
diff --git a/cmake/modules/FindVAAPI.cmake b/cmake/modules/FindVAAPI.cmake
index 157cec4..2111e4f 100644
--- a/cmake/modules/FindVAAPI.cmake
+++ b/cmake/modules/FindVAAPI.cmake
@@ -3,7 +3,7 @@
3# --------- 3# ---------
4# Finds the VAAPI library 4# Finds the VAAPI library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# VAAPI_FOUND - system has VAAPI 8# VAAPI_FOUND - system has VAAPI
9# VAAPI_INCLUDE_DIRS - the VAAPI include directory 9# VAAPI_INCLUDE_DIRS - the VAAPI include directory
diff --git a/cmake/modules/FindVDPAU.cmake b/cmake/modules/FindVDPAU.cmake
index b99e03f..b2c5482 100644
--- a/cmake/modules/FindVDPAU.cmake
+++ b/cmake/modules/FindVDPAU.cmake
@@ -3,7 +3,7 @@
3# --------- 3# ---------
4# Finds the VDPAU library 4# Finds the VDPAU library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# VDPAU_FOUND - system has VDPAU 8# VDPAU_FOUND - system has VDPAU
9# VDPAU_INCLUDE_DIRS - the VDPAU include directory 9# VDPAU_INCLUDE_DIRS - the VDPAU include directory
diff --git a/cmake/modules/FindWaylandProtocols.cmake b/cmake/modules/FindWaylandProtocols.cmake
index 0b96ff0..e74bb80 100644
--- a/cmake/modules/FindWaylandProtocols.cmake
+++ b/cmake/modules/FindWaylandProtocols.cmake
@@ -2,7 +2,7 @@
2# -------------------- 2# --------------------
3# Find wayland-protocols 3# Find wayland-protocols
4# 4#
5# This will will define the following variables:: 5# This will define the following variables::
6# 6#
7# WAYLAND_PROTOCOLS_DIR - directory containing the additional Wayland protocols 7# WAYLAND_PROTOCOLS_DIR - directory containing the additional Wayland protocols
8# from the wayland-protocols package 8# from the wayland-protocols package
diff --git a/cmake/modules/FindWaylandpp.cmake b/cmake/modules/FindWaylandpp.cmake
index 336e613..3cfc282 100644
--- a/cmake/modules/FindWaylandpp.cmake
+++ b/cmake/modules/FindWaylandpp.cmake
@@ -2,7 +2,7 @@
2# ------------- 2# -------------
3# Finds the waylandpp library 3# Finds the waylandpp library
4# 4#
5# This will will define the following variables:: 5# This will define the following variables::
6# 6#
7# WAYLANDPP_FOUND - the system has waylandpp 7# WAYLANDPP_FOUND - the system has waylandpp
8# WAYLANDPP_INCLUDE_DIRS - the waylandpp include directory 8# WAYLANDPP_INCLUDE_DIRS - the waylandpp include directory
@@ -10,15 +10,27 @@
10# WAYLANDPP_DEFINITIONS - the waylandpp definitions 10# WAYLANDPP_DEFINITIONS - the waylandpp definitions
11# WAYLANDPP_SCANNER - path to wayland-scanner++ 11# WAYLANDPP_SCANNER - path to wayland-scanner++
12 12
13pkg_check_modules(WAYLANDPP wayland-client++ wayland-egl++ wayland-cursor++) 13pkg_check_modules(PC_WAYLANDPP wayland-client++ wayland-egl++ wayland-cursor++ QUIET)
14pkg_check_modules(PC_WAYLANDPP_SCANNER wayland-scanner++) 14pkg_check_modules(PC_WAYLANDPP_SCANNER wayland-scanner++ QUIET)
15if(WAYLANDPP_FOUND) 15if(PC_WAYLANDPP_FOUND)
16 pkg_get_variable(PC_WAYLANDPP_PKGDATADIR wayland-client++ pkgdatadir) 16 pkg_get_variable(PC_WAYLANDPP_PKGDATADIR wayland-client++ pkgdatadir)
17endif() 17endif()
18if(PC_WAYLANDPP_SCANNER_FOUND) 18if(PC_WAYLANDPP_SCANNER_FOUND)
19 pkg_get_variable(PC_WAYLANDPP_SCANNER wayland-scanner++ wayland_scannerpp) 19 pkg_get_variable(PC_WAYLANDPP_SCANNER wayland-scanner++ wayland_scannerpp)
20endif() 20endif()
21 21
22find_path(WAYLANDPP_INCLUDE_DIR wayland-client.hpp PATHS ${PC_WAYLANDPP_INCLUDEDIR})
23
24find_library(WAYLANDPP_CLIENT_LIBRARY NAMES wayland-client++
25 PATHS ${PC_WAYLANDPP_LIBRARY_DIRS})
26
27find_library(WAYLANDPP_CURSOR_LIBRARY NAMES wayland-cursor++
28 PATHS ${PC_WAYLANDPP_LIBRARY_DIRS})
29
30find_library(WAYLANDPP_EGL NAMES wayland-egl++
31 PATHS ${PC_WAYLANDPP_LIBRARY_DIRS})
32
33
22# Promote to cache variables so all code can access it 34# Promote to cache variables so all code can access it
23set(WAYLANDPP_PROTOCOLS_DIR "${PC_WAYLANDPP_PKGDATADIR}/protocols" CACHE INTERNAL "") 35set(WAYLANDPP_PROTOCOLS_DIR "${PC_WAYLANDPP_PKGDATADIR}/protocols" CACHE INTERNAL "")
24 36
@@ -27,13 +39,23 @@ set(WAYLANDPP_PROTOCOLS_DIR "${PC_WAYLANDPP_PKGDATADIR}/protocols" CACHE INTERNA
27find_program(WAYLANDPP_SCANNER wayland-scanner++ PATHS ${PC_WAYLANDPP_SCANNER}) 39find_program(WAYLANDPP_SCANNER wayland-scanner++ PATHS ${PC_WAYLANDPP_SCANNER})
28 40
29include (FindPackageHandleStandardArgs) 41include (FindPackageHandleStandardArgs)
30find_package_handle_standard_args (Waylandpp 42find_package_handle_standard_args(Waylandpp
31 REQUIRED_VARS 43 REQUIRED_VARS WAYLANDPP_INCLUDE_DIR
32 WAYLANDPP_FOUND 44 WAYLANDPP_CLIENT_LIBRARY
33 WAYLANDPP_SCANNER 45 WAYLANDPP_CURSOR_LIBRARY
34 VERSION_VAR 46 WAYLANDPP_EGL
35 WAYLANDPP_wayland-client++_VERSION) 47 WAYLANDPP_SCANNER
36 48 VERSION_VAR WAYLANDPP_wayland-client++_VERSION)
37set(WAYLANDPP_DEFINITIONS -DHAVE_WAYLAND=1) 49
38# Also pass on library directories 50if(WAYLANDPP_FOUND)
39set(WAYLANDPP_LIBRARIES ${WAYLANDPP_LDFLAGS}) 51 set(WAYLANDPP_INCLUDE_DIRS ${WAYLANDPP_INCLUDE_DIR})
52 set(WAYLANDPP_LIBRARIES ${WAYLANDPP_CLIENT_LIBRARY}
53 ${WAYLANDPP_CURSOR_LIBRARY}
54 ${WAYLANDPP_EGL})
55 set(WAYLANDPP_DEFINITIONS -DHAVE_WAYLAND=1)
56endif()
57
58mark_as_advanced(WAYLANDPP_INCLUDE_DIR
59 WAYLANDPP_CLIENT_LIBRARY
60 WAYLANDPP_CURSOR_LIBRARY
61 WAYLANDPP_EGL WAYLANDPP_SCANNER)
diff --git a/cmake/modules/FindX.cmake b/cmake/modules/FindX.cmake
index 19bb770..a52f86f 100644
--- a/cmake/modules/FindX.cmake
+++ b/cmake/modules/FindX.cmake
@@ -3,7 +3,7 @@
3# ----- 3# -----
4# Finds the X11 library 4# Finds the X11 library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# X_FOUND - system has X11 8# X_FOUND - system has X11
9# X_INCLUDE_DIRS - the X11 include directory 9# X_INCLUDE_DIRS - the X11 include directory
diff --git a/cmake/modules/FindXRandR.cmake b/cmake/modules/FindXRandR.cmake
index 9feaedc..12f3478 100644
--- a/cmake/modules/FindXRandR.cmake
+++ b/cmake/modules/FindXRandR.cmake
@@ -3,7 +3,7 @@
3# ---------- 3# ----------
4# Finds the XRandR library 4# Finds the XRandR library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# XRANDR_FOUND - system has XRANDR 8# XRANDR_FOUND - system has XRANDR
9# XRANDR_INCLUDE_DIRS - the XRANDR include directory 9# XRANDR_INCLUDE_DIRS - the XRANDR include directory
diff --git a/cmake/modules/FindXSLT.cmake b/cmake/modules/FindXSLT.cmake
index f7fea9e..3637214 100644
--- a/cmake/modules/FindXSLT.cmake
+++ b/cmake/modules/FindXSLT.cmake
@@ -3,7 +3,7 @@
3# -------- 3# --------
4# Finds the XSLT library 4# Finds the XSLT library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# XSLT_FOUND - system has XSLT 8# XSLT_FOUND - system has XSLT
9# XSLT_INCLUDE_DIRS - the XSLT include directory 9# XSLT_INCLUDE_DIRS - the XSLT include directory
diff --git a/cmake/modules/FindXkbcommon.cmake b/cmake/modules/FindXkbcommon.cmake
index 2a84fe5..40cbb31 100644
--- a/cmake/modules/FindXkbcommon.cmake
+++ b/cmake/modules/FindXkbcommon.cmake
@@ -2,20 +2,39 @@
2# ----------- 2# -----------
3# Finds the libxkbcommon library 3# Finds the libxkbcommon library
4# 4#
5# This will will define the following variables:: 5# This will define the following variables::
6# 6#
7# XKBCOMMON_FOUND - the system has libxkbcommon 7# XKBCOMMON_FOUND - the system has libxkbcommon
8# XKBCOMMON_INCLUDE_DIRS - the libxkbcommon include directory 8# XKBCOMMON_INCLUDE_DIRS - the libxkbcommon include directory
9# XKBCOMMON_LIBRARIES - the libxkbcommon libraries 9# XKBCOMMON_LIBRARIES - the libxkbcommon libraries
10# XKBCOMMON_DEFINITIONS - the libxkbcommon definitions
11 10
12pkg_check_modules (XKBCOMMON xkbcommon) 11if(PKG_CONFIG_FOUND)
12 pkg_check_modules(PC_XKBCOMMON xkbcommon QUIET)
13endif()
13 14
14include (FindPackageHandleStandardArgs)
15find_package_handle_standard_args (Xkbcommon
16 REQUIRED_VARS
17 XKBCOMMON_FOUND)
18 15
19set(XKBCOMMON_DEFINITIONS -DHAVE_XKBCOMMON=1) 16find_path(XKBCOMMON_INCLUDE_DIR NAMES xkbcommon/xkbcommon.h
20set(XKBCOMMON_LIBRARIES ${XKBCOMMON_LDFLAGS}) 17 PATHS ${PC_XKBCOMMON_INCLUDEDIR})
21set(XKBCOMMON_INCLUDE_DIRS ${XKBCOMMON_INCLUDEDIR}) 18find_library(XKBCOMMON_LIBRARY NAMES xkbcommon
19 PATHS ${PC_XKBCOMMON_LIBDIR})
20
21set(XKBCOMMON_VERSION ${PC_XKBCOMMON_VERSION})
22
23include(FindPackageHandleStandardArgs)
24find_package_handle_standard_args(Xkbcommon
25 REQUIRED_VARS XKBCOMMON_LIBRARY XKBCOMMON_INCLUDE_DIR
26 VERSION_VAR XKBCOMMON_VERSION)
27
28if(XKBCOMMON_FOUND)
29 set(XKBCOMMON_INCLUDE_DIRS ${XKBCOMMON_INCLUDE_DIR})
30 set(XKBCOMMON_LIBRARIES ${XKBCOMMON_LIBRARY})
31
32 if(NOT TARGET XKBCOMMON::XKBCOMMON)
33 add_library(XKBCOMMON::XKBCOMMON UNKNOWN IMPORTED)
34 set_target_properties(XKBCOMMON::XKBCOMMON PROPERTIES
35 IMPORTED_LOCATION "${XKBCOMMON_LIBRARY}"
36 INTERFACE_INCLUDE_DIRECTORIES "${XKBCOMMON_INCLUDE_DIR}")
37 endif()
38endif()
39
40mark_as_advanced(XKBCOMMON_INCLUDE_DIR XKBCOMMON_LIBRARY)
diff --git a/cmake/modules/FindYajl.cmake b/cmake/modules/FindYajl.cmake
index c73a67b..d8793e6 100644
--- a/cmake/modules/FindYajl.cmake
+++ b/cmake/modules/FindYajl.cmake
@@ -3,7 +3,7 @@
3# -------- 3# --------
4# Finds the Yajl library 4# Finds the Yajl library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# YAJL_FOUND - system has Yajl 8# YAJL_FOUND - system has Yajl
9# YAJL_INCLUDE_DIRS - Yajl include directory 9# YAJL_INCLUDE_DIRS - Yajl include directory
diff --git a/cmake/modules/FindZip.cmake b/cmake/modules/FindZip.cmake
index ecac262..6ddf478 100644
--- a/cmake/modules/FindZip.cmake
+++ b/cmake/modules/FindZip.cmake
@@ -3,7 +3,7 @@
3# ----------- 3# -----------
4# Finds the Zip library 4# Finds the Zip library
5# 5#
6# This will will define the following variables:: 6# This will define the following variables::
7# 7#
8# ZIP_FOUND - system has Zip 8# ZIP_FOUND - system has Zip
9# ZIP_INCLUDE_DIRS - the Zip include directory 9# ZIP_INCLUDE_DIRS - the Zip include directory
diff --git a/cmake/modules/Findfstrcmp.cmake b/cmake/modules/Findfstrcmp.cmake
new file mode 100644
index 0000000..f0c15d3
--- /dev/null
+++ b/cmake/modules/Findfstrcmp.cmake
@@ -0,0 +1,80 @@
1#.rst:
2# Findfstrcmp
3# --------
4# Finds the fstrcmp library
5#
6# This will define the following variables::
7#
8# FSTRCMP_FOUND - system has libfstrcmp
9# FSTRCMP_INCLUDE_DIRS - the libfstrcmp include directory
10# FSTRCMP_LIBRARIES - the libfstrcmp libraries
11#
12
13if(ENABLE_INTERNAL_FSTRCMP)
14 include(ExternalProject)
15 file(STRINGS ${CMAKE_SOURCE_DIR}/tools/depends/target/libfstrcmp/Makefile VER)
16 string(REGEX MATCH "VERSION=[^ ]*" FSTRCMP_VER "${VER}")
17 list(GET FSTRCMP_VER 0 FSTRCMP_VER)
18 string(SUBSTRING "${FSTRCMP_VER}" 8 -1 FSTRCMP_VER)
19
20 # allow user to override the download URL with a local tarball
21 # needed for offline build envs
22 if(FSTRCMP_URL)
23 get_filename_component(FSTRCMP_URL "${FSTRCMP_URL}" ABSOLUTE)
24 else()
25 set(FSTRCMP_URL http://mirrors.kodi.tv/build-deps/sources/fstrcmp-${FSTRCMP_VER}.tar.gz)
26 endif()
27 if(VERBOSE)
28 message(STATUS "FSTRCMPURL: ${FSTRCMP_URL}")
29 endif()
30
31 set(FSTRCMP_LIBRARY ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/libfstrcmp.a)
32 set(FSTRCMP_INCLUDE_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/include)
33 externalproject_add(fstrcmp
34 URL ${FSTRCMP_URL}
35 DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download
36 PREFIX ${CORE_BUILD_DIR}/fstrcmp
37 CONFIGURE_COMMAND autoreconf -vif && ./configure --prefix ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}
38 BUILD_BYPRODUCTS ${FSTRCMP_LIBRARY}
39 BUILD_IN_SOURCE 1)
40 set_target_properties(fstrcmp PROPERTIES FOLDER "External Projects")
41
42 include(FindPackageHandleStandardArgs)
43 find_package_handle_standard_args(fstrcmp
44 REQUIRED_VARS FSTRCMP_LIBRARY FSTRCMP_INCLUDE_DIR
45 VERSION_VAR FSTRCMP_VER)
46
47 set(FSTRCMP_LIBRARIES -Wl,-Bstatic ${FSTRCMP_LIBRARY} -Wl,-Bdynamic)
48 set(FSTRCMP_INCLUDE_DIRS ${FSTRCMP_INCLUDE_DIR})
49else()
50 if(PKG_CONFIG_FOUND)
51 pkg_check_modules(PC_FSTRCMP fstrcmp QUIET)
52 endif()
53
54 find_path(FSTRCMP_INCLUDE_DIR NAMES fstrcmp.h
55 PATHS ${PC_FSTRCMP_INCLUDEDIR})
56
57 find_library(FSTRCMP_LIBRARY NAMES fstrcmp
58 PATHS ${PC_FSTRCMP_LIBDIR})
59
60 set(FSTRCMP_VERSION ${PC_FSTRCMP_VERSION})
61
62 include(FindPackageHandleStandardArgs)
63 find_package_handle_standard_args(fstrcmp
64 REQUIRED_VARS FSTRCMP_LIBRARY FSTRCMP_INCLUDE_DIR
65 VERSION_VAR FSTRCMP_VERSION)
66
67 if(FSTRCMP_FOUND)
68 set(FSTRCMP_INCLUDE_DIRS ${FSTRCMP_INCLUDE_DIR})
69 set(FSTRCMP_LIBRARIES ${FSTRCMP_LIBRARY})
70 endif()
71
72 if(NOT TARGET fstrcmp)
73 add_library(fstrcmp UNKNOWN IMPORTED)
74 set_target_properties(fstrcmp PROPERTIES
75 IMPORTED_LOCATION "${FSTRCMP_LIBRARY}"
76 INTERFACE_INCLUDE_DIRECTORIES "${FSTRCMP_INCLUDE_DIR}")
77 endif()
78endif()
79
80mark_as_advanced(FSTRCMP_INCLUDE_DIR FSTRCMP_LIBRARY)
diff --git a/cmake/platform/freebsd/gbm.cmake b/cmake/platform/freebsd/gbm.cmake
new file mode 100644
index 0000000..b273a06
--- /dev/null
+++ b/cmake/platform/freebsd/gbm.cmake
@@ -0,0 +1 @@
include(cmake/platform/linux/gbm.cmake)
diff --git a/cmake/platform/freebsd/rbpi.cmake b/cmake/platform/freebsd/rbpi.cmake
new file mode 100644
index 0000000..f095693
--- /dev/null
+++ b/cmake/platform/freebsd/rbpi.cmake
@@ -0,0 +1 @@
include(cmake/platform/linux/rbpi.cmake)
diff --git a/cmake/platform/linux/aml.cmake b/cmake/platform/linux/aml.cmake
index 82e242b..a151226 100644
--- a/cmake/platform/linux/aml.cmake
+++ b/cmake/platform/linux/aml.cmake
@@ -1,3 +1,3 @@
1set(PLATFORM_REQUIRED_DEPS OpenGLES AML EGL) 1set(PLATFORM_REQUIRED_DEPS OpenGLES AML EGL LibInput Xkbcommon)
2set(APP_RENDER_SYSTEM gles) 2set(APP_RENDER_SYSTEM gles)
3list(APPEND PLATFORM_DEFINES -DMESA_EGL_NO_X11_HEADERS) 3list(APPEND PLATFORM_DEFINES -DMESA_EGL_NO_X11_HEADERS)
diff --git a/cmake/platform/linux/gbm.cmake b/cmake/platform/linux/gbm.cmake
index d8e73d0..e5b44ad 100644
--- a/cmake/platform/linux/gbm.cmake
+++ b/cmake/platform/linux/gbm.cmake
@@ -1,4 +1,17 @@
1set(PLATFORM_REQUIRED_DEPS OpenGLES EGL GBM LibDRM) 1set(PLATFORM_REQUIRED_DEPS EGL GBM LibDRM LibInput Xkbcommon)
2set(PLATFORM_OPTIONAL_DEPS VAAPI) 2set(PLATFORM_OPTIONAL_DEPS VAAPI)
3set(APP_RENDER_SYSTEM gles) 3
4list(APPEND PLATFORM_DEFINES -DMESA_EGL_NO_X11_HEADERS -DPLATFORM_SETTINGS_FILE=gbm.xml) 4set(GBM_RENDER_SYSTEM "" CACHE STRING "Render system to use with GBM: \"gl\" or \"gles\"")
5
6if(GBM_RENDER_SYSTEM STREQUAL "gl")
7 list(APPEND PLATFORM_REQUIRED_DEPS OpenGl)
8 set(APP_RENDER_SYSTEM gl)
9elseif(GBM_RENDER_SYSTEM STREQUAL "gles")
10 list(APPEND PLATFORM_REQUIRED_DEPS OpenGLES)
11 set(APP_RENDER_SYSTEM gles)
12else()
13 message(SEND_ERROR "You need to decide whether you want to use GL- or GLES-based rendering in combination with the GBM windowing system. Please set GBM_RENDER_SYSTEM to either \"gl\" or \"gles\". For normal desktop systems, you will usually want to use \"gl\".")
14endif()
15
16# __GBM__ is needed by eglplatform.h in case it is included before gbm.h
17list(APPEND PLATFORM_DEFINES -DMESA_EGL_NO_X11_HEADERS -D__GBM__=1 -DPLATFORM_SETTINGS_FILE=gbm.xml)
diff --git a/cmake/platform/linux/mir.cmake b/cmake/platform/linux/mir.cmake
deleted file mode 100644
index 0e672a9..0000000
--- a/cmake/platform/linux/mir.cmake
+++ /dev/null
@@ -1,3 +0,0 @@
1set(PLATFORM_REQUIRED_DEPS OpenGl EGL Mir LibDRM)
2set(PLATFORM_OPTIONAL_DEPS VAAPI OpenGLES)
3set(APP_RENDER_SYSTEM gl)
diff --git a/cmake/platform/linux/rbpi.cmake b/cmake/platform/linux/rbpi.cmake
index fa9a1dc..3dde57d 100644
--- a/cmake/platform/linux/rbpi.cmake
+++ b/cmake/platform/linux/rbpi.cmake
@@ -1,3 +1,3 @@
1set(PLATFORM_REQUIRED_DEPS OpenGLES EGL MMAL) 1set(PLATFORM_REQUIRED_DEPS OpenGLES EGL MMAL LibInput Xkbcommon)
2set(APP_RENDER_SYSTEM gles) 2set(APP_RENDER_SYSTEM gles)
3list(APPEND PLATFORM_DEFINES -D_ARMEL -DTARGET_RASPBERRY_PI) 3list(APPEND PLATFORM_DEFINES -D_ARMEL -DTARGET_RASPBERRY_PI)
diff --git a/cmake/platform/linux/wayland.cmake b/cmake/platform/linux/wayland.cmake
index f42dbf5..97cff67 100644
--- a/cmake/platform/linux/wayland.cmake
+++ b/cmake/platform/linux/wayland.cmake
@@ -15,5 +15,7 @@ endif()
15 15
16set(PLATFORM_GLOBAL_TARGET_DEPS generate-wayland-extra-protocols) 16set(PLATFORM_GLOBAL_TARGET_DEPS generate-wayland-extra-protocols)
17set(WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR "${CMAKE_CURRENT_BINARY_DIR}") 17set(WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR "${CMAKE_CURRENT_BINARY_DIR}")
18# WL_EGL_PLATFORM is needed by eglplatform.h in case it is included before wayland-egl.h
19list(APPEND PLATFORM_DEFINES -DWL_EGL_PLATFORM=1 -DPLATFORM_SETTINGS_FILE=wayland.xml)
18# for wayland-extra-protocols.hpp 20# for wayland-extra-protocols.hpp
19include_directories("${WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR}") 21include_directories("${WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR}")
diff --git a/cmake/platform/linux/x11.cmake b/cmake/platform/linux/x11.cmake
index 09cebde..72d9640 100644
--- a/cmake/platform/linux/x11.cmake
+++ b/cmake/platform/linux/x11.cmake
@@ -1,3 +1,4 @@
1set(PLATFORM_REQUIRED_DEPS OpenGl EGL X XRandR LibDRM) 1set(PLATFORM_REQUIRED_DEPS OpenGl EGL X XRandR LibDRM)
2set(PLATFORM_OPTIONAL_DEPS VAAPI VDPAU GLX) 2set(PLATFORM_OPTIONAL_DEPS VAAPI VDPAU GLX)
3set(APP_RENDER_SYSTEM gl) 3set(APP_RENDER_SYSTEM gl)
4list(APPEND PLATFORM_DEFINES -DPLATFORM_SETTINGS_FILE=x11.xml) \ No newline at end of file
diff --git a/cmake/scripts/android/Install.cmake b/cmake/scripts/android/Install.cmake
index cc53607..a0fa155 100644
--- a/cmake/scripts/android/Install.cmake
+++ b/cmake/scripts/android/Install.cmake
@@ -151,6 +151,8 @@ foreach(lib IN LISTS required_dyload dyload_optional ITEMS Shairplay)
151 add_bundle_file(${DEPENDS_PATH}/lib/${lib_so} ${libdir} "") 151 add_bundle_file(${DEPENDS_PATH}/lib/${lib_so} ${libdir} "")
152 endif() 152 endif()
153endforeach() 153endforeach()
154add_bundle_file(${ASS_LIBRARY} ${libdir} "")
155add_bundle_file(${BLURAY_LIBRARY} ${libdir} "")
154add_bundle_file(${SMBCLIENT_LIBRARY} ${libdir} "") 156add_bundle_file(${SMBCLIENT_LIBRARY} ${libdir} "")
155 157
156# Main targets from Makefile.in 158# Main targets from Makefile.in
diff --git a/cmake/scripts/common/AddonHelpers.cmake b/cmake/scripts/common/AddonHelpers.cmake
index 5470940..4bb4c98 100644
--- a/cmake/scripts/common/AddonHelpers.cmake
+++ b/cmake/scripts/common/AddonHelpers.cmake
@@ -1,9 +1,9 @@
1# Workaround for the fact that cpack's filenames are not customizable. 1# Workaround for the fact that cpack's filenames are not customizable.
2# Each add-on is added as a separate component to facilitate zip/tgz packaging. 2# Each add-on is added as a separate component to facilitate zip/tgz packaging.
3# The filenames are always of the form basename-component, which is 3# The filenames are always of the form basename-component, which is
4# incompatible with the addonid-version scheme we want. This hack renames 4# incompatible with the addonid-version scheme we want. This hack renames
5# the files from the file names generated by the 'package' target. 5# the files from the file names generated by the 'package' target.
6# Sadly we cannot extend the 'package' target, as it is a builtin target, see 6# Sadly we cannot extend the 'package' target, as it is a builtin target, see
7# http://public.kitware.com/Bug/view.php?id=8438 7# http://public.kitware.com/Bug/view.php?id=8438
8# Thus, we have to add an 'addon-package' target. 8# Thus, we have to add an 'addon-package' target.
9get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) 9get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
@@ -32,7 +32,7 @@ macro (addon_version dir prefix)
32 file(READ ${dir}/addon.xml ADDONXML) 32 file(READ ${dir}/addon.xml ADDONXML)
33 endif() 33 endif()
34 34
35 string(REGEX MATCH "<addon[^>]*version.?=.?.[0-9\\.]+" VERSION_STRING ${ADDONXML}) 35 string(REGEX MATCH "<addon[^>]*version.?=.?.[0-9\\.]+" VERSION_STRING ${ADDONXML})
36 string(REGEX REPLACE ".*version=.([0-9\\.]+).*" "\\1" ${prefix}_VERSION ${VERSION_STRING}) 36 string(REGEX REPLACE ".*version=.([0-9\\.]+).*" "\\1" ${prefix}_VERSION ${VERSION_STRING})
37 message(STATUS ${prefix}_VERSION=${${prefix}_VERSION}) 37 message(STATUS ${prefix}_VERSION=${${prefix}_VERSION})
38endmacro() 38endmacro()
@@ -62,7 +62,7 @@ macro (build_addon target prefix libs)
62 # include path name already complete 62 # include path name already complete
63 list(APPEND USED_SOURCES ${${prefix}_HEADERS}) 63 list(APPEND USED_SOURCES ${${prefix}_HEADERS})
64 else() 64 else()
65 # add the complete include path to begin 65 # add the complete include path to begin
66 foreach(hdr_file ${${prefix}_HEADERS}) 66 foreach(hdr_file ${${prefix}_HEADERS})
67 list(APPEND USED_SOURCES ${PROJECT_SOURCE_DIR}/${hdr_file}) 67 list(APPEND USED_SOURCES ${PROJECT_SOURCE_DIR}/${hdr_file})
68 endforeach() 68 endforeach()
@@ -86,19 +86,19 @@ macro (build_addon target prefix libs)
86 # include path name already complete 86 # include path name already complete
87 list(APPEND USED_SOURCES ${${prefix}_SOURCES}) 87 list(APPEND USED_SOURCES ${${prefix}_SOURCES})
88 else() 88 else()
89 # add the complete include path to begin 89 # add the complete include path to begin
90 foreach(src_file ${${prefix}_SOURCES}) 90 foreach(src_file ${${prefix}_SOURCES})
91 list(APPEND USED_SOURCES ${PROJECT_SOURCE_DIR}/${src_file}) 91 list(APPEND USED_SOURCES ${PROJECT_SOURCE_DIR}/${src_file})
92 endforeach() 92 endforeach()
93 endif() 93 endif()
94 94
95 # Set defines used in addon.xml.in and read from versions.h to set add-on 95 # Set defines used in addon.xml.in and read from versions.h to set add-on
96 # version parts automatically 96 # version parts automatically
97 file(STRINGS ${KODI_INCLUDE_DIR}/versions.h BIN_ADDON_PARTS) 97 file(STRINGS ${KODI_INCLUDE_DIR}/versions.h BIN_ADDON_PARTS)
98 foreach(loop_var ${BIN_ADDON_PARTS}) 98 foreach(loop_var ${BIN_ADDON_PARTS})
99 # Only pass strings with "#define ADDON_" from versions.h 99 # Only pass strings with "#define ADDON_" from versions.h
100 if(loop_var MATCHES "#define ADDON_") 100 if(loop_var MATCHES "#define ADDON_")
101 string(REGEX REPLACE "\\\n" " " loop_var ${loop_var}) # remove header line breaks 101 string(REGEX REPLACE "\\\n" " " loop_var ${loop_var}) # remove header line breaks
102 string(REGEX REPLACE "#define " "" loop_var ${loop_var}) # remove the #define name from string 102 string(REGEX REPLACE "#define " "" loop_var ${loop_var}) # remove the #define name from string
103 string(REGEX MATCHALL "[//a-zA-Z0-9._-]+" loop_var "${loop_var}") # separate the define values to a list 103 string(REGEX MATCHALL "[//a-zA-Z0-9._-]+" loop_var "${loop_var}") # separate the define values to a list
104 104
@@ -157,7 +157,8 @@ macro (build_addon target prefix libs)
157 target_link_libraries(${target} ${${libs}}) 157 target_link_libraries(${target} ${${libs}})
158 set_target_properties(${target} PROPERTIES VERSION ${${prefix}_VERSION} 158 set_target_properties(${target} PROPERTIES VERSION ${${prefix}_VERSION}
159 SOVERSION ${APP_VERSION_MAJOR}.${APP_VERSION_MINOR} 159 SOVERSION ${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}
160 PREFIX "") 160 PREFIX ""
161 POSITION_INDEPENDENT_CODE 1)
161 if(OS STREQUAL "android") 162 if(OS STREQUAL "android")
162 set_target_properties(${target} PROPERTIES PREFIX "lib") 163 set_target_properties(${target} PROPERTIES PREFIX "lib")
163 endif() 164 endif()
@@ -384,7 +385,7 @@ if(HAVE_LTO)
384 if(USE_LTO) 385 if(USE_LTO)
385 add_options(ALL_LANGUAGES ALL_BUILDS "-flto") 386 add_options(ALL_LANGUAGES ALL_BUILDS "-flto")
386 endif() 387 endif()
387endif() 388endif()
388 389
389# set this to try linking dependencies as static as possible 390# set this to try linking dependencies as static as possible
390if(ADDONS_PREFER_STATIC_LIBS) 391if(ADDONS_PREFER_STATIC_LIBS)
diff --git a/cmake/scripts/common/ArchSetup.cmake b/cmake/scripts/common/ArchSetup.cmake
index c97929e..4704193 100644
--- a/cmake/scripts/common/ArchSetup.cmake
+++ b/cmake/scripts/common/ArchSetup.cmake
@@ -55,7 +55,7 @@ macro(check_builtin func var)
55endmacro() 55endmacro()
56 56
57 57
58# -------- Main script --------- 58# -------- Main script ---------
59message(STATUS "System type: ${CMAKE_SYSTEM_NAME}") 59message(STATUS "System type: ${CMAKE_SYSTEM_NAME}")
60 60
61if(WITH_CPU) 61if(WITH_CPU)
@@ -157,7 +157,8 @@ if(PLATFORM_DEFINES)
157 add_options(ALL_LANGUAGES ALL_BUILDS ${PLATFORM_DEFINES}) 157 add_options(ALL_LANGUAGES ALL_BUILDS ${PLATFORM_DEFINES})
158endif() 158endif()
159 159
160if(CMAKE_BUILD_TYPE STREQUAL "Debug") 160if(NOT MSVC)
161 add_options (ALL_LANGUAGES DEBUG "-g" "-D_DEBUG" "-Wall") 161 add_options(ALL_LANGUAGES ALL_BUILDS "-Wall")
162 add_options(ALL_LANGUAGES DEBUG "-g" "-D_DEBUG")
162endif() 163endif()
163 164
diff --git a/cmake/scripts/common/CheckTargetPlatform.cmake b/cmake/scripts/common/CheckTargetPlatform.cmake
index 82ee668..526e4bd 100644
--- a/cmake/scripts/common/CheckTargetPlatform.cmake
+++ b/cmake/scripts/common/CheckTargetPlatform.cmake
@@ -9,9 +9,9 @@ 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 12
13 list( LENGTH platforms listlen ) 13 list( LENGTH platforms listlen )
14 if(${listlen} EQUAL 1) 14 if(${listlen} EQUAL 1)
15 string(REPLACE " " ";" platforms ${platforms}) 15 string(REPLACE " " ";" platforms ${platforms})
16 endif() 16 endif()
17 17
diff --git a/cmake/scripts/common/HandleDepends.cmake b/cmake/scripts/common/HandleDepends.cmake
index fb110d6..47f7d9b 100644
--- a/cmake/scripts/common/HandleDepends.cmake
+++ b/cmake/scripts/common/HandleDepends.cmake
@@ -231,9 +231,23 @@ function(add_addon_depends addon searchpath)
231 -DCMAKE_INCLUDE_PATH=${OUTPUT_DIR}/include) 231 -DCMAKE_INCLUDE_PATH=${OUTPUT_DIR}/include)
232 endif() 232 endif()
233 233
234 set(DOWNLOAD_DIR ${BUILD_DIR}/download)
235 if(EXISTS ${dir}/${id}.sha256)
236 file(STRINGS ${dir}/${id}.sha256 sha256sum)
237 list(GET sha256sum 0 sha256sum)
238 set(URL_HASH_COMMAND URL_HASH SHA256=${sha256sum})
239 if(TARBALL_DIR)
240 set(DOWNLOAD_DIR ${TARBALL_DIR})
241 endif()
242 else()
243 unset(URL_HASH_COMMAND)
244 message(AUTHOR_WARNING "${dir}/${id}.sha256 is missing")
245 endif()
246
234 externalproject_add(${id} 247 externalproject_add(${id}
235 URL ${url} 248 URL ${url}
236 DOWNLOAD_DIR ${BUILD_DIR}/download 249 "${URL_HASH_COMMAND}"
250 DOWNLOAD_DIR ${DOWNLOAD_DIR}
237 CONFIGURE_COMMAND ${CONFIGURE_COMMAND} 251 CONFIGURE_COMMAND ${CONFIGURE_COMMAND}
238 "${EXTERNALPROJECT_SETUP}") 252 "${EXTERNALPROJECT_SETUP}")
239 endif() 253 endif()
diff --git a/cmake/scripts/common/Macros.cmake b/cmake/scripts/common/Macros.cmake
index c21069d..0d89dd3 100644
--- a/cmake/scripts/common/Macros.cmake
+++ b/cmake/scripts/common/Macros.cmake
@@ -468,7 +468,7 @@ function(core_optional_dyload_dep)
468 foreach(depspec ${ARGN}) 468 foreach(depspec ${ARGN})
469 set(_required False) 469 set(_required False)
470 split_dependency_specification(${depspec} dep version) 470 split_dependency_specification(${depspec} dep version)
471 setup_enable_switch() 471 setup_enable_switch()
472 if(${enable_switch} STREQUAL AUTO) 472 if(${enable_switch} STREQUAL AUTO)
473 find_package_with_ver(${dep} ${version}) 473 find_package_with_ver(${dep} ${version})
474 elseif(${${enable_switch}}) 474 elseif(${${enable_switch}})
@@ -662,7 +662,11 @@ function(core_find_git_rev stamp)
662 string(REPLACE "\"" "" DATE ${DATE}) 662 string(REPLACE "\"" "" DATE ${DATE})
663 string(REPLACE "-" "" DATE ${DATE}) 663 string(REPLACE "-" "" DATE ${DATE})
664 else() 664 else()
665 string(TIMESTAMP DATE "%Y%m%d" UTC) 665 if(EXISTS ${CMAKE_SOURCE_DIR}/BUILDDATE)
666 file(STRINGS ${CMAKE_SOURCE_DIR}/BUILDDATE DATE LIMIT_INPUT 8)
667 else()
668 string(TIMESTAMP DATE "%Y%m%d" UTC)
669 endif()
666 if(EXISTS ${CMAKE_SOURCE_DIR}/VERSION) 670 if(EXISTS ${CMAKE_SOURCE_DIR}/VERSION)
667 file(STRINGS ${CMAKE_SOURCE_DIR}/VERSION HASH LIMIT_INPUT 16) 671 file(STRINGS ${CMAKE_SOURCE_DIR}/VERSION HASH LIMIT_INPUT 16)
668 else() 672 else()
@@ -687,6 +691,7 @@ endfunction()
687# APP_NAME_UC - uppercased app name 691# APP_NAME_UC - uppercased app name
688# APP_PACKAGE - Android full package name 692# APP_PACKAGE - Android full package name
689# COMPANY_NAME - company name 693# COMPANY_NAME - company name
694# APP_WEBSITE - site url
690# APP_VERSION_MAJOR - the app version major 695# APP_VERSION_MAJOR - the app version major
691# APP_VERSION_MINOR - the app version minor 696# APP_VERSION_MINOR - the app version minor
692# APP_VERSION_TAG - the app version tag 697# APP_VERSION_TAG - the app version tag
@@ -711,7 +716,7 @@ macro(core_find_versions)
711 core_file_read_filtered(version_list ${CORE_SOURCE_DIR}/version.txt) 716 core_file_read_filtered(version_list ${CORE_SOURCE_DIR}/version.txt)
712 core_file_read_filtered(json_version ${CORE_SOURCE_DIR}/xbmc/interfaces/json-rpc/schema/version.txt) 717 core_file_read_filtered(json_version ${CORE_SOURCE_DIR}/xbmc/interfaces/json-rpc/schema/version.txt)
713 string(REGEX REPLACE "([^ ;]*) ([^;]*)" "\\1;\\2" version_list "${version_list};${json_version}") 718 string(REGEX REPLACE "([^ ;]*) ([^;]*)" "\\1;\\2" version_list "${version_list};${json_version}")
714 set(version_props 719 set(version_props
715 ADDON_API 720 ADDON_API
716 APP_NAME 721 APP_NAME
717 APP_PACKAGE 722 APP_PACKAGE
@@ -761,6 +766,9 @@ macro(core_find_versions)
761 # unset variables not used anywhere else 766 # unset variables not used anywhere else
762 unset(version_list) 767 unset(version_list)
763 unset(APP_APP_NAME) 768 unset(APP_APP_NAME)
769 unset(APP_COMPANY_NAME)
770 unset(APP_APP_PACKAGE)
771 unset(APP_JSONRPC_VERSION)
764 unset(BIN_ADDON_PARTS) 772 unset(BIN_ADDON_PARTS)
765 773
766 # bail if we can't parse version.txt 774 # bail if we can't parse version.txt
diff --git a/cmake/scripts/common/ProjectMacros.cmake b/cmake/scripts/common/ProjectMacros.cmake
index 641e047..fba5252 100644
--- a/cmake/scripts/common/ProjectMacros.cmake
+++ b/cmake/scripts/common/ProjectMacros.cmake
@@ -46,7 +46,7 @@ function(copy_skin_to_buildtree skin)
46endfunction() 46endfunction()
47 47
48# Get GTest tests as CMake tests. 48# Get GTest tests as CMake tests.
49# Copied from FindGTest.cmake 49# Copied from FindGTest.cmake
50# Thanks to Daniel Blezek <blezek@gmail.com> for the GTEST_ADD_TESTS code 50# Thanks to Daniel Blezek <blezek@gmail.com> for the GTEST_ADD_TESTS code
51function(GTEST_ADD_TESTS executable extra_args) 51function(GTEST_ADD_TESTS executable extra_args)
52 if(NOT ARGN) 52 if(NOT ARGN)
diff --git a/cmake/scripts/freebsd/ArchSetup.cmake b/cmake/scripts/freebsd/ArchSetup.cmake
index db11bf8..3d5599c 100644
--- a/cmake/scripts/freebsd/ArchSetup.cmake
+++ b/cmake/scripts/freebsd/ArchSetup.cmake
@@ -10,6 +10,15 @@ else()
10 set(ARCH x86_64-freebsd) 10 set(ARCH x86_64-freebsd)
11 elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i.86") 11 elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i.86")
12 set(ARCH x86-freebsd) 12 set(ARCH x86-freebsd)
13 elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL armv6)
14 set(ARCH armv6-freebsd)
15 set(NEON True)
16 elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL armv7)
17 set(ARCH armv7-freebsd)
18 set(NEON True)
19 elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64)
20 set(ARCH aarch64-freebsd)
21 set(NEON True)
13 else() 22 else()
14 message(WARNING "unknown CPU: ${CPU}") 23 message(WARNING "unknown CPU: ${CPU}")
15 endif() 24 endif()
diff --git a/cmake/scripts/freebsd/ExtraTargets.cmake b/cmake/scripts/freebsd/ExtraTargets.cmake
index 66383ab..9d5d214 100644
--- a/cmake/scripts/freebsd/ExtraTargets.cmake
+++ b/cmake/scripts/freebsd/ExtraTargets.cmake
@@ -1,29 +1 @@
1# xrandr include(cmake/scripts/linux/ExtraTargets.cmake)
2if(X_FOUND AND XRANDR_FOUND)
3 find_package(X QUIET)
4 find_package(XRandR QUIET)
5 add_executable(${APP_NAME_LC}-xrandr ${CMAKE_SOURCE_DIR}/xbmc-xrandr.c)
6 target_link_libraries(${APP_NAME_LC}-xrandr ${SYSTEM_LDFLAGS} ${X_LIBRARIES} m ${XRANDR_LIBRARIES})
7endif()
8
9# WiiRemote
10if(ENABLE_EVENTCLIENTS AND BLUETOOTH_FOUND)
11 find_package(CWiid QUIET)
12 if(CWIID_FOUND)
13 add_subdirectory(${CMAKE_SOURCE_DIR}/tools/EventClients/Clients/WiiRemote build/WiiRemote)
14 endif()
15endif()
16
17if(CORE_PLATFORM_NAME_LC STREQUAL "wayland")
18 # This cannot go into wayland.cmake since it requires the Wayland dependencies
19 # to already be resolved
20 set(PROTOCOL_XMLS "${WAYLAND_PROTOCOLS_DIR}/unstable/xdg-shell/xdg-shell-unstable-v6.xml"
21 "${WAYLAND_PROTOCOLS_DIR}/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml")
22 add_custom_command(OUTPUT "${WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR}/wayland-extra-protocols.hpp" "${WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR}/wayland-extra-protocols.cpp"
23 COMMAND "${WAYLANDPP_SCANNER}" ${PROTOCOL_XMLS} "${WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR}/wayland-extra-protocols.hpp" "${WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR}/wayland-extra-protocols.cpp"
24 DEPENDS "${WAYLANDPP_SCANNER}" ${PROTOCOL_XMLS}
25 COMMENT "Generating wayland-protocols C++ wrappers")
26
27 # Dummy target for dependencies
28 add_custom_target(generate-wayland-extra-protocols DEPENDS wayland-extra-protocols.hpp)
29endif()
diff --git a/cmake/scripts/freebsd/Macros.cmake b/cmake/scripts/freebsd/Macros.cmake
index 2fdbb25..ef5aed3 120000..100644
--- a/cmake/scripts/freebsd/Macros.cmake
+++ b/cmake/scripts/freebsd/Macros.cmake
@@ -1 +1,95 @@
1../linux/Macros.cmake \ No newline at end of file 1function(core_link_library lib wraplib)
2 set(export -Wl,--unresolved-symbols=ignore-all
3 `cat ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/cores/dll-loader/exports/wrapper.def`
4 ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/cores/dll-loader/exports/CMakeFiles/wrapper.dir/wrapper.c.o)
5 set(check_arg "")
6 if(TARGET ${lib})
7 set(target ${lib})
8 set(link_lib $<TARGET_FILE:${lib}>)
9 set(check_arg ${ARGV2})
10 set(data_arg ${ARGV3})
11 else()
12 set(target ${ARGV2})
13 set(link_lib ${lib})
14 set(check_arg ${ARGV3})
15 set(data_arg ${ARGV4})
16 endif()
17
18 # wrapper has to be adapted in order to support coverage.
19 if(CMAKE_BUILD_TYPE STREQUAL Coverage)
20 set(export "")
21 endif()
22
23 if(check_arg STREQUAL export)
24 set(export ${export}
25 -Wl,--version-script=${ARGV3})
26 elseif(check_arg STREQUAL extras)
27 foreach(arg ${data_arg})
28 list(APPEND export ${arg})
29 endforeach()
30 elseif(check_arg STREQUAL archives)
31 set(extra_libs ${data_arg})
32 endif()
33
34 string(REGEX REPLACE "[ ]+" ";" _flags "${CMAKE_SHARED_LINKER_FLAGS}")
35 get_filename_component(dir ${wraplib} DIRECTORY)
36 add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${wraplib}-${ARCH}${CMAKE_SHARED_MODULE_SUFFIX}
37 COMMAND ${CMAKE_COMMAND} -E make_directory ${dir}
38 COMMAND ${CMAKE_C_COMPILER}
39 ARGS ${_flags} -Wl,--whole-archive
40 "${link_lib}" ${extra_libs}
41 -Wl,--no-whole-archive -lm
42 -Wl,-soname,${wraplib}-${ARCH}${CMAKE_SHARED_MODULE_SUFFIX}
43 -shared -o ${CMAKE_BINARY_DIR}/${wraplib}-${ARCH}${CMAKE_SHARED_MODULE_SUFFIX}
44 ${export}
45 DEPENDS ${target} wrapper.def wrapper)
46
47 get_filename_component(libname ${wraplib} NAME_WE)
48 add_custom_target(wrap_${libname} ALL DEPENDS ${CMAKE_BINARY_DIR}/${wraplib}-${ARCH}${CMAKE_SHARED_MODULE_SUFFIX})
49 set_target_properties(wrap_${libname} PROPERTIES FOLDER lib/wrapped)
50 add_dependencies(${APP_NAME_LC}-libraries wrap_${libname})
51
52 set(LIBRARY_FILES ${LIBRARY_FILES} ${CMAKE_BINARY_DIR}/${wraplib}-${ARCH}${CMAKE_SHARED_MODULE_SUFFIX} CACHE STRING "" FORCE)
53endfunction()
54
55function(find_soname lib)
56 cmake_parse_arguments(arg "REQUIRED" "" "" ${ARGN})
57
58 string(TOLOWER ${lib} liblow)
59 if(${lib}_LDFLAGS)
60 set(link_lib "${${lib}_LDFLAGS}")
61 else()
62 if(IS_ABSOLUTE "${${lib}_LIBRARIES}")
63 set(link_lib "${${lib}_LIBRARIES}")
64 else()
65 set(link_lib -l${${lib}_LIBRARIES})
66 endif()
67 endif()
68 execute_process(COMMAND ${CMAKE_C_COMPILER} -nostdlib -o /dev/null -Wl,-M ${link_lib}
69 COMMAND grep LOAD.*${liblow}
70 ERROR_QUIET
71 OUTPUT_VARIABLE ${lib}_FILENAME)
72 string(REPLACE "LOAD " "" ${lib}_FILENAME "${${lib}_FILENAME}")
73 string(STRIP "${${lib}_FILENAME}" ${lib}_FILENAME)
74 if(NOT ${lib}_FILENAME)
75 execute_process(COMMAND ${CMAKE_C_COMPILER} -nostdlib -o /dev/null -Wl,-t ${link_lib}
76 ERROR_QUIET
77 OUTPUT_VARIABLE _TMP_FILENAME)
78 string(REGEX MATCH ".*lib${liblow}.so" ${lib}_FILENAME ${_TMP_FILENAME})
79 endif()
80 if(${lib}_FILENAME)
81 execute_process(COMMAND ${CMAKE_OBJDUMP} -p ${${lib}_FILENAME}
82 COMMAND grep SONAME.*${liblow}
83 ERROR_QUIET
84 OUTPUT_VARIABLE ${lib}_SONAME)
85 string(REPLACE "SONAME " "" ${lib}_SONAME ${${lib}_SONAME})
86 string(STRIP ${${lib}_SONAME} ${lib}_SONAME)
87 if(VERBOSE)
88 message(STATUS "${lib} soname: ${${lib}_SONAME}")
89 endif()
90 set(${lib}_SONAME ${${lib}_SONAME} PARENT_SCOPE)
91 endif()
92 if(arg_REQUIRED AND NOT ${lib}_SONAME)
93 message(FATAL_ERROR "Could not find dynamically loadable library ${lib}")
94 endif()
95endfunction()
diff --git a/cmake/scripts/ios/Install.cmake b/cmake/scripts/ios/Install.cmake
index 587b24f..7b6c3de 100644
--- a/cmake/scripts/ios/Install.cmake
+++ b/cmake/scripts/ios/Install.cmake
@@ -66,7 +66,8 @@ add_custom_command(TARGET ${APP_NAME_LC} POST_BUILD
66 "WRAPPER_EXTENSION=app" 66 "WRAPPER_EXTENSION=app"
67 "SRCROOT=${CMAKE_BINARY_DIR}" 67 "SRCROOT=${CMAKE_BINARY_DIR}"
68 ${CMAKE_SOURCE_DIR}/tools/darwin/Support/copyframeworks-ios.command 68 ${CMAKE_SOURCE_DIR}/tools/darwin/Support/copyframeworks-ios.command
69 COMMAND "NATIVEPREFIX=${NATIVEPREFIX}" 69 COMMAND "XBMC_DEPENDS=${DEPENDS_PATH}"
70 "NATIVEPREFIX=${NATIVEPREFIX}"
70 "PLATFORM_NAME=${PLATFORM}" 71 "PLATFORM_NAME=${PLATFORM}"
71 "CODESIGNING_FOLDER_PATH=$<TARGET_FILE_DIR:${APP_NAME_LC}>" 72 "CODESIGNING_FOLDER_PATH=$<TARGET_FILE_DIR:${APP_NAME_LC}>"
72 "BUILT_PRODUCTS_DIR=$<TARGET_FILE_DIR:${APP_NAME_LC}>/.." 73 "BUILT_PRODUCTS_DIR=$<TARGET_FILE_DIR:${APP_NAME_LC}>/.."
diff --git a/cmake/scripts/linux/ArchSetup.cmake b/cmake/scripts/linux/ArchSetup.cmake
index fcee675..624edf6 100644
--- a/cmake/scripts/linux/ArchSetup.cmake
+++ b/cmake/scripts/linux/ArchSetup.cmake
@@ -108,10 +108,6 @@ if(CMAKE_BUILD_TYPE STREQUAL Coverage)
108 set(COVERAGE_EXCLUDES */test/* lib/* */lib/*) 108 set(COVERAGE_EXCLUDES */test/* lib/* */lib/*)
109endif() 109endif()
110 110
111if(ENABLE_MIR)
112 set(ENABLE_VDPAU OFF CACHE BOOL "Disabling VDPAU since no Mir support" FORCE)
113endif()
114
115if(ENABLE_GBM) 111if(ENABLE_GBM)
116 set(ENABLE_VDPAU OFF CACHE BOOL "Disabling VDPAU" FORCE) 112 set(ENABLE_VDPAU OFF CACHE BOOL "Disabling VDPAU" FORCE)
117endif() 113endif()
diff --git a/cmake/scripts/linux/Install.cmake b/cmake/scripts/linux/Install.cmake
index d6767bf..d64b98a 100644
--- a/cmake/scripts/linux/Install.cmake
+++ b/cmake/scripts/linux/Install.cmake
@@ -127,11 +127,17 @@ install(FILES ${CMAKE_SOURCE_DIR}/tools/Linux/packaging/media/icon256x256.png
127 DESTINATION ${datarootdir}/icons/hicolor/256x256/apps 127 DESTINATION ${datarootdir}/icons/hicolor/256x256/apps
128 COMPONENT kodi) 128 COMPONENT kodi)
129 129
130# Install firewalld service definitions
131install(FILES ${CMAKE_SOURCE_DIR}/tools/Linux/firewalld-services/kodi-eventserver.xml
132 ${CMAKE_SOURCE_DIR}/tools/Linux/firewalld-services/kodi-http.xml
133 ${CMAKE_SOURCE_DIR}/tools/Linux/firewalld-services/kodi-jsonrpc.xml
134 DESTINATION ${prefix}/lib/firewalld/services
135 COMPONENT kodi)
136
130# Install docs 137# Install docs
131install(FILES ${CMAKE_SOURCE_DIR}/copying.txt 138install(FILES ${CMAKE_SOURCE_DIR}/LICENSE.md
132 ${CMAKE_SOURCE_DIR}/LICENSE.GPL
133 ${CMAKE_SOURCE_DIR}/version.txt 139 ${CMAKE_SOURCE_DIR}/version.txt
134 ${CMAKE_SOURCE_DIR}/docs/README.linux 140 ${CMAKE_SOURCE_DIR}/docs/README.Linux.md
135 DESTINATION ${docdir} 141 DESTINATION ${docdir}
136 COMPONENT kodi) 142 COMPONENT kodi)
137 143
@@ -197,7 +203,7 @@ if(ENABLE_EVENTCLIENTS)
197 file(WRITE ${CMAKE_BINARY_DIR}/packages/deb/defs.py ICON_PATH="usr/share/pixmaps/${APP_NAME_LC}/") 203 file(WRITE ${CMAKE_BINARY_DIR}/packages/deb/defs.py ICON_PATH="usr/share/pixmaps/${APP_NAME_LC}/")
198 install(PROGRAMS ${CMAKE_BINARY_DIR}/packages/deb/defs.py 204 install(PROGRAMS ${CMAKE_BINARY_DIR}/packages/deb/defs.py
199 ${CMAKE_SOURCE_DIR}/tools/EventClients/lib/python/__init__.py 205 ${CMAKE_SOURCE_DIR}/tools/EventClients/lib/python/__init__.py
200 "${CMAKE_SOURCE_DIR}/tools/EventClients/Clients/PS3 BD Remote/ps3_remote.py" 206 ${CMAKE_SOURCE_DIR}/tools/EventClients/Clients/PS3BDRemote/ps3_remote.py
201 ${CMAKE_SOURCE_DIR}/tools/EventClients/lib/python/xbmcclient.py 207 ${CMAKE_SOURCE_DIR}/tools/EventClients/lib/python/xbmcclient.py
202 ${CMAKE_SOURCE_DIR}/tools/EventClients/lib/python/zeroconf.py 208 ${CMAKE_SOURCE_DIR}/tools/EventClients/lib/python/zeroconf.py
203 DESTINATION ${PYTHON_LIB_PATH}/${APP_NAME_LC} 209 DESTINATION ${PYTHON_LIB_PATH}/${APP_NAME_LC}
@@ -246,7 +252,7 @@ if(ENABLE_EVENTCLIENTS)
246 COMPONENT kodi-eventclients-dev) 252 COMPONENT kodi-eventclients-dev)
247 253
248 # Install kodi-eventclients-ps3 254 # Install kodi-eventclients-ps3
249 install(PROGRAMS "${CMAKE_SOURCE_DIR}/tools/EventClients/Clients/PS3 BD Remote/ps3_remote.py" 255 install(PROGRAMS ${CMAKE_SOURCE_DIR}/tools/EventClients/Clients/PS3BDRemote/ps3_remote.py
250 RENAME ${APP_NAME_LC}-ps3remote 256 RENAME ${APP_NAME_LC}-ps3remote
251 DESTINATION ${bindir} 257 DESTINATION ${bindir}
252 COMPONENT kodi-eventclients-ps3) 258 COMPONENT kodi-eventclients-ps3)
@@ -259,7 +265,7 @@ if(ENABLE_EVENTCLIENTS)
259 endif() 265 endif()
260 266
261 # Install kodi-eventclients-xbmc-send 267 # Install kodi-eventclients-xbmc-send
262 install(PROGRAMS "${CMAKE_SOURCE_DIR}/tools/EventClients/Clients/Kodi Send/kodi-send.py" 268 install(PROGRAMS ${CMAKE_SOURCE_DIR}/tools/EventClients/Clients/KodiSend/kodi-send.py
263 RENAME ${APP_NAME_LC}-send 269 RENAME ${APP_NAME_LC}-send
264 DESTINATION ${bindir} 270 DESTINATION ${bindir}
265 COMPONENT kodi-eventclients-xbmc-send) 271 COMPONENT kodi-eventclients-xbmc-send)
diff --git a/cmake/scripts/linux/Macros.cmake b/cmake/scripts/linux/Macros.cmake
index 9e8ebe6..37243a7 100644
--- a/cmake/scripts/linux/Macros.cmake
+++ b/cmake/scripts/linux/Macros.cmake
@@ -65,7 +65,7 @@ function(find_soname lib)
65 set(link_lib -l${${lib}_LIBRARIES}) 65 set(link_lib -l${${lib}_LIBRARIES})
66 endif() 66 endif()
67 endif() 67 endif()
68 execute_process(COMMAND ${CMAKE_C_COMPILER} -nostdlib -o /dev/null -Wl,-M ${link_lib} 68 execute_process(COMMAND ${CMAKE_C_COMPILER} -nostdlib -o /dev/null -Wl,-M ${link_lib}
69 COMMAND grep LOAD.*${liblow} 69 COMMAND grep LOAD.*${liblow}
70 ERROR_QUIET 70 ERROR_QUIET
71 OUTPUT_VARIABLE ${lib}_FILENAME) 71 OUTPUT_VARIABLE ${lib}_FILENAME)
diff --git a/cmake/scripts/osx/ArchSetup.cmake b/cmake/scripts/osx/ArchSetup.cmake
index d0c5506..9ba0596 100644
--- a/cmake/scripts/osx/ArchSetup.cmake
+++ b/cmake/scripts/osx/ArchSetup.cmake
@@ -36,5 +36,5 @@ list(APPEND DEPLIBS "-framework DiskArbitration" "-framework IOKit"
36 "-framework CoreGraphics" "-framework CoreMedia" 36 "-framework CoreGraphics" "-framework CoreMedia"
37 "-framework VideoToolbox") 37 "-framework VideoToolbox")
38 38
39set(CMAKE_OSX_DEPLOYMENT_TARGET 10.8) 39set(CMAKE_OSX_DEPLOYMENT_TARGET 10.9)
40set(CMAKE_XCODE_ATTRIBUTE_CLANG_LINK_OBJC_RUNTIME OFF) 40set(CMAKE_XCODE_ATTRIBUTE_CLANG_LINK_OBJC_RUNTIME OFF)
diff --git a/cmake/scripts/windows/ArchSetup.cmake b/cmake/scripts/windows/ArchSetup.cmake
index b3963a6..b94842f 100644
--- a/cmake/scripts/windows/ArchSetup.cmake
+++ b/cmake/scripts/windows/ArchSetup.cmake
@@ -87,9 +87,9 @@ foreach(_lib ${_nodefaultlibs_DEBUG})
87endforeach() 87endforeach()
88 88
89# DELAYLOAD option 89# DELAYLOAD option
90set(_delayloadlibs zlib.dll libmysql.dll libxslt.dll dnssd.dll dwmapi.dll ssh.dll sqlite3.dll 90set(_delayloadlibs zlib.dll libmysql.dll libxslt.dll dnssd.dll dwmapi.dll sqlite3.dll
91 avcodec-57.dll avfilter-6.dll avformat-57.dll avutil-55.dll 91 avcodec-58.dll avfilter-7.dll avformat-58.dll avutil-56.dll
92 postproc-54.dll swresample-2.dll swscale-4.dll d3dcompiler_47.dll) 92 postproc-55.dll swresample-3.dll swscale-5.dll d3dcompiler_47.dll)
93foreach(_lib ${_delayloadlibs}) 93foreach(_lib ${_delayloadlibs})
94 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DELAYLOAD:\"${_lib}\"") 94 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DELAYLOAD:\"${_lib}\"")
95endforeach() 95endforeach()
diff --git a/cmake/scripts/windowsstore/ArchSetup.cmake b/cmake/scripts/windowsstore/ArchSetup.cmake
index a663bb9..e3e46e7 100644
--- a/cmake/scripts/windowsstore/ArchSetup.cmake
+++ b/cmake/scripts/windowsstore/ArchSetup.cmake
@@ -1,5 +1,5 @@
1# Minimum SDK version we support 1# Minimum SDK version we support
2set(VS_MINIMUM_SDK_VERSION 10.0.14393.0) 2set(VS_MINIMUM_SDK_VERSION 10.0.16299.0)
3 3
4if(CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION VERSION_LESS VS_MINIMUM_SDK_VERSION) 4if(CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION VERSION_LESS VS_MINIMUM_SDK_VERSION)
5 message(FATAL_ERROR "Detected Windows SDK version is ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}.\n" 5 message(FATAL_ERROR "Detected Windows SDK version is ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}.\n"
@@ -25,7 +25,7 @@ elseif(_ARM_)
25else() 25else()
26 message(FATAL_ERROR "Unsupported architecture") 26 message(FATAL_ERROR "Unsupported architecture")
27endif() 27endif()
28 28
29unset(_X86_) 29unset(_X86_)
30unset(_AMD64_) 30unset(_AMD64_)
31unset(_ARM_) 31unset(_ARM_)
@@ -51,7 +51,7 @@ set(MINGW_LIBS_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/mingwlibs/win10-$
51# mingw libs 51# mingw libs
52list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${MINGW_LIBS_DIR}) 52list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${MINGW_LIBS_DIR})
53list(APPEND CMAKE_SYSTEM_LIBRARY_PATH ${MINGW_LIBS_DIR}/bin) 53list(APPEND CMAKE_SYSTEM_LIBRARY_PATH ${MINGW_LIBS_DIR}/bin)
54# dependencies 54# dependencies
55list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${DEPENDENCIES_DIR}) 55list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${DEPENDENCIES_DIR})
56# for python 56# for python
57set(PYTHON_INCLUDE_DIR ${DEPENDENCIES_DIR}/include/python) 57set(PYTHON_INCLUDE_DIR ${DEPENDENCIES_DIR}/include/python)
@@ -63,6 +63,7 @@ add_options(CXX ALL_BUILDS "/wd\"4996\"")
63add_options(CXX ALL_BUILDS "/wd\"4146\"") 63add_options(CXX ALL_BUILDS "/wd\"4146\"")
64add_options(CXX ALL_BUILDS "/wd\"4251\"") 64add_options(CXX ALL_BUILDS "/wd\"4251\"")
65add_options(CXX ALL_BUILDS "/wd\"4668\"") 65add_options(CXX ALL_BUILDS "/wd\"4668\"")
66add_options(CXX ALL_BUILDS "/wd\"5033\"")
66set(ARCH_DEFINES -D_WINDOWS -DTARGET_WINDOWS -DTARGET_WINDOWS_STORE -DXBMC_EXPORT -DMS_UWP) 67set(ARCH_DEFINES -D_WINDOWS -DTARGET_WINDOWS -DTARGET_WINDOWS_STORE -DXBMC_EXPORT -DMS_UWP)
67if(NOT SDK_TARGET_ARCH STREQUAL arm) 68if(NOT SDK_TARGET_ARCH STREQUAL arm)
68 list(APPEND ARCH_DEFINES -D__SSE__ -D__SSE2__) 69 list(APPEND ARCH_DEFINES -D__SSE__ -D__SSE2__)
@@ -78,7 +79,7 @@ set(SYSTEM_DEFINES -DWIN32_LEAN_AND_MEAN -DNOMINMAX -DHAS_DX -D__STDC_CONSTANT_M
78list(APPEND SYSTEM_DEFINES -DHAS_WIN10_NETWORK) 79list(APPEND SYSTEM_DEFINES -DHAS_WIN10_NETWORK)
79 80
80# The /MP option enables /FS by default. 81# The /MP option enables /FS by default.
81set(CMAKE_CXX_FLAGS "/MP ${CMAKE_CXX_FLAGS} /ZW /EHsc /await") 82set(CMAKE_CXX_FLAGS "/MP ${CMAKE_CXX_FLAGS} /EHsc /await /std:c++latest")
82# Google Test needs to use shared version of runtime libraries 83# Google Test needs to use shared version of runtime libraries
83set(gtest_force_shared_crt ON CACHE STRING "" FORCE) 84set(gtest_force_shared_crt ON CACHE STRING "" FORCE)
84 85
@@ -90,20 +91,10 @@ set(gtest_force_shared_crt ON CACHE STRING "" FORCE)
90link_directories(${MINGW_LIBS_DIR}/lib 91link_directories(${MINGW_LIBS_DIR}/lib
91 ${DEPENDENCIES_DIR}/lib) 92 ${DEPENDENCIES_DIR}/lib)
92 93
93list(APPEND DEPLIBS d3d11.lib WS2_32.lib dxguid.lib dloadhelper.lib) 94list(APPEND DEPLIBS d3d11.lib WS2_32.lib dxguid.lib dloadhelper.lib WindowsApp.lib)
94if(ARCH STREQUAL win32 OR ARCH STREQUAL x64)
95 list(APPEND DEPLIBS DInput8.lib DSound.lib winmm.lib Mpr.lib Iphlpapi.lib PowrProf.lib setupapi.lib dwmapi.lib)
96endif()
97# NODEFAULTLIB option
98 95
99set(_nodefaultlibs_RELEASE libcmt) 96set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /WINMD:NO")
100set(_nodefaultlibs_DEBUG libcmt msvcrt) 97set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:msvcrt /DEBUG:FASTLINK /OPT:NOREF /OPT:NOICF")
101foreach(_lib ${_nodefaultlibs_RELEASE})
102 set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /NODEFAULTLIB:\"${_lib}\"")
103endforeach()
104foreach(_lib ${_nodefaultlibs_DEBUG})
105 set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:\"${_lib}\"")
106endforeach()
107 98
108# Make the Release version create a PDB 99# Make the Release version create a PDB
109set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi") 100set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
@@ -117,13 +108,6 @@ set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /ignore:4264")
117 108
118if(CMAKE_GENERATOR MATCHES "Visual Studio") 109if(CMAKE_GENERATOR MATCHES "Visual Studio")
119 set_property(GLOBAL PROPERTY USE_FOLDERS ON) 110 set_property(GLOBAL PROPERTY USE_FOLDERS ON)
120
121 # Generate a batch file that opens Visual Studio with the necessary env variables set.
122 file(WRITE ${CMAKE_BINARY_DIR}/kodi-sln.bat
123 "@echo off\n"
124 "set KODI_HOME=%~dp0\n"
125 "set PATH=%~dp0\\system\n"
126 "start %~dp0\\${PROJECT_NAME}.sln")
127endif() 111endif()
128 112
129# -------- Build options --------- 113# -------- Build options ---------
diff --git a/cmake/scripts/windowsstore/Macros.cmake b/cmake/scripts/windowsstore/Macros.cmake
index 7240138..de89c62 100644
--- a/cmake/scripts/windowsstore/Macros.cmake
+++ b/cmake/scripts/windowsstore/Macros.cmake
@@ -70,11 +70,11 @@ macro(winstore_set_assets target)
70 set_property(SOURCE ${ASSET_FILES} PROPERTY VS_DEPLOYMENT_CONTENT 1) 70 set_property(SOURCE ${ASSET_FILES} PROPERTY VS_DEPLOYMENT_CONTENT 1)
71 set_property(SOURCE ${ASSET_FILES} PROPERTY VS_DEPLOYMENT_LOCATION "media") 71 set_property(SOURCE ${ASSET_FILES} PROPERTY VS_DEPLOYMENT_LOCATION "media")
72 source_group("media" FILES ${ASSET_FILES}) 72 source_group("media" FILES ${ASSET_FILES})
73 set(RESOURCES ${RESOURCES} ${ASSET_FILES} 73 set(RESOURCES ${RESOURCES} ${ASSET_FILES}
74 "${CMAKE_SOURCE_DIR}/tools/windows/packaging/uwp/kodi_temp_key.pfx") 74 "${CMAKE_SOURCE_DIR}/tools/windows/packaging/uwp/kodi_temp_key.pfx")
75 set(LICENSE_FILES 75
76 ${CMAKE_SOURCE_DIR}/LICENSE.GPL 76 set(LICENSE_FILES
77 ${CMAKE_SOURCE_DIR}/copying.txt 77 ${CMAKE_SOURCE_DIR}/LICENSE.md
78 ${CMAKE_SOURCE_DIR}/privacy-policy.txt) 78 ${CMAKE_SOURCE_DIR}/privacy-policy.txt)
79 if(EXISTS "${CMAKE_SOURCE_DIR}/known_issues.txt") 79 if(EXISTS "${CMAKE_SOURCE_DIR}/known_issues.txt")
80 list(APPEND LICENSE_FILES ${CMAKE_SOURCE_DIR}/known_issues.txt) 80 list(APPEND LICENSE_FILES ${CMAKE_SOURCE_DIR}/known_issues.txt)
@@ -108,7 +108,7 @@ macro(add_deployment_content_group path link match exclude)
108 " <Link>${_link}%(RecursiveDir)%(FileName)%(Extension)</Link>\n" 108 " <Link>${_link}%(RecursiveDir)%(FileName)%(Extension)</Link>\n"
109 " <DeploymentContent>true</DeploymentContent>\n" 109 " <DeploymentContent>true</DeploymentContent>\n"
110 " </EmbedResources>\n") 110 " </EmbedResources>\n")
111endmacro() 111endmacro()
112 112
113macro(winstore_append_props target) 113macro(winstore_append_props target)
114 # exclude debug dlls from packaging 114 # exclude debug dlls from packaging
@@ -126,7 +126,7 @@ macro(winstore_append_props target)
126 " </None>\n" 126 " </None>\n"
127 " </ItemGroup>\n") 127 " </ItemGroup>\n")
128 endforeach(_dll DEBUG_DLLS) 128 endforeach(_dll DEBUG_DLLS)
129 129
130 add_deployment_content_group($(BuildRootPath)/dlls "" *.dll "${DEBUG_DLLS_EXCLUDE}") 130 add_deployment_content_group($(BuildRootPath)/dlls "" *.dll "${DEBUG_DLLS_EXCLUDE}")
131 add_deployment_content_group($(BuildRootPath)/system system **/* "$(BuildRootPath)/**/shaders/**") 131 add_deployment_content_group($(BuildRootPath)/system system **/* "$(BuildRootPath)/**/shaders/**")
132 add_deployment_content_group($(BuildRootPath)/system/shaders system/shaders **/*.fx "") 132 add_deployment_content_group($(BuildRootPath)/system/shaders system/shaders **/*.fx "")
@@ -179,4 +179,4 @@ macro(winstore_add_target_properties target)
179 winstore_set_assets(${target}) 179 winstore_set_assets(${target})
180 winstore_generate_manifest(${target}) 180 winstore_generate_manifest(${target})
181 winstore_append_props(${target}) 181 winstore_append_props(${target})
182endmacro() \ No newline at end of file 182endmacro()
diff --git a/cmake/treedata/android/subdirs.txt b/cmake/treedata/android/subdirs.txt
index 7f7fef5..036fd24 100644
--- a/cmake/treedata/android/subdirs.txt
+++ b/cmake/treedata/android/subdirs.txt
@@ -6,10 +6,10 @@ xbmc/platform/posix platform/posix
6xbmc/platform/posix/filesystem platform/posix/filesystem 6xbmc/platform/posix/filesystem platform/posix/filesystem
7xbmc/platform/posix/utils platform/posix/utils 7xbmc/platform/posix/utils platform/posix/utils
8xbmc/platform/linux platform/linux 8xbmc/platform/linux platform/linux
9xbmc/platform/linux/network platform/linux/network
10xbmc/platform/linux/peripherals platform/linux/peripherals 9xbmc/platform/linux/peripherals platform/linux/peripherals
11xbmc/platform/android/activity platform/android/activity 10xbmc/platform/android/activity platform/android/activity
12xbmc/platform/android/bionic_supplement platform/android/bionicsupplement 11xbmc/platform/android/bionic_supplement platform/android/bionicsupplement
12xbmc/platform/android/drm platform/android/drm
13xbmc/platform/android/filesystem platform/android/filesystem 13xbmc/platform/android/filesystem platform/android/filesystem
14xbmc/platform/android/network platform/android/network 14xbmc/platform/android/network platform/android/network
15xbmc/platform/android/peripherals platform/android/peripherals 15xbmc/platform/android/peripherals platform/android/peripherals
diff --git a/cmake/treedata/common/drm.txt b/cmake/treedata/common/drm.txt
new file mode 100644
index 0000000..fbcc906
--- /dev/null
+++ b/cmake/treedata/common/drm.txt
@@ -0,0 +1 @@
xbmc/drm drm
diff --git a/cmake/treedata/common/games.txt b/cmake/treedata/common/games.txt
index 7b63f6a..7ae2d35 100644
--- a/cmake/treedata/common/games.txt
+++ b/cmake/treedata/common/games.txt
@@ -1,8 +1,7 @@
1xbmc/games games 1xbmc/games games
2xbmc/games/addons games/addons 2xbmc/games/addons games/addons
3xbmc/games/addons/input games/addons/input 3xbmc/games/addons/input games/addons/input
4xbmc/games/addons/playback games/addons/playback 4xbmc/games/addons/streams games/addons/streams
5xbmc/games/addons/savestates games/addons/savestates
6xbmc/games/controllers games/controllers 5xbmc/games/controllers games/controllers
7xbmc/games/controllers/dialogs games/controllers/dialogs 6xbmc/games/controllers/dialogs games/controllers/dialogs
8xbmc/games/controllers/guicontrols games/controllers/guicontrols 7xbmc/games/controllers/guicontrols games/controllers/guicontrols
diff --git a/cmake/treedata/common/retroplayer.txt b/cmake/treedata/common/retroplayer.txt
index 0239801..cf9c9c5 100644
--- a/cmake/treedata/common/retroplayer.txt
+++ b/cmake/treedata/common/retroplayer.txt
@@ -1,8 +1,15 @@
1xbmc/cores/RetroPlayer cores/RetroPlayer 1xbmc/cores/RetroPlayer cores/RetroPlayer
2xbmc/cores/RetroPlayer/audio cores/RetroPlayer/audio
3xbmc/cores/RetroPlayer/buffers cores/RetroPlayer/buffers
4xbmc/cores/RetroPlayer/buffers/video cores/RetroPlayer/buffers/video
2xbmc/cores/RetroPlayer/guibridge cores/RetroPlayer/guibridge 5xbmc/cores/RetroPlayer/guibridge cores/RetroPlayer/guibridge
3xbmc/cores/RetroPlayer/guicontrols cores/RetroPlayer/guicontrols 6xbmc/cores/RetroPlayer/guicontrols cores/RetroPlayer/guicontrols
4xbmc/cores/RetroPlayer/guiwindows cores/RetroPlayer/guiwindows 7xbmc/cores/RetroPlayer/guiwindows cores/RetroPlayer/guiwindows
8xbmc/cores/RetroPlayer/playback cores/RetroPlayer/playback
5xbmc/cores/RetroPlayer/process cores/RetroPlayer/process 9xbmc/cores/RetroPlayer/process cores/RetroPlayer/process
6xbmc/cores/RetroPlayer/rendering cores/RetroPlayer/rendering 10xbmc/cores/RetroPlayer/rendering cores/RetroPlayer/rendering
7xbmc/cores/RetroPlayer/rendering/VideoRenderers cores/RetroPlayer/rendering/VideoRenderers 11xbmc/cores/RetroPlayer/rendering/VideoRenderers cores/RetroPlayer/rendering/VideoRenderers
8xbmc/cores/RetroPlayer/rendering/VideoShaders cores/RetroPlayer/rendering/VideoShaders 12xbmc/cores/RetroPlayer/rendering/VideoShaders cores/RetroPlayer/rendering/VideoShaders
13xbmc/cores/RetroPlayer/savestates cores/RetroPlayer/savestates
14xbmc/cores/RetroPlayer/streams cores/RetroPlayer/streams
15xbmc/cores/RetroPlayer/streams/memory cores/RetroPlayer/streams/memory
diff --git a/cmake/treedata/freebsd/subdirs.txt b/cmake/treedata/freebsd/subdirs.txt
index fe0725c..e4edf23 100644
--- a/cmake/treedata/freebsd/subdirs.txt
+++ b/cmake/treedata/freebsd/subdirs.txt
@@ -1,6 +1,7 @@
1xbmc/platform/posix platform/posix 1xbmc/platform/posix platform/posix
2xbmc/platform/posix/filesystem platform/posix/filesystem 2xbmc/platform/posix/filesystem platform/posix/filesystem
3xbmc/platform/posix/utils platform/posix/utils 3xbmc/platform/posix/utils platform/posix/utils
4xbmc/platform/freebsd platform/freebsd
4xbmc/platform/linux platform/linux 5xbmc/platform/linux platform/linux
5xbmc/platform/linux/input platform/linux/input 6xbmc/platform/linux/input platform/linux/input
6xbmc/platform/linux/network platform/linux/network 7xbmc/platform/linux/network platform/linux/network
@@ -9,3 +10,6 @@ xbmc/platform/linux/powermanagement platform/linux/powermanagement
9xbmc/platform/linux/storage platform/linux/storage 10xbmc/platform/linux/storage platform/linux/storage
10xbmc/input/touch input/touch 11xbmc/input/touch input/touch
11xbmc/input/touch/generic input/touch/generic 12xbmc/input/touch/generic input/touch/generic
13xbmc/cores/RetroPlayer/process/rbpi cores/RetroPlayer/process/rbpi
14xbmc/cores/VideoPlayer/Process/rbpi cores/VideoPlayer/Process/rbpi
15xbmc/windowing/linux windowing/linux
diff --git a/cmake/treedata/optional/common/mir.txt b/cmake/treedata/optional/common/mir.txt
deleted file mode 100644
index d681e8b..0000000
--- a/cmake/treedata/optional/common/mir.txt
+++ /dev/null
@@ -1 +0,0 @@
1xbmc/windowing/mir windowing/mir # MIR