diff options
| author | manuel <manuel@mausz.at> | 2018-08-30 00:42:04 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2018-08-30 00:42:04 +0200 |
| commit | 2577b55681a97f3eec3fb0e3b5a4fb7f2cb18b8a (patch) | |
| tree | cc9e1f8ea69eebca8416677b2470a5b3f11a850e /cmake/modules | |
| parent | b3d195f0188758a14875a5a2f270e4fd190a679f (diff) | |
| download | kodi-pvr-build-2577b55681a97f3eec3fb0e3b5a4fb7f2cb18b8a.tar.gz kodi-pvr-build-2577b55681a97f3eec3fb0e3b5a4fb7f2cb18b8a.tar.bz2 kodi-pvr-build-2577b55681a97f3eec3fb0e3b5a4fb7f2cb18b8a.zip | |
sync with upstream
Diffstat (limited to 'cmake/modules')
61 files changed, 372 insertions, 209 deletions
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) |
| 31 | endif() | 31 | endif() |
| 32 | 32 | ||
| 33 | include(FindPackageHandleStandardArgs) | 33 | find_library(BLURAY_LIBRARY NAMES bluray libbluray |
| 34 | if(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 | 36 | include(FindPackageHandleStandardArgs) |
| 39 | REQUIRED_VARS BLURAY_LIBRARY BLURAY_INCLUDE_DIR BLURAY_VERSION | 37 | find_package_handle_standard_args(Bluray |
| 40 | VERSION_VAR BLURAY_VERSION) | 38 | REQUIRED_VARS BLURAY_LIBRARY BLURAY_INCLUDE_DIR BLURAY_VERSION |
| 41 | else() | 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) | ||
| 46 | endif() | ||
| 47 | 40 | ||
| 48 | if(BLURAY_FOUND) | 41 | if(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) |
| 34 | endif() | 34 | endif() |
| 35 | 35 | ||
| 36 | include(FindPackageHandleStandardArgs) | 36 | find_library(CEC_LIBRARY NAMES cec |
| 37 | if(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 | 39 | include(FindPackageHandleStandardArgs) |
| 42 | REQUIRED_VARS CEC_LIBRARY CEC_INCLUDE_DIR | 40 | find_package_handle_standard_args(CEC |
| 43 | VERSION_VAR CEC_VERSION) | 41 | REQUIRED_VARS CEC_LIBRARY CEC_INCLUDE_DIR |
| 44 | else() | 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) | ||
| 49 | endif() | ||
| 50 | 43 | ||
| 51 | if(CEC_FOUND) | 44 | if(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 |
| 36 | set(REQUIRED_FFMPEG_VERSION 3.4) | 36 | set(REQUIRED_FFMPEG_VERSION 4.0) |
| 37 | set(_avcodec_ver ">=57.107.100") | 37 | set(_avcodec_ver ">=58.18.100") |
| 38 | set(_avfilter_ver ">=6.107.100") | 38 | set(_avfilter_ver ">=7.16.100") |
| 39 | set(_avformat_ver ">=57.83.100") | 39 | set(_avformat_ver ">=58.12.100") |
| 40 | set(_avutil_ver ">=55.78.100") | 40 | set(_avutil_ver ">=56.14.100") |
| 41 | set(_swscale_ver ">=4.8.100") | 41 | set(_swscale_ver ">=5.1.100") |
| 42 | set(_swresample_ver ">=2.9.100") | 42 | set(_swresample_ver ">=3.1.100") |
| 43 | set(_postproc_ver ">=54.7.100") | 43 | set(_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 | |||
| 12 | if(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}) | ||
| 50 | else() | ||
| 51 | find_program(FLATBUFFERS_FLATC_EXECUTABLE NAMES flatc) | ||
| 52 | find_path(FLATBUFFERS_INCLUDE_DIR NAMES flatbuffers/flatbuffers.h) | ||
| 53 | endif() | ||
| 54 | |||
| 55 | include(FindPackageHandleStandardArgs) | ||
| 56 | find_package_handle_standard_args(FlatBuffers | ||
| 57 | REQUIRED_VARS FLATBUFFERS_FLATC_EXECUTABLE FLATBUFFERS_INCLUDE_DIR | ||
| 58 | VERSION_VAR FLATBUFFERS_VER) | ||
| 59 | |||
| 60 | if(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() | ||
| 70 | endif() | ||
| 71 | |||
| 72 | mark_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() |
| 99 | endif() | 99 | endif() |
| 100 | 100 | ||
| 101 | mark_as_advanced(FMT_INCLUDE_DIR FMT_LIBRARY) | ||
| 102 | |||
| 103 | endif() | 101 | endif() |
| 102 | mark_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 | ||
| 32 | include(CheckCSourceCompiles) | ||
| 33 | set(CMAKE_REQUIRED_LIBRARIES ${GBM_LIBRARY}) | ||
| 34 | check_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 | |||
| 42 | check_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 | |||
| 32 | if(GBM_FOUND) | 50 | if(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 | ||
| 16 | if(PKG_CONFIG_FOUND) | 16 | if(PKG_CONFIG_FOUND) |
| 17 | pkg_check_modules(PC_LIBDRM libdrm QUIET) | 17 | pkg_check_modules(PC_LIBDRM libdrm>=2.4.71 QUIET) |
| 18 | endif() | 18 | endif() |
| 19 | 19 | ||
| 20 | find_path(LIBDRM_INCLUDE_DIR NAMES drm.h | 20 | find_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) |
| 248 | endif() \ No newline at end of file | 245 | endif() |
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 | |||
| 14 | if(PKG_CONFIG_FOUND) | ||
| 15 | pkg_check_modules(PC_LIBINPUT libinput QUIET) | ||
| 16 | endif() | ||
| 17 | |||
| 18 | find_path(LIBINPUT_INCLUDE_DIR NAMES libinput.h | ||
| 19 | PATHS ${PC_LIBINPUT_INCLUDEDIR}) | ||
| 20 | |||
| 21 | find_library(LIBINPUT_LIBRARY NAMES input | ||
| 22 | PATHS ${PC_LIBINPUT_LIBDIR}) | ||
| 23 | |||
| 24 | set(LIBINPUT_VERSION ${PC_LIBINPUT_VERSION}) | ||
| 25 | |||
| 26 | include(FindPackageHandleStandardArgs) | ||
| 27 | find_package_handle_standard_args(LibInput | ||
| 28 | REQUIRED_VARS LIBINPUT_LIBRARY LIBINPUT_INCLUDE_DIR | ||
| 29 | VERSION_VAR LIBINPUT_VERSION) | ||
| 30 | |||
| 31 | if(LIBINPUT_FOUND) | ||
| 32 | set(LIBINPUT_INCLUDE_DIRS ${LIBINPUT_INCLUDE_DIR}) | ||
| 33 | set(LIBINPUT_LIBRARIES ${LIBINPUT_LIBRARY}) | ||
| 34 | endif() | ||
| 35 | |||
| 36 | mark_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 | |||
| 13 | if(PKG_CONFIG_FOUND) | ||
| 14 | pkg_check_modules (PC_MIR mirclient>=0.26.2 QUIET) | ||
| 15 | endif() | ||
| 16 | |||
| 17 | find_path(MIR_INCLUDE_DIR NAMES mir_toolkit/mir_client_library.h | ||
| 18 | PATHS ${PC_MIR_INCLUDE_DIRS}) | ||
| 19 | |||
| 20 | find_library(MIR_LIBRARY NAMES mirclient | ||
| 21 | PATHS ${PC_MIR_LIBRARIES} ${PC_MIR_LIBRARY_DIRS}) | ||
| 22 | |||
| 23 | include (FindPackageHandleStandardArgs) | ||
| 24 | find_package_handle_standard_args (Mir | ||
| 25 | REQUIRED_VARS MIR_LIBRARY MIR_INCLUDE_DIR) | ||
| 26 | |||
| 27 | if (MIR_FOUND) | ||
| 28 | set(MIR_LIBRARIES ${MIR_LIBRARY}) | ||
| 29 | set(MIR_INCLUDE_DIRS ${PC_MIR_INCLUDE_DIRS}) | ||
| 30 | set(MIR_DEFINITIONS -DHAVE_MIR=1) | ||
| 31 | endif() | ||
| 32 | |||
| 33 | mark_as_advanced (MIR_LIBRARY MIR_INCLUDE_DIR) | ||
diff --git a/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. |
| 3 | include(TestCXXAcceptsFlag) | 3 | include(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() |
| 78 | elseif(CMAKE_SYSTEM_NAME MATCHES "Android") | 78 | elseif(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 | |||
| 17 | if(PKG_CONFIG_FOUND) | ||
| 18 | pkg_check_modules(PC_SSH libssh>=0.6 QUIET) | ||
| 19 | endif() | ||
| 20 | |||
| 21 | find_path(SSH_INCLUDE_DIR NAMES libssh/libssh.h | ||
| 22 | PATHS ${PC_SSH_INCLUDEDIR}) | ||
| 23 | find_library(SSH_LIBRARY NAMES ssh | ||
| 24 | PATHS ${PC_SSH_LIBDIR}) | ||
| 25 | |||
| 26 | set(SSH_VERSION ${PC_SSH_VERSION}) | ||
| 27 | |||
| 28 | include(FindPackageHandleStandardArgs) | ||
| 29 | find_package_handle_standard_args(SSH | ||
| 30 | REQUIRED_VARS SSH_LIBRARY SSH_INCLUDE_DIR | ||
| 31 | VERSION_VAR SSH_VERSION) | ||
| 32 | |||
| 33 | if(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() | ||
| 45 | endif() | ||
| 46 | |||
| 47 | mark_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 | ||
| 13 | pkg_check_modules(WAYLANDPP wayland-client++ wayland-egl++ wayland-cursor++) | 13 | pkg_check_modules(PC_WAYLANDPP wayland-client++ wayland-egl++ wayland-cursor++ QUIET) |
| 14 | pkg_check_modules(PC_WAYLANDPP_SCANNER wayland-scanner++) | 14 | pkg_check_modules(PC_WAYLANDPP_SCANNER wayland-scanner++ QUIET) |
| 15 | if(WAYLANDPP_FOUND) | 15 | if(PC_WAYLANDPP_FOUND) |
| 16 | pkg_get_variable(PC_WAYLANDPP_PKGDATADIR wayland-client++ pkgdatadir) | 16 | pkg_get_variable(PC_WAYLANDPP_PKGDATADIR wayland-client++ pkgdatadir) |
| 17 | endif() | 17 | endif() |
| 18 | if(PC_WAYLANDPP_SCANNER_FOUND) | 18 | if(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) |
| 20 | endif() | 20 | endif() |
| 21 | 21 | ||
| 22 | find_path(WAYLANDPP_INCLUDE_DIR wayland-client.hpp PATHS ${PC_WAYLANDPP_INCLUDEDIR}) | ||
| 23 | |||
| 24 | find_library(WAYLANDPP_CLIENT_LIBRARY NAMES wayland-client++ | ||
| 25 | PATHS ${PC_WAYLANDPP_LIBRARY_DIRS}) | ||
| 26 | |||
| 27 | find_library(WAYLANDPP_CURSOR_LIBRARY NAMES wayland-cursor++ | ||
| 28 | PATHS ${PC_WAYLANDPP_LIBRARY_DIRS}) | ||
| 29 | |||
| 30 | find_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 |
| 23 | set(WAYLANDPP_PROTOCOLS_DIR "${PC_WAYLANDPP_PKGDATADIR}/protocols" CACHE INTERNAL "") | 35 | set(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 | |||
| 27 | find_program(WAYLANDPP_SCANNER wayland-scanner++ PATHS ${PC_WAYLANDPP_SCANNER}) | 39 | find_program(WAYLANDPP_SCANNER wayland-scanner++ PATHS ${PC_WAYLANDPP_SCANNER}) |
| 28 | 40 | ||
| 29 | include (FindPackageHandleStandardArgs) | 41 | include (FindPackageHandleStandardArgs) |
| 30 | find_package_handle_standard_args (Waylandpp | 42 | find_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) | |
| 37 | set(WAYLANDPP_DEFINITIONS -DHAVE_WAYLAND=1) | 49 | |
| 38 | # Also pass on library directories | 50 | if(WAYLANDPP_FOUND) |
| 39 | set(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) | ||
| 56 | endif() | ||
| 57 | |||
| 58 | mark_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 | ||
| 12 | pkg_check_modules (XKBCOMMON xkbcommon) | 11 | if(PKG_CONFIG_FOUND) |
| 12 | pkg_check_modules(PC_XKBCOMMON xkbcommon QUIET) | ||
| 13 | endif() | ||
| 13 | 14 | ||
| 14 | include (FindPackageHandleStandardArgs) | ||
| 15 | find_package_handle_standard_args (Xkbcommon | ||
| 16 | REQUIRED_VARS | ||
| 17 | XKBCOMMON_FOUND) | ||
| 18 | 15 | ||
| 19 | set(XKBCOMMON_DEFINITIONS -DHAVE_XKBCOMMON=1) | 16 | find_path(XKBCOMMON_INCLUDE_DIR NAMES xkbcommon/xkbcommon.h |
| 20 | set(XKBCOMMON_LIBRARIES ${XKBCOMMON_LDFLAGS}) | 17 | PATHS ${PC_XKBCOMMON_INCLUDEDIR}) |
| 21 | set(XKBCOMMON_INCLUDE_DIRS ${XKBCOMMON_INCLUDEDIR}) | 18 | find_library(XKBCOMMON_LIBRARY NAMES xkbcommon |
| 19 | PATHS ${PC_XKBCOMMON_LIBDIR}) | ||
| 20 | |||
| 21 | set(XKBCOMMON_VERSION ${PC_XKBCOMMON_VERSION}) | ||
| 22 | |||
| 23 | include(FindPackageHandleStandardArgs) | ||
| 24 | find_package_handle_standard_args(Xkbcommon | ||
| 25 | REQUIRED_VARS XKBCOMMON_LIBRARY XKBCOMMON_INCLUDE_DIR | ||
| 26 | VERSION_VAR XKBCOMMON_VERSION) | ||
| 27 | |||
| 28 | if(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() | ||
| 38 | endif() | ||
| 39 | |||
| 40 | mark_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 | |||
| 13 | if(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}) | ||
| 49 | else() | ||
| 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() | ||
| 78 | endif() | ||
| 79 | |||
| 80 | mark_as_advanced(FSTRCMP_INCLUDE_DIR FSTRCMP_LIBRARY) | ||
