diff options
Diffstat (limited to 'project/cmake/modules')
61 files changed, 0 insertions, 3639 deletions
diff --git a/project/cmake/modules/FindAML.cmake b/project/cmake/modules/FindAML.cmake deleted file mode 100644 index 5b9a859ead..0000000000 --- a/project/cmake/modules/FindAML.cmake +++ /dev/null @@ -1,35 +0,0 @@ -#.rst: -# FindAML -# ------- -# Finds the AML codec -# -# This will will define the following variables:: -# -# AML_FOUND - system has AML -# AML_INCLUDE_DIRS - the AML include directory -# AML_DEFINITIONS - the AML definitions -# -# and the following imported targets:: -# -# AML::AML - The AML codec - -find_path(AML_INCLUDE_DIR codec_error.h - PATH_SUFFIXES amcodec) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(AML - REQUIRED_VARS AML_INCLUDE_DIR) - -if(AML_FOUND) - set(AML_INCLUDE_DIRS ${AML_INCLUDE_DIR}) - set(AML_DEFINITIONS -DHAS_LIBAMCODEC=1) - - if(NOT TARGET AML::AML) - add_library(AML::AML UNKNOWN IMPORTED) - set_target_properties(AML::AML PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${AML_INCLUDE_DIR}" - INTERFACE_COMPILE_DEFINITIONS HAS_LIBAMCODEC=1) - endif() -endif() - -mark_as_advanced(AMLCODEC_INCLUDE_DIR) diff --git a/project/cmake/modules/FindASS.cmake b/project/cmake/modules/FindASS.cmake deleted file mode 100644 index 2d592fad15..0000000000 --- a/project/cmake/modules/FindASS.cmake +++ /dev/null @@ -1,44 +0,0 @@ -#.rst: -# FindASS -# ------- -# Finds the ASS library -# -# This will will define the following variables:: -# -# ASS_FOUND - system has ASS -# ASS_INCLUDE_DIRS - the ASS include directory -# ASS_LIBRARIES - the ASS libraries -# -# and the following imported targets:: -# -# ASS::ASS - The ASS library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_ASS libass QUIET) -endif() - -find_path(ASS_INCLUDE_DIR NAMES ass/ass.h - PATHS ${PC_ASS_INCLUDEDIR}) -find_library(ASS_LIBRARY NAMES ass libass - PATHS ${PC_ASS_LIBDIR}) - -set(ASS_VERSION ${PC_ASS_VERSION}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(ASS - REQUIRED_VARS ASS_LIBRARY ASS_INCLUDE_DIR - VERSION_VAR ASS_VERSION) - -if(ASS_FOUND) - set(ASS_LIBRARIES ${ASS_LIBRARY}) - set(ASS_INCLUDE_DIRS ${ASS_INCLUDE_DIR}) - - if(NOT TARGET ASS::ASS) - add_library(ASS::ASS UNKNOWN IMPORTED) - set_target_properties(ASS::ASS PROPERTIES - IMPORTED_LOCATION "${ASS_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${ASS_INCLUDE_DIR}") - endif() -endif() - -mark_as_advanced(ASS_INCLUDE_DIR ASS_LIBRARY) diff --git a/project/cmake/modules/FindAlsa.cmake b/project/cmake/modules/FindAlsa.cmake deleted file mode 100644 index a2822431f8..0000000000 --- a/project/cmake/modules/FindAlsa.cmake +++ /dev/null @@ -1,46 +0,0 @@ -#.rst: -# FindAlsa -# -------- -# Finds the Alsa library -# -# This will will define the following variables:: -# -# ALSA_FOUND - system has Alsa -# ALSA_INCLUDE_DIRS - the Alsa include directory -# ALSA_LIBRARIES - the Alsa libraries -# ALSA_DEFINITIONS - the Alsa compile definitions -# -# and the following imported targets:: -# -# ALSA::ALSA - The Alsa library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_ALSA alsa QUIET) -endif() - -find_path(ALSA_INCLUDE_DIR NAMES alsa/asoundlib.h - PATHS ${PC_ALSA_INCLUDEDIR}) -find_library(ALSA_LIBRARY NAMES asound - PATHS ${PC_ALSA_LIBDIR}) - -set(ALSA_VERSION ${PC_ALSA_VERSION}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(ALSA - REQUIRED_VARS ALSA_LIBRARY ALSA_INCLUDE_DIR - VERSION_VAR ALSA_VERSION) - -if(ALSA_FOUND) - set(ALSA_INCLUDE_DIRS "") # Don't want these added as 'timer.h' is a dangerous file - set(ALSA_LIBRARIES ${ALSA_LIBRARY}) - set(ALSA_DEFINITIONS -DHAVE_ALSA=1 -DUSE_ALSA=1) - - if(NOT TARGET ALSA::ALSA) - add_library(ALSA::ALSA UNKNOWN IMPORTED) - set_target_properties(ALSA::ALSA PROPERTIES - IMPORTED_LOCATION "${ALSA_LIBRARY}" - INTERFACE_COMPILE_DEFINITIONS "${ALSA_DEFINITIONS}") - endif() -endif() - -mark_as_advanced(ALSA_INCLUDE_DIR ALSA_LIBRARY) diff --git a/project/cmake/modules/FindAvahi.cmake b/project/cmake/modules/FindAvahi.cmake deleted file mode 100644 index 77c3e4d67a..0000000000 --- a/project/cmake/modules/FindAvahi.cmake +++ /dev/null @@ -1,63 +0,0 @@ -#.rst: -# FindAvahi -# --------- -# Finds the avahi library -# -# This will will define the following variables:: -# -# AVAHI_FOUND - system has avahi -# AVAHI_INCLUDE_DIRS - the avahi include directory -# AVAHI_LIBRARIES - the avahi libraries -# AVAHI_DEFINITIONS - the avahi definitions -# -# and the following imported targets:: -# -# Avahi::Avahi - The avahi library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_AVAHI avahi-client QUIET) -endif() - -find_path(AVAHI_CLIENT_INCLUDE_DIR NAMES avahi-client/client.h - PATHS ${PC_AVAHI_INCLUDEDIR}) -find_path(AVAHI_COMMON_INCLUDE_DIR NAMES avahi-common/defs.h - PATHS ${PC_AVAHI_INCLUDEDIR}) -find_library(AVAHI_CLIENT_LIBRARY NAMES avahi-client - PATHS ${PC_AVAHI_LIBDIR}) -find_library(AVAHI_COMMON_LIBRARY NAMES avahi-common - PATHS ${PC_AVAHI_LIBDIR}) - -set(AVAHI_VERSION ${PC_AVAHI_VERSION}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Avahi - REQUIRED_VARS AVAHI_CLIENT_LIBRARY AVAHI_COMMON_LIBRARY - AVAHI_CLIENT_INCLUDE_DIR AVAHI_COMMON_INCLUDE_DIR - VERSION_VAR AVAHI_VERSION) - -if(AVAHI_FOUND) - set(AVAHI_INCLUDE_DIRS ${AVAHI_CLIENT_INCLUDE_DIR} - ${AVAHI_COMMON_INCLUDE_DIR}) - set(AVAHI_LIBRARIES ${AVAHI_CLIENT_LIBRARY} - ${AVAHI_COMMON_LIBRARY}) - set(AVAHI_DEFINITIONS -DHAVE_LIBAVAHI_CLIENT=1 -DHAVE_LIBAVAHI_COMMON=1) - - if(NOT TARGET Avahi::Avahi) - add_library(Avahi::Avahi UNKNOWN IMPORTED) - set_target_properties(Avahi::Avahi PROPERTIES - IMPORTED_LOCATION "${AVAHI_CLIENT_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${AVAHI_CLIENT_INCLUDE_DIR}" - INTERFACE_COMPILE_DEFINITIONS HAVE_LIBAVAHI_CLIENT=1) - endif() - if(NOT TARGET Avahi::AvahiCommon) - add_library(Avahi::AvahiCommon UNKNOWN IMPORTED) - set_target_properties(Avahi::AvahiCommon PROPERTIES - IMPORTED_LOCATION "${AVAHI_COMMON_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${AVAHI_COMMON_INCLUDE_DIR}" - INTERFACE_COMPILE_DEFINITIONS HAVE_LIBAVAHI_COMMON=1 - INTERFACE_LINK_LIBRARIES Avahi::Avahi) - endif() -endif() - -mark_as_advanced(AVAHI_CLIENT_INCLUDE_DIR AVAHI_COMMON_INCLUDE_DIR - AVAHI_CLIENT_LIBRARY AVAHI_COMMON_LIBRARY) diff --git a/project/cmake/modules/FindBluetooth.cmake b/project/cmake/modules/FindBluetooth.cmake deleted file mode 100644 index a69980dc74..0000000000 --- a/project/cmake/modules/FindBluetooth.cmake +++ /dev/null @@ -1,44 +0,0 @@ -#.rst: -# FindBluetooth -# --------- -# Finds the Bluetooth library -# -# This will will define the following variables:: -# -# BLUETOOTH_FOUND - system has Bluetooth -# BLUETOOTH_INCLUDE_DIRS - the Bluetooth include directory -# BLUETOOTH_LIBRARIES - the Bluetooth libraries -# -# and the following imported targets:: -# -# Bluetooth::Bluetooth - The Bluetooth library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_BLUETOOTH bluez bluetooth QUIET) -endif() - -find_path(BLUETOOTH_INCLUDE_DIR NAMES bluetooth/bluetooth.h - PATHS ${PC_BLUETOOTH_INCLUDEDIR}) -find_library(BLUETOOTH_LIBRARY NAMES bluetooth libbluetooth - PATHS ${PC_BLUETOOTH_LIBDIR}) - -set(BLUETOOTH_VERSION ${PC_BLUETOOTH_VERSION}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Bluetooth - REQUIRED_VARS BLUETOOTH_LIBRARY BLUETOOTH_INCLUDE_DIR - VERSION_VAR BLUETOOTH_VERSION) - -if(BLUETOOTH_FOUND) - set(BLUETOOTH_INCLUDE_DIRS ${BLUETOOTH_INCLUDE_DIR}) - set(BLUETOOTH_LIBRARIES ${BLUETOOTH_LIBRARY}) - - if(NOT TARGET Bluetooth::Bluetooth) - add_library(Bluetooth::Bluetooth UNKNOWN IMPORTED) - set_target_properties(Bluetooth::Bluetooth PROPERTIES - IMPORTED_LOCATION "${BLUETOOTH_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${BLUETOOTH_INCLUDE_DIR}") - endif() -endif() - -mark_as_advanced(BLUETOOTH_INCLUDE_DIR BLUETOOTH_LIBRARY) diff --git a/project/cmake/modules/FindBluray.cmake b/project/cmake/modules/FindBluray.cmake deleted file mode 100644 index b8422ed207..0000000000 --- a/project/cmake/modules/FindBluray.cmake +++ /dev/null @@ -1,58 +0,0 @@ -#.rst: -# FindBluray -# ---------- -# Finds the libbluray library -# -# This will will define the following variables:: -# -# BLURAY_FOUND - system has libbluray -# BLURAY_INCLUDE_DIRS - the libbluray include directory -# BLURAY_LIBRARIES - the libbluray libraries -# BLURAY_DEFINITIONS - the libbluray compile definitions -# -# and the following imported targets:: -# -# Bluray::Bluray - The libblueray library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_BLURAY libbluray>=0.7.0 QUIET) -endif() - -find_path(BLURAY_INCLUDE_DIR libbluray/bluray.h - PATHS ${PC_BLURAY_INCLUDEDIR}) - -set(BLURAY_VERSION ${PC_BLURAY_VERSION}) - -include(FindPackageHandleStandardArgs) -if(NOT WIN32) - find_library(BLURAY_LIBRARY NAMES bluray - PATHS ${PC_BLURAY_LIBDIR}) - - find_package_handle_standard_args(Bluray - REQUIRED_VARS BLURAY_LIBRARY BLURAY_INCLUDE_DIR - VERSION_VAR BLURAY_VERSION) -else() - # Dynamically loaded DLL - find_package_handle_standard_args(Bluray - REQUIRED_VARS BLURAY_INCLUDE_DIR - VERSION_VAR BLURAY_VERSION) -endif() - -if(BLURAY_FOUND) - set(BLURAY_LIBRARIES ${BLURAY_LIBRARY}) - set(BLURAY_INCLUDE_DIRS ${BLURAY_INCLUDE_DIR}) - set(BLURAY_DEFINITIONS -DHAVE_LIBBLURAY=1) - - if(NOT TARGET Bluray::Bluray) - add_library(Bluray::Bluray UNKNOWN IMPORTED) - if(BLURAY_LIBRARY) - set_target_properties(Bluray::Bluray PROPERTIES - IMPORTED_LOCATION "${BLURAY_LIBRARY}") - endif() - set_target_properties(Bluray::Bluray PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${BLURAY_INCLUDE_DIR}" - INTERFACE_COMPILE_DEFINITIONS HAVE_LIBBLURAY=1) - endif() -endif() - -mark_as_advanced(BLURAY_INCLUDE_DIR BLURAY_LIBRARY) diff --git a/project/cmake/modules/FindCAP.cmake b/project/cmake/modules/FindCAP.cmake deleted file mode 100644 index 04e8378ea4..0000000000 --- a/project/cmake/modules/FindCAP.cmake +++ /dev/null @@ -1,44 +0,0 @@ -#.rst: -# FindCAP -# ----------- -# Finds the POSIX 1003.1e capabilities library -# -# This will define the following variables:: -# -# CAP_FOUND - system has LibCap -# CAP_INCLUDE_DIRS - the LibCap include directory -# CAP_LIBRARIES - the LibCap libraries -# -# and the following imported targets:: -# -# CAP::CAP - The LibCap library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_CAP libcap QUIET) -endif() - -find_path(CAP_INCLUDE_DIR NAMES sys/capability.h - PATHS ${PC_CAP_INCLUDEDIR}) -find_library(CAP_LIBRARY NAMES cap libcap - PATHS ${PC_CAP_LIBDIR}) - -set(CAP_VERSION ${PC_CAP_VERSION}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(CAP - REQUIRED_VARS CAP_LIBRARY CAP_INCLUDE_DIR - VERSION_VAR CAP_VERSION) - -if(CAP_FOUND) - set(CAP_LIBRARIES ${CAP_LIBRARY}) - set(CAP_INCLUDE_DIRS ${CAP_INCLUDE_DIR}) - - if(NOT TARGET CAP::CAP) - add_library(CAP::CAP UNKNOWN IMPORTED) - set_target_properties(CAP::CAP PROPERTIES - IMPORTED_LOCATION "${CAP_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${CAP_INCLUDE_DIR}") - endif() -endif() - -mark_as_advanced(CAP_INCLUDE_DIR CAP_LIBRARY) diff --git a/project/cmake/modules/FindCCache.cmake b/project/cmake/modules/FindCCache.cmake deleted file mode 100644 index a7fd29faba..0000000000 --- a/project/cmake/modules/FindCCache.cmake +++ /dev/null @@ -1,18 +0,0 @@ -#.rst: -# FindCCache -# ---------- -# Finds ccache and sets it up as compiler wrapper. -# This should ideally be called before the call to project(). -# -# See: https://crascit.com/2016/04/09/using-ccache-with-cmake/ - -find_program(CCACHE_PROGRAM ccache) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(CCACHE REQUIRED_VARS CCACHE_PROGRAM) - -if(CCACHE_FOUND) - # Supports Unix Makefiles and Ninja - set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}") - set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CCACHE_PROGRAM}") -endif() diff --git a/project/cmake/modules/FindCEC.cmake b/project/cmake/modules/FindCEC.cmake deleted file mode 100644 index bd6fd1d2da..0000000000 --- a/project/cmake/modules/FindCEC.cmake +++ /dev/null @@ -1,68 +0,0 @@ -#.rst: -# FindCEC -# ------- -# Finds the libCEC library -# -# This will will define the following variables:: -# -# CEC_FOUND - system has libCEC -# CEC_INCLUDE_DIRS - the libCEC include directory -# CEC_LIBRARIES - the libCEC libraries -# CEC_DEFINITIONS - the libCEC compile definitions -# -# and the following imported targets:: -# -# CEC::CEC - The libCEC library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_CEC libcec QUIET) -endif() - -find_path(CEC_INCLUDE_DIR NAMES libcec/cec.h libCEC/CEC.h - PATHS ${PC_CEC_INCLUDEDIR}) - -if(PC_CEC_VERSION) - set(CEC_VERSION ${PC_CEC_VERSION}) -elseif(CEC_INCLUDE_DIR AND EXISTS "${CEC_INCLUDE_DIR}/libcec/version.h") - file(STRINGS "${CEC_INCLUDE_DIR}/libcec/version.h" cec_version_str REGEX "^[\t ]+LIBCEC_VERSION_TO_UINT\\(.*\\)") - string(REGEX REPLACE "^[\t ]+LIBCEC_VERSION_TO_UINT\\(([0-9]+), ([0-9]+), ([0-9]+)\\)" "\\1.\\2.\\3" CEC_VERSION "${cec_version_str}") - unset(cec_version_str) -endif() - -if(NOT CEC_FIND_VERSION) - set(CEC_FIND_VERSION 4.0.0) -endif() - -include(FindPackageHandleStandardArgs) -if(NOT WIN32) - find_library(CEC_LIBRARY NAMES cec - PATHS ${PC_CEC_LIBDIR}) - - find_package_handle_standard_args(CEC - REQUIRED_VARS CEC_LIBRARY CEC_INCLUDE_DIR - VERSION_VAR CEC_VERSION) -else() - # Dynamically loaded DLL - find_package_handle_standard_args(CEC - REQUIRED_VARS CEC_INCLUDE_DIR - VERSION_VAR CEC_VERSION) -endif() - -if(CEC_FOUND) - set(CEC_LIBRARIES ${CEC_LIBRARY}) - set(CEC_INCLUDE_DIRS ${CEC_INCLUDE_DIR}) - set(CEC_DEFINITIONS -DHAVE_LIBCEC=1) - - if(NOT TARGET CEC::CEC) - add_library(CEC::CEC UNKNOWN IMPORTED) - if(CEC_LIBRARY) - set_target_properties(CEC::CEC PROPERTIES - IMPORTED_LOCATION "${CEC_LIBRARY}") - endif() - set_target_properties(CEC::CEC PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${CEC_INCLUDE_DIR}" - INTERFACE_COMPILE_DEFINITIONS HAVE_LIBCEC=1) - endif() -endif() - -mark_as_advanced(CEC_INCLUDE_DIR CEC_LIBRARY) diff --git a/project/cmake/modules/FindCWiid.cmake b/project/cmake/modules/FindCWiid.cmake deleted file mode 100644 index 88cfbef038..0000000000 --- a/project/cmake/modules/FindCWiid.cmake +++ /dev/null @@ -1,44 +0,0 @@ -#.rst: -# FindCWiid -# --------- -# Finds the CWiid library -# -# This will will define the following variables:: -# -# CWIID_FOUND - system has CWiid -# CWIID_INCLUDE_DIRS - the CWiid include directory -# CWIID_LIBRARIES - the CWiid libraries -# -# and the following imported targets:: -# -# CWiid::CWiid - The CWiid library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_CWIID cwiid QUIET) -endif() - -find_path(CWIID_INCLUDE_DIR NAMES cwiid.h - PATHS ${PC_CWIID_INCLUDEDIR}) -find_library(CWIID_LIBRARY NAMES cwiid - PATHS ${PC_CWIID_LIBDIR}) - -set(CWIID_VERSION ${PC_CWIID_VERSION}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(CWIID - REQUIRED_VARS CWIID_LIBRARY CWIID_INCLUDE_DIR - VERSION_VAR CWIID_VERSION) - -if(CWIID_FOUND) - set(CWIID_INCLUDE_DIRS ${CWIID_INCLUDE_DIR}) - set(CWIID_LIBRARIES ${CWIID_LIBRARY}) - - if(NOT TARGET CWiid::CWiid) - add_library(CWiid::CWiid UNKNOWN IMPORTED) - set_target_properties(CWiid::CWiid PROPERTIES - IMPORTED_LOCATION "${CWIID_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${CWIID_INCLUDE_DIR}") - endif() -endif() - -mark_as_advanced(CWIID_INCLUDE_DIR CWIID_LIBRARY) diff --git a/project/cmake/modules/FindCXX11.cmake b/project/cmake/modules/FindCXX11.cmake deleted file mode 100644 index c0b9a52d20..0000000000 --- a/project/cmake/modules/FindCXX11.cmake +++ /dev/null @@ -1,18 +0,0 @@ -include(TestCXXAcceptsFlag) - -# try to use compiler flag -std=c++11 -check_cxx_accepts_flag("-std=c++11" CXX_FLAG_CXX11) -if(CXX_FLAG_CXX11) - add_options (CXX ALL_BUILDS "-std=c++11") - set(CXX_STD11_FLAGS "-std=c++11") -else() - # try to use compiler flag -std=c++0x for older compilers - check_cxx_accepts_flag("-std=c++0x" CXX_FLAG_CXX0X) - if(CXX_FLAG_CXX0X) - add_options (CXX ALL_BUILDS "-std=c++0x") - set(CXX_STD11_FLAGS "-std=c++0x") - endif() -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(CXX11 DEFAULT_MSG CXX_STD11_FLAGS) diff --git a/project/cmake/modules/FindCdio.cmake b/project/cmake/modules/FindCdio.cmake deleted file mode 100644 index aa089c26e6..0000000000 --- a/project/cmake/modules/FindCdio.cmake +++ /dev/null @@ -1,45 +0,0 @@ -#.rst: -# FindCdio -# -------- -# Finds the cdio library -# -# This will will define the following variables:: -# -# CDIO_FOUND - system has cdio -# CDIO_INCLUDE_DIRS - the cdio include directory -# CDIO_LIBRARIES - the cdio libraries -# -# and the following imported targets:: -# -# CDIO::CDIO - The cdio library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_CDIO libcdio libiso9660 QUIET) -endif() - -find_path(CDIO_INCLUDE_DIR NAMES cdio/cdio.h - PATHS ${PC_CDIO_libcdio_INCLUDEDIR} - ${PC_CDIO_libiso9660_INCLUDEDIR}) -find_library(CDIO_LIBRARY NAMES cdio - PATHS ${CDIO_libcdio_LIBDIR} ${CDIO_libiso9660_LIBDIR}) - -set(CDIO_VERSION ${PC_CDIO_libcdio_VERSION}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(CDIO - REQUIRED_VARS CDIO_LIBRARY CDIO_INCLUDE_DIR - VERSION_VAR CDIO_VERSION) - -if(CDIO_FOUND) - set(CDIO_LIBRARIES ${CDIO_LIBRARY}) - set(CDIO_INCLUDE_DIRS ${CDIO_INCLUDE_DIR}) - - if(NOT TARGET CDIO::CDIO) - add_library(CDIO::CDIO UNKNOWN IMPORTED) - set_target_properties(CDIO::CDIO PROPERTIES - IMPORTED_LOCATION "${CDIO_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${CDIO_INCLUDE_DIR}") - endif() -endif() - -mark_as_advanced(CDIO_INCLUDE_DIR CDIO_LIBRARY) diff --git a/project/cmake/modules/FindCpluff.cmake b/project/cmake/modules/FindCpluff.cmake deleted file mode 100644 index ce6c127cb5..0000000000 --- a/project/cmake/modules/FindCpluff.cmake +++ /dev/null @@ -1,61 +0,0 @@ -# - Builds Cpluff as external project -# Once done this will define -# -# CPLUFF_FOUND - system has cpluff -# CPLUFF_INCLUDE_DIRS - the cpluff include directories -# -# and link Kodi against the cpluff libraries. - -if(NOT WIN32) - string(REPLACE ";" " " defines "${CMAKE_C_FLAGS} ${SYSTEM_DEFINES} -I${EXPAT_INCLUDE_DIR}") - get_filename_component(expat_dir ${EXPAT_LIBRARY} DIRECTORY) - set(ldflags "-L${expat_dir}") - - # iOS: Without specifying -arch, configure tries to use /bin/cpp as C-preprocessor - # http://stackoverflow.com/questions/38836754/cant-cross-compile-c-library-for-arm-ios - if(CORE_SYSTEM_NAME STREQUAL ios) - set(cppflags "-arch ${CPU}") - endif() - - ExternalProject_Add(libcpluff SOURCE_DIR ${CORE_SOURCE_DIR}/lib/cpluff - BUILD_IN_SOURCE 1 - PREFIX ${CORE_BUILD_DIR}/cpluff - CONFIGURE_COMMAND CC=${CMAKE_C_COMPILER} ${CORE_SOURCE_DIR}/lib/cpluff/configure - --disable-nls - --enable-static - --disable-shared - --with-pic - --prefix=<INSTALL_DIR> - --libdir=<INSTALL_DIR>/lib - --host=${ARCH} - CFLAGS=${defines} - CPPFLAGS=${cppflags} - LDFLAGS=${ldflags}) - ExternalProject_Add_Step(libcpluff autoreconf - DEPENDEES download update patch - DEPENDERS configure - COMMAND rm -f config.status - COMMAND PATH=${NATIVEPREFIX}/bin:$ENV{PATH} autoreconf -vif - WORKING_DIRECTORY <SOURCE_DIR>) - - set(ldflags "${ldflags};-lexpat") - core_link_library(${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/cpluff/lib/libcpluff.a - system/libcpluff libcpluff extras "${ldflags}") - set(CPLUFF_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/cpluff/include) - set(CPLUFF_FOUND 1) - mark_as_advanced(CPLUFF_INCLUDE_DIRS CPLUFF_FOUND) -else() - find_path(CPLUFF_INCLUDE_DIR cpluff.h) - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(CPLUFF - REQUIRED_VARS CPLUFF_INCLUDE_DIR) - - if(CPLUFF_FOUND) - set(CPLUFF_INCLUDE_DIRS ${CPLUFF_INCLUDE_DIR}) - endif() - mark_as_advanced(CPLUFF_INCLUDE_DIRS CPLUFF_FOUND) - - add_custom_target(libcpluff) -endif() -set_target_properties(libcpluff PROPERTIES FOLDER "External Projects") diff --git a/project/cmake/modules/FindCrossGUID.cmake b/project/cmake/modules/FindCrossGUID.cmake deleted file mode 100644 index ba2823a7ae..0000000000 --- a/project/cmake/modules/FindCrossGUID.cmake +++ /dev/null @@ -1,78 +0,0 @@ -if(ENABLE_INTERNAL_CROSSGUID) - include(ExternalProject) - file(STRINGS ${CORE_SOURCE_DIR}/tools/depends/target/crossguid/Makefile VER) - string(REGEX MATCH "VERSION=[^ ]*" CGUID_VER "${VER}") - list(GET CGUID_VER 0 CGUID_VER) - string(SUBSTRING "${CGUID_VER}" 8 -1 CGUID_VER) - - # allow user to override the download URL with a local tarball - # needed for offline build envs - if(CROSSGUID_URL) - get_filename_component(CROSSGUID_URL "${CROSSGUID_URL}" ABSOLUTE) - else() - set(CROSSGUID_URL http://mirrors.kodi.tv/build-deps/sources/crossguid-${CGUID_VER}.tar.gz) - endif() - if(VERBOSE) - message(STATUS "CROSSGUID_URL: ${CROSSGUID_URL}") - endif() - - if(APPLE) - set(EXTRA_ARGS "-DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}") - endif() - - set(CROSSGUID_LIBRARY ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/libcrossguid.a) - set(CROSSGUID_INCLUDE_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/include) - externalproject_add(crossguid - URL ${CROSSGUID_URL} - DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download - PREFIX ${CORE_BUILD_DIR}/crossguid - CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR} - -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} - "${EXTRA_ARGS}" - PATCH_COMMAND ${CMAKE_COMMAND} -E copy - ${CORE_SOURCE_DIR}/tools/depends/target/crossguid/CMakeLists.txt - <SOURCE_DIR> && - ${CMAKE_COMMAND} -E copy - ${CORE_SOURCE_DIR}/tools/depends/target/crossguid/FindUUID.cmake - <SOURCE_DIR> && - ${CMAKE_COMMAND} -E copy - ${CORE_SOURCE_DIR}/tools/depends/target/crossguid/FindCXX11.cmake - <SOURCE_DIR> - BUILD_BYPRODUCTS ${CROSSGUID_LIBRARY}) - set_target_properties(crossguid PROPERTIES FOLDER "External Projects") - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(CrossGuid - REQUIRED_VARS CROSSGUID_LIBRARY CROSSGUID_INCLUDE_DIR - VERSION_VAR CGUID_VER) - - set(CROSSGUID_LIBRARIES ${CROSSGUID_LIBRARY}) - set(CROSSGUID_INCLUDE_DIRS ${CROSSGUID_INCLUDE_DIR}) -else() - find_path(CROSSGUID_INCLUDE_DIR NAMES guid.h) - - find_library(CROSSGUID_LIBRARY_RELEASE NAMES crossguid) - find_library(CROSSGUID_LIBRARY_DEBUG NAMES crossguidd) - - include(SelectLibraryConfigurations) - select_library_configurations(CROSSGUID) - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(CrossGuid - REQUIRED_VARS CROSSGUID_LIBRARY CROSSGUID_INCLUDE_DIR) - - if(CROSSGUID_FOUND) - set(CROSSGUID_LIBRARIES ${CROSSGUID_LIBRARY}) - set(CROSSGUID_INCLUDE_DIRS ${CROSSGUID_INCLUDE_DIR}) - - add_custom_target(crossguid) - set_target_properties(crossguid PROPERTIES FOLDER "External Projects") - endif() - mark_as_advanced(CROSSGUID_INCLUDE_DIR CROSSGUID_LIBRARY) -endif() - -if(NOT WIN32 AND NOT APPLE) - find_package(UUID REQUIRED) - list(APPEND CROSSGUID_INCLUDE_DIRS ${UUID_INCLUDE_DIRS}) - list(APPEND CROSSGUID_LIBRARIES ${UUID_LIBRARIES}) -endif() diff --git a/project/cmake/modules/FindCurl.cmake b/project/cmake/modules/FindCurl.cmake deleted file mode 100644 index ed4d81f387..0000000000 --- a/project/cmake/modules/FindCurl.cmake +++ /dev/null @@ -1,83 +0,0 @@ -#.rst: -# FindCurl -# -------- -# Finds the Curl library -# -# This will will define the following variables:: -# -# CURL_FOUND - system has Curl -# CURL_INCLUDE_DIRS - the Curl include directory -# CURL_LIBRARIES - the Curl libraries -# CURL_DEFINITIONS - the Curl definitions -# -# and the following imported targets:: -# -# Curl::Curl - The Curl library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_CURL libcurl QUIET) -endif() - -find_path(CURL_INCLUDE_DIR NAMES curl/curl.h - PATHS ${PC_CURL_INCLUDEDIR}) -find_library(CURL_LIBRARY NAMES curl libcurl - PATHS ${PC_CURL_LIBDIR}) - -set(CURL_VERSION ${PC_CURL_VERSION}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Curl - REQUIRED_VARS CURL_LIBRARY CURL_INCLUDE_DIR - VERSION_VAR CURL_VERSION) - -if(CURL_FOUND) - set(CURL_INCLUDE_DIRS ${CURL_INCLUDE_DIR}) - set(CURL_LIBRARIES ${CURL_LIBRARY}) - - # Check whether OpenSSL inside libcurl is static. - if(UNIX) - if(NOT DEFINED HAS_CURL_STATIC) - get_filename_component(CURL_LIBRARY_DIR ${CURL_LIBRARY} DIRECTORY) - find_soname(CURL REQUIRED) - - if(APPLE) - set(libchecker nm) - set(searchpattern "T [_]?CRYPTO_set_locking_call") - else() - set(libchecker readelf -s) - set(searchpattern "CRYPTO_set_locking_call") - endif() - execute_process( - COMMAND ${libchecker} ${CURL_LIBRARY_DIR}/${CURL_SONAME} - COMMAND grep -Eq ${searchpattern} - RESULT_VARIABLE HAS_CURL_STATIC) - unset(libchecker) - unset(searchpattern) - if(HAS_CURL_STATIC EQUAL 0) - set(HAS_CURL_STATIC TRUE) - else() - set(HAS_CURL_STATIC FALSE) - endif() - set(HAS_CURL_STATIC ${HAS_CURL_STATIC} CACHE INTERNAL - "OpenSSL is statically linked into Curl") - message(STATUS "OpenSSL is statically linked into Curl: ${HAS_CURL_STATIC}") - endif() - endif() - - if(HAS_CURL_STATIC) - set(CURL_DEFINITIONS -DHAS_CURL_STATIC=1) - endif() - - if(NOT TARGET Curl::Curl) - add_library(Curl::Curl UNKNOWN IMPORTED) - set_target_properties(Curl::Curl PROPERTIES - IMPORTED_LOCATION "${CURL_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${CURL_INCLUDE_DIR}") - if(HAS_CURL_STATIC) - set_target_properties(Curl::Curl PROPERTIES - INTERFACE_COMPILE_DEFINITIONS HAS_CURL_STATIC=1) - endif() - endif() -endif() - -mark_as_advanced(CURL_INCLUDE_DIR CURL_LIBRARY) diff --git a/project/cmake/modules/FindD3DX11Effects.cmake b/project/cmake/modules/FindD3DX11Effects.cmake deleted file mode 100644 index d7468e1db1..0000000000 --- a/project/cmake/modules/FindD3DX11Effects.cmake +++ /dev/null @@ -1,30 +0,0 @@ -# - Finds D3DX11 dependencies -# Once done this will define -# -# D3DCOMPILER_DLL - Path to the Direct3D Compiler -# FXC - Path to the DirectX Effects Compiler (FXC) - -find_file(D3DCOMPILER_DLL - NAMES d3dcompiler_47.dll d3dcompiler_46.dll - PATHS - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v10.0;InstallationFolder]/Redist/D3D/x86" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.1;InstallationFolder]/Redist/D3D/x86" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.0;InstallationFolder]/Redist/D3D/x86" - "$ENV{WindowsSdkDir}Redist/d3d/x86" - NO_DEFAULT_PATH) -if(NOT D3DCOMPILER_DLL) - message(WARNING "Could NOT find Direct3D Compiler") -endif() -mark_as_advanced(D3DCOMPILER_DLL) -copy_file_to_buildtree(${D3DCOMPILER_DLL} DIRECTORY .) - -find_program(FXC fxc - PATHS - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v10.0;InstallationFolder]/bin/x86" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.1;InstallationFolder]/bin/x86" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.0;InstallationFolder]/bin/x86" - "$ENV{WindowsSdkDir}bin/x86") -if(NOT FXC) - message(WARNING "Could NOT find DirectX Effects Compiler (FXC)") -endif() -mark_as_advanced(FXC) diff --git a/project/cmake/modules/FindDBus.cmake b/project/cmake/modules/FindDBus.cmake deleted file mode 100644 index 2d64af4ca2..0000000000 --- a/project/cmake/modules/FindDBus.cmake +++ /dev/null @@ -1,52 +0,0 @@ -#.rst: -# FindDBUS -# ------- -# Finds the DBUS library -# -# This will will define the following variables:: -# -# DBUS_FOUND - system has DBUS -# DBUS_INCLUDE_DIRS - the DBUS include directory -# DBUS_LIBRARIES - the DBUS libraries -# DBUS_DEFINITIONS - the DBUS definitions -# -# and the following imported targets:: -# -# DBus::DBus - The DBUS library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_DBUS dbus-1 QUIET) -endif() - -find_path(DBUS_INCLUDE_DIR NAMES dbus/dbus.h - PATH_SUFFIXES dbus-1.0 - PATHS ${PC_DBUS_INCLUDE_DIR}) -find_path(DBUS_ARCH_INCLUDE_DIR NAMES dbus/dbus-arch-deps.h - PATH_SUFFIXES dbus-1.0/include - PATHS ${PC_DBUS_LIBDIR} - /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}) -find_library(DBUS_LIBRARY NAMES dbus-1 - PATHS ${PC_DBUS_LIBDIR}) - -set(DBUS_VERSION ${PC_DBUS_VERSION}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(DBus - REQUIRED_VARS DBUS_LIBRARY DBUS_INCLUDE_DIR DBUS_ARCH_INCLUDE_DIR - VERSION_VAR DBUS_VERSION) - -if(DBUS_FOUND) - set(DBUS_LIBRARIES ${DBUS_LIBRARY}) - set(DBUS_INCLUDE_DIRS ${DBUS_INCLUDE_DIR} ${DBUS_ARCH_INCLUDE_DIR}) - set(DBUS_DEFINITIONS -DHAVE_DBUS=1) - - if(NOT TARGET DBus::DBus) - add_library(DBus::DBus UNKNOWN IMPORTED) - set_target_properties(DBus::DBus PROPERTIES - IMPORTED_LOCATION "${DBUS_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${DBUS_INCLUDE_DIR}" - INTERFACE_COMPILE_DEFINITIONS HAVE_DBUS=1) - endif() -endif() - -mark_as_advanced(DBUS_INCLUDE_DIR DBUS_LIBRARY) diff --git a/project/cmake/modules/FindEGL.cmake b/project/cmake/modules/FindEGL.cmake deleted file mode 100644 index 79bb176fe8..0000000000 --- a/project/cmake/modules/FindEGL.cmake +++ /dev/null @@ -1,48 +0,0 @@ -#.rst: -# FindEGL -# ------- -# Finds the EGL library -# -# This will will define the following variables:: -# -# EGL_FOUND - system has EGL -# EGL_INCLUDE_DIRS - the EGL include directory -# EGL_LIBRARIES - the EGL libraries -# EGL_DEFINITIONS - the EGL definitions -# -# and the following imported targets:: -# -# EGL::EGL - The EGL library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_EGL egl QUIET) -endif() - -find_path(EGL_INCLUDE_DIR EGL/egl.h - PATHS ${PC_EGL_INCLUDEDIR}) - -find_library(EGL_LIBRARY NAMES EGL egl - PATHS ${PC_EGL_LIBDIR}) - -set(EGL_VERSION ${PC_EGL_VERSION}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(EGL - REQUIRED_VARS EGL_LIBRARY EGL_INCLUDE_DIR - VERSION_VAR EGL_VERSION) - -if(EGL_FOUND) - set(EGL_LIBRARIES ${EGL_LIBRARY}) - set(EGL_INCLUDE_DIRS ${EGL_INCLUDE_DIR}) - set(EGL_DEFINITIONS -DHAVE_LIBEGL=1) - - if(NOT TARGET EGL::EGL) - add_library(EGL::EGL UNKNOWN IMPORTED) - set_target_properties(EGL::EGL PROPERTIES - IMPORTED_LOCATION "${EGL_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${EGL_INCLUDE_DIR}" - INTERFACE_COMPILE_DEFINITIONS HAVE_LIBEGL=1) - endif() -endif() - -mark_as_advanced(EGL_INCLUDE_DIR EGL_LIBRARY) diff --git a/project/cmake/modules/FindEMBEDDED.cmake b/project/cmake/modules/FindEMBEDDED.cmake deleted file mode 100644 index 5e49716549..0000000000 --- a/project/cmake/modules/FindEMBEDDED.cmake +++ /dev/null @@ -1,16 +0,0 @@ -# - Try to find embedded platforms (RPI/IMX6) -# Once done this will define -# -# EMBEDDED_FOUND - system is RPI / IMX6 and we most probably want to compile for GLES2 support -# (don't configure for OpenGL) - -if(NOT CMAKE_SYSTEM_PROCESSOR) - set(CMAKE_SYSTEM_PROCESSOR ${CPU}) -endif() - -string(REGEX MATCH "^arm" TARGET_ARCH_ARM "${CMAKE_SYSTEM_PROCESSOR}") -if(NOT KODI_DEPENDSBUILD AND NOT TARGET_ARCH_ARM) - return() -endif() - -find_path(EMBEDDED_FOUND NAMES include/linux/imxfb.h include/bcm_host.h PATHS /opt/vc) diff --git a/project/cmake/modules/FindFFMPEG.cmake b/project/cmake/modules/FindFFMPEG.cmake deleted file mode 100644 index 3d7fcc8ca3..0000000000 --- a/project/cmake/modules/FindFFMPEG.cmake +++ /dev/null @@ -1,292 +0,0 @@ -# FindFFMPEG -# -------- -# Finds FFmpeg libraries -# -# This module will first look for the required library versions on the system. -# If they are not found, it will fall back to downloading and building kodi's own version -# -# -------- -# the following variables influence behaviour: -# ENABLE_INTERNAL_FFMPEG - if enabled, kodi's own version will always be built -# -# FFMPEG_PATH - use external ffmpeg not found in system paths -# usage: -DFFMPEG_PATH=/path/to/ffmpeg_install_prefix -# -# WITH_FFMPEG - use external ffmpeg not found in system paths -# WARNING: this option is for developers as it will _disable ffmpeg version checks_! -# Consider using FFMPEG_PATH instead, which _does_ check library versions -# usage: -DWITH_FFMPEG=/path/to/ffmpeg_install_prefix -# -# -------- -# This module will will define the following variables: -# -# FFMPEG_FOUND - system has FFmpeg -# FFMPEG_INCLUDE_DIRS - FFmpeg include directory -# FFMPEG_LIBRARIES - FFmpeg libraries -# FFMPEG_DEFINITIONS - pre-processor definitions -# FFMPEG_LDFLAGS - linker flags -# -# and the following imported targets:: -# -# ffmpeg - The FFmpeg libraries -# -------- -# - -# required ffmpeg library versions -set(REQUIRED_FFMPEG_VERSION 3.1) -set(_avcodec_ver ">=57.48.101") -set(_avfilter_ver ">=6.47.100") -set(_avformat_ver ">=57.41.100") -set(_avutil_ver ">=55.28.100") -set(_swscale_ver ">=4.1.100") -set(_swresample_ver ">=2.1.100") -set(_postproc_ver ">=54.0.100") - - -# Allows building with external ffmpeg not found in system paths, -# without library version checks -if(WITH_FFMPEG) - set(FFMPEG_PATH ${WITH_FFMPEG}) - message(STATUS "Warning: FFmpeg version checking disabled") - set(REQUIRED_FFMPEG_VERSION undef) - unset(_avcodec_ver) - unset(_avfilter_ver) - unset(_avformat_ver) - unset(_avutil_ver) - unset(_swscale_ver) - unset(_swresample_ver) - unset(_postproc_ver) -endif() - -# Allows building with external ffmpeg not found in system paths, -# with library version checks -if(FFMPEG_PATH) - set(ENABLE_INTERNAL_FFMPEG OFF) -endif() - -# external FFMPEG -if(NOT ENABLE_INTERNAL_FFMPEG OR KODI_DEPENDSBUILD) - if(FFMPEG_PATH) - set(ENV{PKG_CONFIG_PATH} "${FFMPEG_PATH}/lib/pkgconfig") - list(APPEND CMAKE_PREFIX_PATH ${FFMPEG_PATH}) - endif() - - set(FFMPEG_PKGS libavcodec${_avcodec_ver} - libavfilter${_avfilter_ver} - libavformat${_avformat_ver} - libavutil${_avutil_ver} - libswscale${_swscale_ver} - libswresample${_swresample_ver} - libpostproc${_postproc_ver}) - - if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_FFMPEG ${FFMPEG_PKGS} QUIET) - string(REGEX REPLACE "framework;" "framework " PC_FFMPEG_LDFLAGS "${PC_FFMPEG_LDFLAGS}") - endif() - - find_path(FFMPEG_INCLUDE_DIRS libavcodec/avcodec.h libavfilter/avfilter.h libavformat/avformat.h - libavutil/avutil.h libswscale/swscale.h libpostproc/postprocess.h - PATH_SUFFIXES ffmpeg - PATHS ${PC_FFMPEG_INCLUDE_DIRS} - NO_DEFAULT_PATH) - find_path(FFMPEG_INCLUDE_DIRS libavcodec/avcodec.h libavfilter/avfilter.h libavformat/avformat.h - libavutil/avutil.h libswscale/swscale.h libpostproc/postprocess.h) - - find_library(FFMPEG_LIBAVCODEC - NAMES avcodec libavcodec - PATH_SUFFIXES ffmpeg/libavcodec - PATHS ${PC_FFMPEG_libavcodec_LIBDIR} - NO_DEFAULT_PATH) - find_library(FFMPEG_LIBAVCODEC NAMES avcodec libavcodec PATH_SUFFIXES ffmpeg/libavcodec) - - find_library(FFMPEG_LIBAVFILTER - NAMES avfilter libavfilter - PATH_SUFFIXES ffmpeg/libavfilter - PATHS ${PC_FFMPEG_libavfilter_LIBDIR} - NO_DEFAULT_PATH) - find_library(FFMPEG_LIBAVFILTER NAMES avfilter libavfilter PATH_SUFFIXES ffmpeg/libavfilter) - - find_library(FFMPEG_LIBAVFORMAT - NAMES avformat libavformat - PATH_SUFFIXES ffmpeg/libavformat - PATHS ${PC_FFMPEG_libavformat_LIBDIR} - NO_DEFAULT_PATH) - find_library(FFMPEG_LIBAVFORMAT NAMES avformat libavformat PATH_SUFFIXES ffmpeg/libavformat) - - find_library(FFMPEG_LIBAVUTIL - NAMES avutil libavutil - PATH_SUFFIXES ffmpeg/libavutil - PATHS ${PC_FFMPEG_libavutil_LIBDIR} - NO_DEFAULT_PATH) - find_library(FFMPEG_LIBAVUTIL NAMES avutil libavutil PATH_SUFFIXES ffmpeg/libavutil) - - find_library(FFMPEG_LIBSWSCALE - NAMES swscale libswscale - PATH_SUFFIXES ffmpeg/libswscale - PATHS ${PC_FFMPEG_libswscale_LIBDIR} - NO_DEFAULT_PATH) - find_library(FFMPEG_LIBSWSCALE NAMES swscale libswscale PATH_SUFFIXES ffmpeg/libswscale) - - find_library(FFMPEG_LIBSWRESAMPLE - NAMES swresample libswresample - PATH_SUFFIXES ffmpeg/libswresample - PATHS ${PC_FFMPEG_libswresample_LIBDIR} - NO_DEFAULT_PATH) - find_library(FFMPEG_LIBSWRESAMPLE NAMES NAMES swresample libswresample PATH_SUFFIXES ffmpeg/libswresample) - - find_library(FFMPEG_LIBPOSTPROC - NAMES postproc libpostproc - PATH_SUFFIXES ffmpeg/libpostproc - PATHS ${PC_FFMPEG_libpostproc_LIBDIR} - NO_DEFAULT_PATH) - find_library(FFMPEG_LIBPOSTPROC NAMES postproc libpostproc PATH_SUFFIXES ffmpeg/libpostproc) - - if((PC_FFMPEG_FOUND - AND PC_FFMPEG_libavcodec_VERSION - AND PC_FFMPEG_libavfilter_VERSION - AND PC_FFMPEG_libavformat_VERSION - AND PC_FFMPEG_libavutil_VERSION - AND PC_FFMPEG_libswscale_VERSION - AND PC_FFMPEG_libswresample_VERSION - AND PC_FFMPEG_libpostproc_VERSION) - OR WIN32) - set(FFMPEG_VERSION ${REQUIRED_FFMPEG_VERSION}) - - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(FFMPEG - VERSION_VAR FFMPEG_VERSION - REQUIRED_VARS FFMPEG_INCLUDE_DIRS - FFMPEG_LIBAVCODEC - FFMPEG_LIBAVFILTER - FFMPEG_LIBAVFORMAT - FFMPEG_LIBAVUTIL - FFMPEG_LIBSWSCALE - FFMPEG_LIBSWRESAMPLE - FFMPEG_LIBPOSTPROC - FFMPEG_VERSION - FAIL_MESSAGE "FFmpeg ${REQUIRED_FFMPEG_VERSION} not found, please consider using -DENABLE_INTERNAL_FFMPEG=ON") - - else() - message(STATUS "FFmpeg ${REQUIRED_FFMPEG_VERSION} not found, falling back to internal build") - unset(FFMPEG_INCLUDE_DIRS) - unset(FFMPEG_INCLUDE_DIRS CACHE) - unset(FFMPEG_LIBRARIES) - unset(FFMPEG_LIBRARIES CACHE) - unset(FFMPEG_DEFINITIONS) - unset(FFMPEG_DEFINITIONS CACHE) - endif() - - if(FFMPEG_FOUND) - set(FFMPEG_LDFLAGS ${PC_FFMPEG_LDFLAGS} CACHE STRING "ffmpeg linker flags") - - # check if ffmpeg libs are statically linked - set(FFMPEG_LIB_TYPE SHARED) - foreach(_fflib IN LISTS FFMPEG_LIBRARIES) - if(${_fflib} MATCHES ".+\.a$" AND PC_FFMPEG_STATIC_LDFLAGS) - set(FFMPEG_LDFLAGS ${PC_FFMPEG_STATIC_LDFLAGS} CACHE STRING "ffmpeg linker flags" FORCE) - set(FFMPEG_LIB_TYPE STATIC) - break() - endif() - endforeach() - - set(FFMPEG_LIBRARIES ${FFMPEG_LIBAVCODEC} ${FFMPEG_LIBAVFILTER} - ${FFMPEG_LIBAVFORMAT} ${FFMPEG_LIBAVUTIL} - ${FFMPEG_LIBSWSCALE} ${FFMPEG_LIBSWRESAMPLE} - ${FFMPEG_LIBPOSTPROC} ${FFMPEG_LDFLAGS}) - list(APPEND FFMPEG_DEFINITIONS -DFFMPEG_VER_SHA=\"${FFMPEG_VERSION}\") - - if(NOT TARGET ffmpeg) - add_library(ffmpeg ${FFMPEG_LIB_TYPE} IMPORTED) - set_target_properties(ffmpeg PROPERTIES - FOLDER "External Projects" - IMPORTED_LOCATION "${FFMPEG_LIBRARIES}" - INTERFACE_INCLUDE_DIRECTORIES "${FFMPEG_INCLUDE_DIRS}" - INTERFACE_LINK_LIBRARIES "${FFMPEG_LDFLAGS}" - INTERFACE_COMPILE_DEFINITIONS "${FFMPEG_DEFINITIONS}") - endif() - endif() -endif() - -# Internal FFMPEG -if(NOT FFMPEG_FOUND) - include(ExternalProject) - file(STRINGS ${CORE_SOURCE_DIR}/tools/depends/target/ffmpeg/FFMPEG-VERSION VER) - string(REGEX MATCH "VERSION=[^ ]*$.*" FFMPEG_VER "${VER}") - list(GET FFMPEG_VER 0 FFMPEG_VER) - string(SUBSTRING "${FFMPEG_VER}" 8 -1 FFMPEG_VER) - string(REGEX MATCH "BASE_URL=([^ ]*)" FFMPEG_BASE_URL "${VER}") - list(GET FFMPEG_BASE_URL 0 FFMPEG_BASE_URL) - string(SUBSTRING "${FFMPEG_BASE_URL}" 9 -1 FFMPEG_BASE_URL) - - # allow user to override the download URL with a local tarball - # needed for offline build envs - if(FFMPEG_URL) - get_filename_component(FFMPEG_URL "${FFMPEG_URL}" ABSOLUTE) - else() - set(FFMPEG_URL ${FFMPEG_BASE_URL}/${FFMPEG_VER}.tar.gz) - endif() - if(VERBOSE) - message(STATUS "FFMPEG_URL: ${FFMPEG_URL}") - endif() - - if(KODI_DEPENDSBUILD) - set(CROSS_ARGS -DDEPENDS_PATH=${DEPENDS_PATH} - -DPKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE} - -DCROSSCOMPILING=${CMAKE_CROSSCOMPILING} - -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} - -DCORE_SYSTEM_NAME=${CORE_SYSTEM_NAME} - -DCPU=${WITH_CPU} - -DOS=${OS} - -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} - -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} - -DCMAKE_AR=${CMAKE_AR} - -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} - -DCMAKE_EXE_LINKER_FLAGS=${CMAKE_EXE_LINKER_FLAGS}) - endif() - - externalproject_add(ffmpeg - URL ${FFMPEG_URL} - DOWNLOAD_NAME ffmpeg-${FFMPEG_VER}.tar.gz - DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download - PREFIX ${CORE_BUILD_DIR}/ffmpeg - CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR} - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DFFMPEG_VER=${FFMPEG_VER} - -DCORE_SYSTEM_NAME=${CORE_SYSTEM_NAME} - ${CROSS_ARGS} - PATCH_COMMAND ${CMAKE_COMMAND} -E copy - ${CORE_SOURCE_DIR}/tools/depends/target/ffmpeg/CMakeLists.txt - <SOURCE_DIR> && - ${CMAKE_COMMAND} -E copy - ${CORE_SOURCE_DIR}/tools/depends/target/ffmpeg/FindGnuTls.cmake - <SOURCE_DIR>) - - file(WRITE ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/ffmpeg/ffmpeg-link-wrapper -"#!/bin/bash -if [[ $@ == *${APP_NAME_LC}.bin* || $@ == *${APP_NAME_LC}.so* || $@ == *${APP_NAME_LC}-test* ]] -then - avformat=`PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig ${PKG_CONFIG_EXECUTABLE} --libs --static libavcodec` - avcodec=`PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig ${PKG_CONFIG_EXECUTABLE} --libs --static libavformat` - avfilter=`PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig ${PKG_CONFIG_EXECUTABLE} --libs --static libavfilter` - avutil=`PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig ${PKG_CONFIG_EXECUTABLE} --libs --static libavutil` - swscale=`PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig ${PKG_CONFIG_EXECUTABLE} --libs --static libswscale` - swresample=`PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig ${PKG_CONFIG_EXECUTABLE} --libs --static libswresample` - gnutls=`PKG_CONFIG_PATH=${DEPENDS_PATH}/lib/pkgconfig/ ${PKG_CONFIG_EXECUTABLE} --libs-only-l --static --silence-errors gnutls` - $@ $avcodec $avformat $avcodec $avfilter $swscale $swresample -lpostproc $gnutls -else - $@ -fi") - file(COPY ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/ffmpeg/ffmpeg-link-wrapper - DESTINATION ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR} - FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE) - set(FFMPEG_LINK_EXECUTABLE "${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/ffmpeg-link-wrapper <CMAKE_CXX_COMPILER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>" PARENT_SCOPE) - set(FFMPEG_CREATE_SHARED_LIBRARY "${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/ffmpeg-link-wrapper <CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>" PARENT_SCOPE) - set(FFMPEG_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/include) - list(APPEND FFMPEG_DEFINITIONS -DFFMPEG_VER_SHA=\"${FFMPEG_VER}\" - -DUSE_STATIC_FFMPEG=1) - set(FFMPEG_FOUND 1) - set_target_properties(ffmpeg PROPERTIES FOLDER "External Projects") -endif() - -mark_as_advanced(FFMPEG_INCLUDE_DIRS FFMPEG_LIBRARIES FFMPEG_LDFLAGS FFMPEG_DEFINITIONS FFMPEG_FOUND) diff --git a/project/cmake/modules/FindFreeType.cmake b/project/cmake/modules/FindFreeType.cmake deleted file mode 100644 index fb4c668b7b..0000000000 --- a/project/cmake/modules/FindFreeType.cmake +++ /dev/null @@ -1,45 +0,0 @@ -#.rst: -# FindFreetype -# ------------ -# Finds the FreeType library -# -# This will will define the following variables:: -# -# FREETYPE_FOUND - system has FreeType -# FREETYPE_INCLUDE_DIRS - the FreeType include directory -# FREETYPE_LIBRARIES - the FreeType libraries -# -# and the following imported targets:: -# -# FreeType::FreeType - The FreeType library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_FREETYPE freetype2 QUIET) -endif() - -find_path(FREETYPE_INCLUDE_DIR NAMES freetype/freetype.h freetype.h - PATHS ${PC_FREETYPE_INCLUDEDIR} - ${PC_FREETYPE_INCLUDE_DIRS}) -find_library(FREETYPE_LIBRARY NAMES freetype freetype246MT - PATHS ${PC_FREETYPE_LIBDIR}) - -set(FREETYPE_VERSION ${PC_FREETYPE_VERSION}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(FreeType - REQUIRED_VARS FREETYPE_LIBRARY FREETYPE_INCLUDE_DIR - VERSION_VAR FREETYPE_VERSION) - -if(FREETYPE_FOUND) - set(FREETYPE_LIBRARIES ${FREETYPE_LIBRARY}) - set(FREETYPE_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIR}) - - if(NOT TARGET FreeType::FreeType) - add_library(FreeType::FreeType UNKNOWN IMPORTED) - set_target_properties(FreeType::FreeType PROPERTIES - IMPORTED_LOCATION "${FREETYPE_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${FREETYPE_INCLUDE_DIR}") - endif() -endif() - -mark_as_advanced(FREETYPE_INCLUDE_DIR FREETYPE_LIBRARY) diff --git a/project/cmake/modules/FindFribidi.cmake b/project/cmake/modules/FindFribidi.cmake deleted file mode 100644 index dcaeb48b7d..0000000000 --- a/project/cmake/modules/FindFribidi.cmake +++ /dev/null @@ -1,48 +0,0 @@ -#.rst: -# FindFribidi -# ----------- -# Finds the GNU FriBidi library -# -# This will will define the following variables:: -# -# FRIBIDI_FOUND - system has FriBidi -# FRIBIDI_INCLUDE_DIRS - the FriBidi include directory -# FRIBIDI_LIBRARIES - the FriBidi libraries -# -# and the following imported targets:: -# -# FriBidi::FriBidi - The FriBidi library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_FRIBIDI fribidi QUIET) -endif() - -find_path(FRIBIDI_INCLUDE_DIR NAMES fribidi/fribidi.h - PATHS ${PC_FRIBIDI_INCLUDEDIR}) -find_library(FRIBIDI_LIBRARY NAMES fribidi libfribidi - PATHS ${PC_FRIBIDI_LIBDIR}) - -set(FRIBIDI_VERSION ${PC_FRIBIDI_VERSION}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(FriBidi - REQUIRED_VARS FRIBIDI_LIBRARY FRIBIDI_INCLUDE_DIR - VERSION_VAR FRIBIDI_VERSION) - -if(FRIBIDI_FOUND) - set(FRIBIDI_LIBRARIES ${FRIBIDI_LIBRARY}) - set(FRIBIDI_INCLUDE_DIRS ${FRIBIDI_INCLUDE_DIR}) - if(PC_FRIBIDI_CFLAGS) - set(FRIBIDI_DEFINITIONS ${PC_FRIBIDI_CFLAGS}) - endif() - - if(NOT TARGET FriBidi::FriBidi) - add_library(FriBidi::FriBidi UNKNOWN IMPORTED) - set_target_properties(FriBidi::FriBidi PROPERTIES - IMPORTED_LOCATION "${FRIBIDI_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${FRIBIDI_INCLUDE_DIR}" - INTERFACE_COMPILE_OPTIONS "${FRIBIDI_DEFINITIONS}") - endif() -endif() - -mark_as_advanced(FRIBIDI_INCLUDE_DIR FRIBIDI_LIBRARY) diff --git a/project/cmake/modules/FindGIF.cmake b/project/cmake/modules/FindGIF.cmake deleted file mode 100644 index 8649bd4f47..0000000000 --- a/project/cmake/modules/FindGIF.cmake +++ /dev/null @@ -1,46 +0,0 @@ -#.rst: -# FindGIF -# ------- -# Finds the libgif library -# -# This will will define the following variables:: -# -# GIF_FOUND - system has libgif -# GIF_INCLUDE_DIRS - the libgif include directory -# GIF_LIBRARIES - the libgif libraries -# -# and the following imported targets:: -# -# GIF::GIF - The libgif library - -find_path(GIF_INCLUDE_DIR gif_lib.h) - -include(FindPackageHandleStandardArgs) -if(NOT WIN32) - find_library(GIF_LIBRARY NAMES gif) - find_package_handle_standard_args(GIF - REQUIRED_VARS GIF_LIBRARY GIF_INCLUDE_DIR) -else() - # Dynamically loaded DLL - find_package_handle_standard_args(GIF - REQUIRED_VARS GIF_INCLUDE_DIR) -endif() - -if(GIF_FOUND) - set(GIF_LIBRARIES ${GIF_LIBRARY}) - set(GIF_INCLUDE_DIRS ${GIF_INCLUDE_DIR}) - set(GIF_DEFINITIONS -DHAVE_LIBGIF=1) - - if(NOT TARGET GIF::GIF) - add_library(GIF::GIF UNKNOWN IMPORTED) - if(GIF_LIBRARY) - set_target_properties(GIF::GIF PROPERTIES - IMPORTED_LOCATION "${GIF_LIBRARY}") - endif() - set_target_properties(GIF::GIF PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${GIF_INCLUDE_DIR}" - INTERFACE_COMPILE_DEFINITIONS HAVE_LIBGIF=1) - endif() -endif() - -mark_as_advanced(GIF_INCLUDE_DIR GIF_LIBRARY) diff --git a/project/cmake/modules/FindJsonSchemaBuilder.cmake b/project/cmake/modules/FindJsonSchemaBuilder.cmake deleted file mode 100644 index 3bffb4831c..0000000000 --- a/project/cmake/modules/FindJsonSchemaBuilder.cmake +++ /dev/null @@ -1,21 +0,0 @@ -#.rst: -# FindJsonSchemaBuilder -# --------------------- -# Finds the JsonSchemaBuilder -# -# This will define the following (imported) targets:: -# -# JsonSchemaBuilder::JsonSchemaBuilder - The JsonSchemaBuilder executable - -if(NOT TARGET JsonSchemaBuilder::JsonSchemaBuilder) - if(KODI_DEPENDSBUILD OR CMAKE_CROSSCOMPILING) - add_executable(JsonSchemaBuilder::JsonSchemaBuilder IMPORTED GLOBAL) - set_target_properties(JsonSchemaBuilder::JsonSchemaBuilder PROPERTIES - IMPORTED_LOCATION "${NATIVEPREFIX}/bin/JsonSchemaBuilder") - set_target_properties(JsonSchemaBuilder::JsonSchemaBuilder PROPERTIES FOLDER Tools) - else() - add_subdirectory(${CORE_SOURCE_DIR}/tools/depends/native/JsonSchemaBuilder build/jsonschemabuilder) - add_executable(JsonSchemaBuilder::JsonSchemaBuilder ALIAS JsonSchemaBuilder) - set_target_properties(JsonSchemaBuilder PROPERTIES FOLDER Tools) - endif() -endif() diff --git a/project/cmake/modules/FindLibDRM.cmake b/project/cmake/modules/FindLibDRM.cmake deleted file mode 100644 index 35d632e7f3..0000000000 --- a/project/cmake/modules/FindLibDRM.cmake +++ /dev/null @@ -1,45 +0,0 @@ -#.rst: -# FindLibDRM -# ---------- -# Finds the LibDRM library -# -# This will will define the following variables:: -# -# LIBDRM_FOUND - system has LibDRM -# LIBDRM_INCLUDE_DIRS - the LibDRM include directory -# LIBDRM_LIBRARIES - the LibDRM libraries -# -# and the following imported targets:: -# -# LibDRM::LibDRM - The LibDRM library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_LIBDRM libdrm QUIET) -endif() - -find_path(LIBDRM_INCLUDE_DIR NAMES drm.h - PATH_SUFFIXES libdrm drm - PATHS ${PC_LIBDRM_INCLUDEDIR}) -find_library(LIBDRM_LIBRARY NAMES drm - PATHS ${PC_LIBDRM_LIBDIR}) - -set(LIBDRM_VERSION ${PC_LIBDRM_VERSION}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(LibDRM - REQUIRED_VARS LIBDRM_LIBRARY LIBDRM_INCLUDE_DIR - VERSION_VAR LIBDRM_VERSION) - -if(LIBDRM_FOUND) - set(LIBDRM_LIBRARIES ${LIBDRM_LIBRARY}) - set(LIBDRM_INCLUDE_DIRS ${LIBDRM_INCLUDE_DIR}) - - if(NOT TARGET LIBDRM::LIBDRM) - add_library(LIBDRM::LIBDRM UNKNOWN IMPORTED) - set_target_properties(LIBDRM::LIBDRM PROPERTIES - IMPORTED_LOCATION "${LIBDRM_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${LIBDRM_INCLUDE_DIR}") - endif() -endif() - -mark_as_advanced(LIBDRM_INCLUDE_DIR LIBDRM_LIBRARY) diff --git a/project/cmake/modules/FindLibDvd.cmake b/project/cmake/modules/FindLibDvd.cmake deleted file mode 100644 index 1f02b5f226..0000000000 --- a/project/cmake/modules/FindLibDvd.cmake +++ /dev/null @@ -1,219 +0,0 @@ -if(NOT WIN32) - if(KODI_DEPENDSBUILD) - set(_dvdlibs dvdread dvdnav) - set(_handlevars LIBDVD_INCLUDE_DIRS DVDREAD_LIBRARY DVDNAV_LIBRARY) - if(ENABLE_DVDCSS) - list(APPEND _dvdlibs libdvdcss) - list(APPEND _handlevars DVDCSS_LIBRARY) - endif() - - if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_DVD ${_dvdlibs} QUIET) - endif() - - find_path(LIBDVD_INCLUDE_DIRS dvdnav/dvdnav.h PATHS ${PC_DVD_INCLUDE_DIRS}) - find_library(DVDREAD_LIBRARY NAMES dvdread libdvdread PATHS ${PC_DVD_dvdread_LIBDIR}) - find_library(DVDNAV_LIBRARY NAMES dvdnav libdvdnav PATHS ${PC_DVD_dvdnav_LIBDIR}) - if(ENABLE_DVDCSS) - find_library(DVDCSS_LIBRARY NAMES dvdcss libdvdcss PATHS ${PC_DVD_libdvdcss_LIBDIR}) - endif() - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(LIBDVD REQUIRED_VARS ${_handlevars}) - if(LIBDVD_FOUND) - add_library(dvdnav UNKNOWN IMPORTED) - set_target_properties(dvdnav PROPERTIES - FOLDER "External Projects" - IMPORTED_LOCATION "${DVDNAV_LIBRARY}") - - add_library(dvdread UNKNOWN IMPORTED) - set_target_properties(dvdread PROPERTIES - FOLDER "External Projects" - IMPORTED_LOCATION "${DVDREAD_LIBRARY}") - add_library(dvdcss UNKNOWN IMPORTED) - set_target_properties(dvdcss PROPERTIES - FOLDER "External Projects" - IMPORTED_LOCATION "${DVDCSS_LIBRARY}") - - set(_linklibs ${DVDREAD_LIBRARY}) - if(ENABLE_DVDCSS) - list(APPEND _linklibs ${DVDCSS_LIBRARY}) - endif() - core_link_library(${DVDNAV_LIBRARY} system/players/VideoPlayer/libdvdnav dvdnav archives "${_linklibs}") - set(LIBDVD_LIBRARIES ${DVDNAV_LIBRARY}) - mark_as_advanced(LIBDVD_INCLUDE_DIRS LIBDVD_LIBRARIES) - endif() - else() - set(dvdlibs libdvdread libdvdnav) - if(ENABLE_DVDCSS) - list(APPEND dvdlibs libdvdcss) - endif() - foreach(dvdlib ${dvdlibs}) - file(GLOB VERSION_FILE ${CORE_SOURCE_DIR}/tools/depends/target/${dvdlib}/DVD*-VERSION) - file(STRINGS ${VERSION_FILE} VER) - string(REGEX MATCH "VERSION=[^ ]*$.*" ${dvdlib}_VER "${VER}") - list(GET ${dvdlib}_VER 0 ${dvdlib}_VER) - string(SUBSTRING "${${dvdlib}_VER}" 8 -1 ${dvdlib}_VER) - string(REGEX MATCH "BASE_URL=([^ ]*)" ${dvdlib}_BASE_URL "${VER}") - list(GET ${dvdlib}_BASE_URL 0 ${dvdlib}_BASE_URL) - string(SUBSTRING "${${dvdlib}_BASE_URL}" 9 -1 ${dvdlib}_BASE_URL) - string(TOUPPER ${dvdlib} DVDLIB) - - # allow user to override the download URL with a local tarball - # needed for offline build envs - # allow upper and lowercase var name - if(${dvdlib}_URL) - set(${DVDLIB}_URL ${${dvdlib}_URL}) - endif() - if(${DVDLIB}_URL) - get_filename_component(${DVDLIB}_URL "${${DVDLIB}_URL}" ABSOLUTE) - else() - set(${DVDLIB}_URL ${${dvdlib}_BASE_URL}/archive/${${dvdlib}_VER}.tar.gz) - endif() - if(VERBOSE) - message(STATUS "${DVDLIB}_URL: ${${DVDLIB}_URL}") - endif() - endforeach() - - set(DVDREAD_CFLAGS "${DVDREAD_CFLAGS} -I${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/include") - if(CMAKE_CROSSCOMPILING) - set(EXTRA_FLAGS "CC=${CMAKE_C_COMPILER}") - endif() - - if(APPLE) - set(CMAKE_LD_FLAGS "-framework IOKit -framework CoreFoundation") - endif() - - set(HOST_ARCH ${ARCH}) - if(CORE_SYSTEM_NAME STREQUAL android) - if(ARCH STREQUAL arm) - set(HOST_ARCH arm-linux-androideabi) - elseif(ARCH STREQUAL aarch64) - set(HOST_ARCH aarch64-linux-android) - elseif(ARCH STREQUAL i486-linux) - set(HOST_ARCH i686-linux-android) - endif() - endif() - - if(ENABLE_DVDCSS) - set(DVDCSS_LIBRARY ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/lib/libdvdcss.a) - ExternalProject_Add(dvdcss URL ${LIBDVDCSS_URL} - DOWNLOAD_NAME libdvdcss-${libdvdcss_VER}.tar.gz - DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download - PREFIX ${CORE_BUILD_DIR}/libdvd - CONFIGURE_COMMAND ac_cv_path_GIT= <SOURCE_DIR>/configure - --target=${HOST_ARCH} - --host=${HOST_ARCH} - --disable-doc - --enable-static - --disable-shared - --with-pic - --prefix=<INSTALL_DIR> - --libdir=<INSTALL_DIR>/lib - "${EXTRA_FLAGS}" - "CFLAGS=${CMAKE_C_FLAGS} ${DVDREAD_CFLAGS}" - "LDFLAGS=${CMAKE_LD_FLAGS}" - BUILD_BYPRODUCTS ${DVDCSS_LIBRARY}) - ExternalProject_Add_Step(dvdcss autoreconf - DEPENDEES download update patch - DEPENDERS configure - COMMAND PATH=${NATIVEPREFIX}/bin:$ENV{PATH} autoreconf -vif - WORKING_DIRECTORY <SOURCE_DIR>) - - set_target_properties(dvdcss PROPERTIES FOLDER "External Projects") - endif() - - set(DVDREAD_CFLAGS "-D_XBMC") - if(ENABLE_DVDCSS) - set(DVDREAD_CFLAGS "${DVDREAD_CFLAGS} -DHAVE_DVDCSS_DVDCSS_H -I${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/include") - endif() - - set(DVDREAD_LIBRARY ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/lib/libdvdread.a) - ExternalProject_Add(dvdread URL ${LIBDVDREAD_URL} - DOWNLOAD_NAME libdvdread-${libdvdread_VER}.tar.gz - DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download - PREFIX ${CORE_BUILD_DIR}/libdvd - CONFIGURE_COMMAND ac_cv_path_GIT= <SOURCE_DIR>/configure - --target=${HOST_ARCH} - --host=${HOST_ARCH} - --enable-static - --disable-shared - --with-pic - --prefix=<INSTALL_DIR> - --libdir=<INSTALL_DIR>/lib - "${EXTRA_FLAGS}" - "CFLAGS=${CMAKE_C_FLAGS} ${DVDREAD_CFLAGS}" - "LDFLAGS=${CMAKE_LD_FLAGS}" - BUILD_BYPRODUCTS ${DVDREAD_LIBRARY}) - ExternalProject_Add_Step(dvdread autoreconf - DEPENDEES download update patch - DEPENDERS configure - COMMAND PATH=${NATIVEPREFIX}/bin:$ENV{PATH} autoreconf -vif - WORKING_DIRECTORY <SOURCE_DIR>) - if(ENABLE_DVDCSS) - add_dependencies(dvdread dvdcss) - endif() - - set_target_properties(dvdread PROPERTIES FOLDER "External Projects") - - if(ENABLE_DVDCSS) - set(DVDNAV_LIBS -ldvdcss) - endif() - - set(DVDNAV_LIBRARY ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/lib/libdvdnav.a) - ExternalProject_Add(dvdnav URL ${LIBDVDNAV_URL} - DOWNLOAD_NAME libdvdnav-${libdvdnav_VER}.tar.gz - DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download - PREFIX ${CORE_BUILD_DIR}/libdvd - CONFIGURE_COMMAND ac_cv_path_GIT= <SOURCE_DIR>/configure - --target=${HOST_ARCH} - --host=${HOST_ARCH} - --enable-static - --disable-shared - --with-pic - --prefix=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd - --libdir=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/lib - "${EXTRA_FLAGS}" - "LDFLAGS=${CMAKE_LD_FLAGS} -L${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/lib" - "CFLAGS=${CMAKE_C_FLAGS} ${DVDREAD_CFLAGS}" - "DVDREAD_CFLAGS=${DVDREAD_CFLAGS}" - "DVDREAD_LIBS=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/lib/libdvdread.la" - "LIBS=${DVDNAV_LIBS}" - BUILD_BYPRODUCTS ${DVDNAV_LIBRARY}) - ExternalProject_Add_Step(dvdnav autoreconf - DEPENDEES download update patch - DEPENDERS configure - COMMAND PATH=${NATIVEPREFIX}/bin:$ENV{PATH} autoreconf -vif - WORKING_DIRECTORY <SOURCE_DIR>) - add_dependencies(dvdnav dvdread) - set_target_properties(dvdnav PROPERTIES FOLDER "External Projects") - - set(_dvdlibs ${DVDREAD_LIBRARY} ${DVDCSS_LIBRARY}) - # link a shared dvdnav library that includes the whole archives of dvdread and dvdcss as well - # the quotes around _dvdlibs are on purpose, since we want to pass a list to the function that will be unpacked automatically - core_link_library(${DVDNAV_LIBRARY} system/players/VideoPlayer/libdvdnav dvdnav archives "${_dvdlibs}") - - set(LIBDVD_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/include) - set(LIBDVD_LIBRARIES ${DVDNAV_LIBRARY} ${DVDREAD_LIBRARY}) - if(ENABLE_DVDCSS) - list(APPEND LIBDVD_LIBRARIES ${DVDCSS_LIBRARY}) - endif() - set(LIBDVD_LIBRARIES ${LIBDVD_LIBRARIES} CACHE STRING "libdvd libraries" FORCE) - set(LIBDVD_FOUND 1 CACHE BOOL "libdvd found" FORCE) - endif() -else() - # Dynamically loaded on Windows - find_path(LIBDVD_INCLUDE_DIR dvdcss/dvdcss.h PATHS ${CORE_SOURCE_DIR}/lib/libdvd/include) - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(LIBDVD REQUIRED_VARS LIBDVD_INCLUDE_DIR) - - if(LIBDVD_FOUND) - set(LIBDVD_INCLUDE_DIRS ${LIBDVD_INCLUDE_DIR}) - - add_custom_target(dvdnav) - set_target_properties(dvdnav PROPERTIES FOLDER "External Projects") - endif() - - mark_as_advanced(LIBDVD_INCLUDE_DIR) -endif() diff --git a/project/cmake/modules/FindLibUSB.cmake b/project/cmake/modules/FindLibUSB.cmake deleted file mode 100644 index e976bf48e4..0000000000 --- a/project/cmake/modules/FindLibUSB.cmake +++ /dev/null @@ -1,45 +0,0 @@ -#.rst: -# FindLibUSB -# ---------- -# Finds the USB library -# -# This will will define the following variables:: -# -# LIBUSB_FOUND - system has LibUSB -# LIBUSB_INCLUDE_DIRS - the USB include directory -# LIBUSB_LIBRARIES - the USB libraries -# -# and the following imported targets:: -# -# LibUSB::LibUSB - The USB library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_LIBUSB libusb QUIET) -endif() - -find_path(LIBUSB_INCLUDE_DIR usb.h - PATHS ${PC_LIBUSB_INCLUDEDIR}) -find_library(LIBUSB_LIBRARY NAMES usb - PATHS ${PC_LIBUSB_INCLUDEDIR}) -set(LIBUSB_VERSION ${PC_LIBUSB_VERSION}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(LIBUSB - REQUIRED_VARS LIBUSB_LIBRARY LIBUSB_INCLUDE_DIR - VERSION_VAR LIBUSB_VERSION) - -if(LIBUSB_FOUND) - set(LIBUSB_INCLUDE_DIRS ${LIBUSB_INCLUDE_DIR}) - set(LIBUSB_LIBRARIES ${LIBUSB_LIBRARY}) - set(LIBUSB_DEFINITIONS -DUSE_LIBUSB=1) - - if(NOT TARGET LibUSB::LibUSB) - add_library(LibUSB::LibUSB UNKNOWN IMPORTED) - set_target_properties(LibUSB::LibUSB PROPERTIES - IMPORTED_LOCATION "${LIBUSB_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${LIBUSB_INCLUDE_DIR}" - INTERFACE_COMPILE_DEFINITIONS USE_LIBUSB=1) - endif() -endif() - -mark_as_advanced(USB_INCLUDE_DIR USB_LIBRARY) diff --git a/project/cmake/modules/FindLibXml2.cmake b/project/cmake/modules/FindLibXml2.cmake deleted file mode 100644 index caeb9459fa..0000000000 --- a/project/cmake/modules/FindLibXml2.cmake +++ /dev/null @@ -1,84 +0,0 @@ -#.rst: -# FindLibXml2 -# ----------- -# -# Try to find the LibXml2 xml processing library -# -# Once done this will define -# -# :: -# -# LIBXML2_FOUND - System has LibXml2 -# LIBXML2_INCLUDE_DIR - The LibXml2 include directory -# LIBXML2_LIBRARIES - The libraries needed to use LibXml2 -# LIBXML2_DEFINITIONS - Compiler switches required for using LibXml2 -# LIBXML2_XMLLINT_EXECUTABLE - The XML checking tool xmllint coming with LibXml2 -# LIBXML2_VERSION_STRING - the version of LibXml2 found (since CMake 2.8.8) - -#============================================================================= -# Copyright 2006-2009 Kitware, Inc. -# Copyright 2006 Alexander Neundorf <neundorf@kde.org> -# Copyright 2016 Team Kodi -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -# use pkg-config to get the directories and then use these values -# in the find_path() and find_library() calls -find_package(PkgConfig QUIET) -PKG_CHECK_MODULES(PC_LIBXML QUIET libxml-2.0) -set(LIBXML2_DEFINITIONS ${PC_LIBXML_CFLAGS_OTHER}) - -find_path(LIBXML2_INCLUDE_DIR NAMES libxml/xpath.h - HINTS - ${PC_LIBXML_INCLUDEDIR} - ${PC_LIBXML_INCLUDE_DIRS} - PATH_SUFFIXES libxml2 - ) - -find_library(LIBXML2_LIBRARY NAMES xml2 libxml2 - HINTS - ${PC_LIBXML_LIBDIR} - ${PC_LIBXML_LIBRARY_DIRS} - ) - -find_program(LIBXML2_XMLLINT_EXECUTABLE xmllint) -# for backwards compat. with KDE 4.0.x: -set(XMLLINT_EXECUTABLE "${LIBXML2_XMLLINT_EXECUTABLE}") - -# Make sure to use static flags if apropriate -if(PC_LIBXML_FOUND) - if(${LIBXML2_LIBRARY} MATCHES ".+\.a$" AND PC_LIBXML_STATIC_LDFLAGS) - set(LIBXML2_LIBRARY ${LIBXML2_LIBRARY} ${PC_LIBXML_STATIC_LDFLAGS}) - endif() -endif() - -if(PC_LIBXML_VERSION) - set(LIBXML2_VERSION_STRING ${PC_LIBXML_VERSION}) -elseif(LIBXML2_INCLUDE_DIR AND EXISTS "${LIBXML2_INCLUDE_DIR}/libxml/xmlversion.h") - file(STRINGS "${LIBXML2_INCLUDE_DIR}/libxml/xmlversion.h" libxml2_version_str - REGEX "^#define[\t ]+LIBXML_DOTTED_VERSION[\t ]+\".*\"") - string(REGEX REPLACE "^#define[\t ]+LIBXML_DOTTED_VERSION[\t ]+\"([^\"]*)\".*" "\\1" - LIBXML2_VERSION_STRING "${libxml2_version_str}") - unset(libxml2_version_str) -endif() - - -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 - REQUIRED_VARS LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR - VERSION_VAR LIBXML2_VERSION_STRING) - -if(LibXml2_FOUND) - set(LIBXML2_LIBRARIES ${LIBXML2_LIBRARY}) - set(LIBXML2_INCLUDE_DIRS ${LIBXML2_INCLUDE_DIR}) -endif() - -mark_as_advanced(LIBXML2_INCLUDE_DIRS LIBXML2_LIBRARIES LIBXML2_XMLLINT_EXECUTABLE) diff --git a/project/cmake/modules/FindLzo2.cmake b/project/cmake/modules/FindLzo2.cmake deleted file mode 100644 index 4f7313f7fb..0000000000 --- a/project/cmake/modules/FindLzo2.cmake +++ /dev/null @@ -1,37 +0,0 @@ -#.rst: -# FindLzo2 -# -------- -# Finds the Lzo2 library -# -# This will will define the following variables:: -# -# LZO2_FOUND - system has Lzo2 -# LZO2_INCLUDE_DIRS - the Lzo2 include directory -# LZO2_LIBRARIES - the Lzo2 libraries -# -# and the following imported targets:: -# -# Lzo2::Lzo2 - The Lzo2 library - -find_path(LZO2_INCLUDE_DIR NAMES lzo1x.h - PATH_SUFFIXES lzo) - -find_library(LZO2_LIBRARY NAMES lzo2 liblzo2) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Lzo2 - REQUIRED_VARS LZO2_LIBRARY LZO2_INCLUDE_DIR) - -if(LZO2_FOUND) - set(LZO2_LIBRARIES ${LZO2_LIBRARY}) - set(LZO2_INCLUDE_DIRS ${LZO2_INCLUDE_DIR}) - - if(NOT TARGET Lzo2::Lzo2) - add_library(Lzo2::Lzo2 UNKNOWN IMPORTED) - set_target_properties(Lzo2::Lzo2 PROPERTIES - IMPORTED_LOCATION "${LZO2_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${LZO2_INCLUDE_DIR}") - endif() -endif() - -mark_as_advanced(LZO2_INCLUDE_DIR LZO2_LIBRARY) diff --git a/project/cmake/modules/FindMMAL.cmake b/project/cmake/modules/FindMMAL.cmake deleted file mode 100644 index 0b5f5564ec..0000000000 --- a/project/cmake/modules/FindMMAL.cmake +++ /dev/null @@ -1,55 +0,0 @@ -# - Try to find MMAL -# Once done this will define -# -# MMAL_FOUND - system has MMAL -# MMAL_INCLUDE_DIRS - the MMAL include directory -# MMAL_LIBRARIES - The MMAL libraries - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_MMAL mmal QUIET) -endif() - - -find_path(MMAL_INCLUDE_DIR NAMES interface/mmal/mmal.h PATHS ${PC_MMAL_INCLUDEDIR}) -find_library(MMAL_LIBRARY NAMES mmal libmmal PATHS ${PC_MMAL_LIBDIR}) -find_library(MMALCORE_LIBRARY NAMES mmal_core libmmal_core PATHS ${PC_MMAL_LIBDIR}) -find_library(MMALUTIL_LIBRARY NAMES mmal_util libmmal_util PATHS ${PC_MMAL_LIBDIR}) -find_library(MMALCLIENT_LIBRARY NAMES mmal_vc_client libmmal_vc_client PATHS ${PC_MMAL_LIBDIR}) -find_library(MMALCOMPONENT_LIBRARY NAMES mmal_components libmmal_components PATHS ${PC_MMAL_LIBDIR}) -find_library(BCM_LIBRARY NAMES bcm_host libbcm_host PATHS ${PC_MMAL_LIBDIR}) -find_library(VCHIQ_LIBRARY NAMES vchiq_arm libvchiq_arm PATHS ${PC_MMAL_LIBDIR}) -find_library(VCHOSTIF_LIBRARY NAMES vchostif libvchostif PATHS ${PC_MMAL_LIBDIR}) -find_library(VCILCS_LIBRARY NAMES vcilcs libvcilcs PATHS ${PC_MMAL_LIBDIR}) -find_library(VCOS_LIBRARY NAMES vcos libvcos PATHS ${PC_MMAL_LIBDIR}) -find_library(VCSM_LIBRARY NAMES vcsm libvcsm PATHS ${PC_MMAL_LIBDIR}) -find_library(CONTAINER_LIBRARY NAMES containers libcontainers PATHS ${PC_MMAL_LIBDIR}) - - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(MMAL REQUIRED_VARS MMAL_INCLUDE_DIR - MMAL_LIBRARY MMALCORE_LIBRARY MMALUTIL_LIBRARY - MMALCLIENT_LIBRARY MMALCOMPONENT_LIBRARY BCM_LIBRARY - VCHIQ_LIBRARY VCOS_LIBRARY VCSM_LIBRARY VCHOSTIF_LIBRARY - VCILCS_LIBRARY CONTAINER_LIBRARY) - - -if(MMAL_FOUND) - set(MMAL_INCLUDE_DIRS ${MMAL_INCLUDE_DIR}) - set(MMAL_LIBRARIES ${MMAL_LIBRARY} ${MMALCORE_LIBRARY} ${MMALUTIL_LIBRARY} - ${MMALCLIENT_LIBRARY} ${MMALCOMPONENT_LIBRARY} - ${BCM_LIBRARY} ${VCHIQ_LIBRARY} ${VCOS_LIBRARY} ${VCSM_LIBRARY} - ${VCHOSTIF_LIBRARY} ${VCILCS_LIBRARY} ${CONTAINER_LIBRARY} - CACHE STRING "mmal libraries" FORCE) - list(APPEND MMAL_DEFINITIONS -DHAVE_MMAL=1 -DHAS_MMAL=1) - - if(NOT TARGET MMAL::MMAL) - add_library(MMAL::MMAL UNKNOWN IMPORTED) - set_target_properties(MMAL::MMAL PROPERTIES - IMPORTED_LOCATION "${MMAL_LIBRARIES}" - INTERFACE_INCLUDE_DIRECTORIES "${MMAL_INCLUDE_DIR}") - endif() -endif() - -mark_as_advanced(MMAL_INCLUDE_DIRS MMAL_LIBRARIES MMAL_DEFINITIONS - MMAL_LIBRARY MMALCORE_LIBRARY MMALUTIL_LIBRARY MMALCLIENT_LIBRARY MMALCOMPONENT_LIBRARY BCM_LIBRARY - VCHIQ_LIBRARY VCOS_LIBRARY VCSM_LIBRARY VCHOSTIF_LIBRARY VCILCS_LIBRARY CONTAINER_LIBRARY) diff --git a/project/cmake/modules/FindMicroHttpd.cmake b/project/cmake/modules/FindMicroHttpd.cmake deleted file mode 100644 index 8eecbc4e0a..0000000000 --- a/project/cmake/modules/FindMicroHttpd.cmake +++ /dev/null @@ -1,51 +0,0 @@ -#.rst: -# FindMicroHttpd -# -------------- -# Finds the MicroHttpd library -# -# This will will define the following variables:: -# -# MICROHTTPD_FOUND - system has MicroHttpd -# MICROHTTPD_INCLUDE_DIRS - the MicroHttpd include directory -# MICROHTTPD_LIBRARIES - the MicroHttpd libraries -# MICROHTTPD_DEFINITIONS - the MicroHttpd definitions -# -# and the following imported targets:: -# -# MicroHttpd::MicroHttpd - The MicroHttpd library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_MICROHTTPD libmicrohttpd>=0.4 QUIET) -endif() - -find_path(MICROHTTPD_INCLUDE_DIR NAMES microhttpd.h - PATHS ${PC_MICROHTTPD_INCLUDEDIR}) -find_library(MICROHTTPD_LIBRARY NAMES microhttpd libmicrohttpd - PATHS ${PC_MICROHTTPD_LIBDIR}) - -set(MICROHTTPD_VERSION ${PC_MICROHTTPD_VERSION}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(MicroHttpd - REQUIRED_VARS MICROHTTPD_LIBRARY MICROHTTPD_INCLUDE_DIR - VERSION_VAR MICROHTTPD_VERSION) - -if(MICROHTTPD_FOUND) - set(MICROHTTPD_LIBRARIES ${MICROHTTPD_LIBRARY}) - set(MICROHTTPD_INCLUDE_DIRS ${MICROHTTPD_INCLUDE_DIR}) - set(MICROHTTPD_DEFINITIONS -DHAVE_LIBMICROHTTPD=1) - - if(KODI_DEPENDSBUILD AND NOT WIN32) - find_library(GCRYPT_LIBRARY gcrypt) - find_library(GPGERROR_LIBRARY gpg-error) - list(APPEND MICROHTTPD_LIBRARIES ${GCRYPT_LIBRARY} ${GPGERROR_LIBRARY}) - mark_as_advanced(GCRYPT_LIBRARY GPGERROR_LIBRARY) - if(NOT APPLE AND NOT CORE_SYSTEM_NAME STREQUAL android) - list(APPEND MICROHTTPD_LIBRARIES rt) - endif() - else() - list(APPEND MICROHTTPD_LIBRARIES ${PC_MICROHTTPD_STATIC_LIBRARIES}) - endif() -endif() - -mark_as_advanced(MICROHTTPD_LIBRARY MICROHTTPD_INCLUDE_DIR) diff --git a/project/cmake/modules/FindMir.cmake b/project/cmake/modules/FindMir.cmake deleted file mode 100644 index 8847a617fd..0000000000 --- a/project/cmake/modules/FindMir.cmake +++ /dev/null @@ -1,33 +0,0 @@ -# FindMir -# ------- -# Finds the Mir library -# -# This will will define the following variables:: -# -# MIR_FOUND - the system has Mir -# MIR_INCLUDE_DIRS - the Mir include directory -# MIR_LIBRARIES - the Mir libraries -# MIR_DEFINITIONS - the Mir definitions - - -if(PKG_CONFIG_FOUND) - pkg_check_modules (PC_MIR mirclient QUIET) -endif() - -find_path(MIR_INCLUDE_DIR NAMES mir_toolkit/mir_client_library.h - PATHS ${PC_MIR_INCLUDE_DIRS}) - -find_library(MIR_LIBRARY NAMES mirclient - PATHS ${PC_MIR_LIBRARIES} ${PC_MIR_LIBRARY_DIRS}) - -include (FindPackageHandleStandardArgs) -find_package_handle_standard_args (MIR - REQUIRED_VARS MIR_LIBRARY MIR_INCLUDE_DIR) - -if (MIR_FOUND) - set(MIR_LIBRARIES ${MIR_LIBRARY}) - set(MIR_INCLUDE_DIRS ${PC_MIR_INCLUDE_DIRS}) - set(MIR_DEFINITIONS -DHAVE_MIR=1) -endif() - -mark_as_advanced (MIR_LIBRARY MIR_INCLUDE_DIR) diff --git a/project/cmake/modules/FindMySqlClient.cmake b/project/cmake/modules/FindMySqlClient.cmake deleted file mode 100644 index ceccea39b1..0000000000 --- a/project/cmake/modules/FindMySqlClient.cmake +++ /dev/null @@ -1,69 +0,0 @@ -#.rst: -# FindMySqlClient -# --------------- -# Finds the MySqlClient library -# -# This will will define the following variables:: -# -# MYSQLCLIENT_FOUND - system has MySqlClient -# MYSQLCLIENT_INCLUDE_DIRS - the MySqlClient include directory -# MYSQLCLIENT_LIBRARIES - the MySqlClient libraries -# MYSQLCLIENT_DEFINITIONS - the MySqlClient compile definitions -# -# and the following imported targets:: -# -# MySqlClient::MySqlClient - The MySqlClient library - -# Don't find system wide installed version on Windows -if(WIN32) - set(EXTRA_FIND_ARGS NO_SYSTEM_ENVIRONMENT_PATH) -else() - set(EXTRA_FIND_ARGS) -endif() - -find_path(MYSQLCLIENT_INCLUDE_DIR mysql/mysql_time.h) -find_library(MYSQLCLIENT_LIBRARY_RELEASE NAMES mysqlclient libmysql - PATH_SUFFIXES mysql - ${EXTRA_FIND_ARGS}) -find_library(MYSQLCLIENT_LIBRARY_DEBUG NAMES mysqlclient libmysql - PATH_SUFFIXES mysql - ${EXTRA_FIND_ARGS}) - -if(MYSQLCLIENT_INCLUDE_DIR AND EXISTS "${MYSQLCLIENT_INCLUDE_DIR}/mysql/mysql_version.h") - file(STRINGS "${MYSQLCLIENT_INCLUDE_DIR}/mysql/mysql_version.h" mysql_version_str REGEX "^#define[\t ]+LIBMYSQL_VERSION[\t ]+\".*\".*") - string(REGEX REPLACE "^#define[\t ]+LIBMYSQL_VERSION[\t ]+\"([^\"]+)\".*" "\\1" MYSQLCLIENT_VERSION_STRING "${mysql_version_str}") - unset(mysql_version_str) -endif() - -include(SelectLibraryConfigurations) -select_library_configurations(MYSQLCLIENT) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(MySqlClient - REQUIRED_VARS MYSQLCLIENT_LIBRARY MYSQLCLIENT_INCLUDE_DIR - VERSION_VAR MYSQLCLIENT_VERSION_STRING) - -if(MYSQLCLIENT_FOUND) - set(MYSQLCLIENT_LIBRARIES ${MYSQLCLIENT_LIBRARY}) - set(MYSQLCLIENT_INCLUDE_DIRS ${MYSQLCLIENT_INCLUDE_DIR}) - set(MYSQLCLIENT_DEFINITIONS -DHAVE_MYSQL=1) - - if(NOT TARGET MySqlClient::MySqlClient) - add_library(MySqlClient::MySqlClient UNKNOWN IMPORTED) - if(MYSQLCLIENT_LIBRARY_RELEASE) - set_target_properties(MySqlClient::MySqlClient PROPERTIES - IMPORTED_CONFIGURATIONS RELEASE - IMPORTED_LOCATION "${MYSQLCLIENT_LIBRARY_RELEASE}") - endif() - if(MYSQLCLIENT_LIBRARY_DEBUG) - set_target_properties(MySqlClient::MySqlClient PROPERTIES - IMPORTED_CONFIGURATIONS DEBUG - IMPORTED_LOCATION "${MYSQLCLIENT_LIBRARY_DEBUG}") - endif() - set_target_properties(MySqlClient::MySqlClient PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${MYSQLCLIENT_INCLUDE_DIR}" - INTERFACE_COMPILE_DEFINITIONS HAVE_MYSQL=1) - endif() -endif() - -mark_as_advanced(MYSQLCLIENT_INCLUDE_DIR MYSQLCLIENT_LIBRARY) diff --git a/project/cmake/modules/FindNFS.cmake b/project/cmake/modules/FindNFS.cmake deleted file mode 100644 index 646ee33c84..0000000000 --- a/project/cmake/modules/FindNFS.cmake +++ /dev/null @@ -1,58 +0,0 @@ -#.rst: -# FindNFS -# ------- -# Finds the libnfs library -# -# This will will define the following variables:: -# -# NFS_FOUND - system has libnfs -# NFS_INCLUDE_DIRS - the libnfs include directory -# NFS_LIBRARIES - the libnfs libraries -# NFS_DEFINITIONS - the libnfs compile definitions -# -# and the following imported targets:: -# -# NFS::NFS - The libnfs library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_NFS libnfs QUIET) -endif() - -find_path(NFS_INCLUDE_DIR nfsc/libnfs.h - PATHS ${PC_NFS_INCLUDEDIR}) - -set(NFS_VERSION ${PC_NFS_VERSION}) - -include(FindPackageHandleStandardArgs) -if(NOT WIN32) - find_library(NFS_LIBRARY NAMES nfs - PATHS ${PC_NFS_LIBDIR}) - - find_package_handle_standard_args(NFS - REQUIRED_VARS NFS_LIBRARY NFS_INCLUDE_DIR - VERSION_VAR NFS_VERSION) -else() - # Dynamically loaded DLL - find_package_handle_standard_args(NFS - REQUIRED_VARS NFS_INCLUDE_DIR - VERSION_VAR NFS_VERSION) -endif() - -if(NFS_FOUND) - set(NFS_LIBRARIES ${NFS_LIBRARY}) - set(NFS_INCLUDE_DIRS ${NFS_INCLUDE_DIR}) - set(NFS_DEFINITIONS -DHAVE_LIBNFS=1) - - if(NOT TARGET NFS::NFS) - add_library(NFS::NFS UNKNOWN IMPORTED) - if(NFS_LIBRARY) - set_target_properties(NFS::NFS PROPERTIES - IMPORTED_LOCATION "${NFS_LIBRARY_RELEASE}") - endif() - set_target_properties(NFS::NFS PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${NFS_INCLUDE_DIR}" - INTERFACE_COMPILE_DEFINITIONS HAVE_LIBNFS=1) - endif() -endif() - -mark_as_advanced(NFS_INCLUDE_DIR NFS_LIBRARY) diff --git a/project/cmake/modules/FindOpenGLES.cmake b/project/cmake/modules/FindOpenGLES.cmake deleted file mode 100644 index ab06f968b3..0000000000 --- a/project/cmake/modules/FindOpenGLES.cmake +++ /dev/null @@ -1,48 +0,0 @@ -#.rst: -# FindOpenGLES -# ------------ -# Finds the OpenGLES2 library -# -# This will will define the following variables:: -# -# OPENGLES_FOUND - system has OpenGLES -# OPENGLES_INCLUDE_DIRS - the OpenGLES include directory -# OPENGLES_LIBRARIES - the OpenGLES libraries -# OPENGLES_DEFINITIONS - the OpenGLES definitions - -find_package(EMBEDDED) - -if(PKG_CONFIG_FOUND AND NOT PLATFORM STREQUAL "raspberry-pi") - pkg_check_modules(PC_OPENGLES glesv2 QUIET) - if(NOT OPENGLES_FOUND AND EMBEDDED_FOUND) - set(CMAKE_PREFIX_PATH ${EMBEDDED_FOUND} ${CMAKE_PREFIX_PATH}) - endif() -endif() - -if(NOT CORE_SYSTEM_NAME STREQUAL ios) - find_path(OPENGLES_INCLUDE_DIR GLES2/gl2.h - PATHS ${PC_OPENGLES_INCLUDEDIR}) - find_library(OPENGLES_gl_LIBRARY NAMES GLESv2 - PATHS ${PC_OPENGLES_LIBDIR}) - find_library(OPENGLES_egl_LIBRARY NAMES EGL - PATHS ${PC_OPENGLES_LIBDIR}) -else() - find_library(OPENGLES_gl_LIBRARY NAMES OpenGLES - PATHS ${CMAKE_OSX_SYSROOT}/System/Library - PATH_SUFFIXES Frameworks - NO_DEFAULT_PATH) - set(OPENGLES_INCLUDE_DIR ${OPENGLES_gl_LIBRARY}/Headers) - set(OPENGLES_egl_LIBRARY ${OPENGLES_gl_LIBRARY}) -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(OpenGLES - REQUIRED_VARS OPENGLES_gl_LIBRARY OPENGLES_egl_LIBRARY OPENGLES_INCLUDE_DIR) - -if(OPENGLES_FOUND) - set(OPENGLES_INCLUDE_DIRS ${OPENGLES_INCLUDE_DIR}) - set(OPENGLES_LIBRARIES ${OPENGLES_gl_LIBRARY} ${OPENGLES_egl_LIBRARY}) - set(OPENGLES_DEFINITIONS -DHAVE_LIBGLESV2 -DHAVE_LIBEGL=1) -endif() - -mark_as_advanced(OPENGLES_INCLUDE_DIR OPENGLES_gl_LIBRARY OPENGLES_egl_LIBRARY) diff --git a/project/cmake/modules/FindOpenGl.cmake b/project/cmake/modules/FindOpenGl.cmake deleted file mode 100644 index b8cff79daf..0000000000 --- a/project/cmake/modules/FindOpenGl.cmake +++ /dev/null @@ -1,43 +0,0 @@ -#.rst: -# FindOpenGl -# ---------- -# Finds the FindOpenGl library -# -# This will will define the following variables:: -# -# OPENGL_FOUND - system has OpenGl -# OPENGL_INCLUDE_DIRS - the OpenGl include directory -# OPENGL_LIBRARIES - the OpenGl libraries -# OPENGL_DEFINITIONS - the OpenGl definitions - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_OPENGL gl glu QUIET) -endif() - -if(NOT CORE_SYSTEM_NAME STREQUAL osx) - find_path(OPENGL_INCLUDE_DIR GL/gl.h - PATHS ${PC_OPENGL_gl_INCLUDEDIR}) - find_library(OPENGL_gl_LIBRARY NAMES GL - PATHS ${PC_OPENGL_gl_LIBDIR}) - find_library(OPENGL_glu_LIBRARY NAMES GLU - PATHS ${PC_OPENGL_glu_LIBDIR}) -else() - find_library(OPENGL_gl_LIBRARY NAMES OpenGL - PATHS ${CMAKE_OSX_SYSROOT}/System/Library - PATH_SUFFIXES Frameworks - NO_DEFAULT_PATH) - set(OPENGL_INCLUDE_DIR ${OPENGL_gl_LIBRARY}/Headers) - set(OPENGL_glu_LIBRARY ${OPENGL_gl_LIBRARY}) -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(OpenGl - REQUIRED_VARS OPENGL_gl_LIBRARY OPENGL_glu_LIBRARY OPENGL_INCLUDE_DIR) - -if(OPENGL_FOUND) - set(OPENGL_INCLUDE_DIRS ${OPENGL_INCLUDE_DIR}) - set(OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}) - set(OPENGL_DEFINITIONS -DHAVE_LIBGL=1) -endif() - -mark_as_advanced(OPENGL_INCLUDE_DIR OPENGL_gl_LIBRARY OPENGL_glu_LIBRARY) diff --git a/project/cmake/modules/FindPCRE.cmake b/project/cmake/modules/FindPCRE.cmake deleted file mode 100644 index 8babed3b60..0000000000 --- a/project/cmake/modules/FindPCRE.cmake +++ /dev/null @@ -1,87 +0,0 @@ -#.rst: -# FindPCRE -# -------- -# Finds the PCRECPP library -# -# This will will define the following variables:: -# -# PCRE_FOUND - system has libpcrecpp -# PCRE_INCLUDE_DIRS - the libpcrecpp include directory -# PCRE_LIBRARIES - the libpcrecpp libraries -# PCRE_DEFINITIONS - the libpcrecpp definitions -# -# and the following imported targets:: -# -# PCRE::PCRECPP - The PCRECPP library -# PCRE::PCRE - The PCRE library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_PCRE libpcrecpp QUIET) -endif() - -find_path(PCRE_INCLUDE_DIR pcrecpp.h - PATHS ${PC_PCRE_INCLUDEDIR}) -find_library(PCRECPP_LIBRARY_RELEASE NAMES pcrecpp - PATHS ${PC_PCRE_LIBDIR}) -find_library(PCRE_LIBRARY_RELEASE NAMES pcre - PATHS ${PC_PCRE_LIBDIR}) -find_library(PCRECPP_LIBRARY_DEBUG NAMES pcrecppd - PATHS ${PC_PCRE_LIBDIR}) -find_library(PCRE_LIBRARY_DEBUG NAMES pcred - PATHS ${PC_PCRE_LIBDIR}) -set(PCRE_VERSION ${PC_PCRE_VERSION}) - -include(SelectLibraryConfigurations) -select_library_configurations(PCRECPP) -select_library_configurations(PCRE) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(PCRE - REQUIRED_VARS PCRECPP_LIBRARY PCRE_LIBRARY PCRE_INCLUDE_DIR - VERSION_VAR PCRE_VERSION) - -if(PCRE_FOUND) - set(PCRE_LIBRARIES ${PCRECPP_LIBRARY} ${PCRE_LIBRARY}) - set(PCRE_INCLUDE_DIRS ${PCRE_INCLUDE_DIR}) - if(WIN32) - set(PCRE_DEFINITIONS -DPCRE_STATIC=1) - endif() - - if(NOT TARGET PCRE::PCRE) - add_library(PCRE::PCRE UNKNOWN IMPORTED) - if(PCRE_LIBRARY_RELEASE) - set_target_properties(PCRE::PCRE PROPERTIES - IMPORTED_CONFIGURATIONS RELEASE - IMPORTED_LOCATION "${PCRE_LIBRARY_RELEASE}") - endif() - if(PCRE_LIBRARY_DEBUG) - set_target_properties(PCRE::PCRE PROPERTIES - IMPORTED_CONFIGURATIONS DEBUG - IMPORTED_LOCATION "${PCRE_LIBRARY_DEBUG}") - endif() - set_target_properties(PCRE::PCRE PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${PCRE_INCLUDE_DIR}") - if(WIN32) - set_target_properties(PCRE::PCRE PROPERTIES - INTERFACE_COMPILE_DEFINITIONS PCRE_STATIC=1) - endif() - - endif() - if(NOT TARGET PCRE::PCRECPP) - add_library(PCRE::PCRECPP UNKNOWN IMPORTED) - if(PCRE_LIBRARY_RELEASE) - set_target_properties(PCRE::PCRECPP PROPERTIES - IMPORTED_CONFIGURATIONS RELEASE - IMPORTED_LOCATION "${PCRECPP_LIBRARY_RELEASE}") - endif() - if(PCRE_LIBRARY_DEBUG) - set_target_properties(PCRE::PCRECPP PROPERTIES - IMPORTED_CONFIGURATIONS DEBUG - IMPORTED_LOCATION "${PCRECPP_LIBRARY_DEBUG}") - endif() - set_target_properties(PCRE::PCRECPP PROPERTIES - INTERFACE_LINK_LIBRARIES PCRE::PCRE) - endif() -endif() - -mark_as_advanced(PCRE_INCLUDE_DIR PCRECPP_LIBRARY PCRE_LIBRARY) diff --git a/project/cmake/modules/FindPlist.cmake b/project/cmake/modules/FindPlist.cmake deleted file mode 100644 index d7a6c48e36..0000000000 --- a/project/cmake/modules/FindPlist.cmake +++ /dev/null @@ -1,58 +0,0 @@ -#.rst: -# FindPlist -# --------- -# Finds the Plist library -# -# This will will define the following variables:: -# -# PLIST_FOUND - system has Plist library -# PLIST_INCLUDE_DIRS - the Plist library include directory -# PLIST_LIBRARIES - the Plist libraries -# PLIST_DEFINITIONS - the Plist compile definitions -# -# and the following imported targets:: -# -# Plist::Plist - The Plist library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_PLIST libplist QUIET) -endif() - -find_path(PLIST_INCLUDE_DIR plist/plist.h - PATHS ${PC_PLIST_INCLUDEDIR}) - -set(PLIST_VERSION ${PC_PLIST_VERSION}) - -include(FindPackageHandleStandardArgs) -if(NOT WIN32) - find_library(PLIST_LIBRARY NAMES plist - PATHS ${PC_PLIST_LIBDIR}) - - find_package_handle_standard_args(PLIST - REQUIRED_VARS PLIST_LIBRARY PLIST_INCLUDE_DIR - VERSION_VAR PLIST_VERSION) -else() - # Dynamically loaded DLL - find_package_handle_standard_args(PLIST - REQUIRED_VARS PLIST_INCLUDE_DIR - VERSION_VAR PLIST_VERSION) -endif() - -if(PLIST_FOUND) - set(PLIST_LIBRARIES ${PLIST_LIBRARY}) - set(PLIST_INCLUDE_DIRS ${PLIST_INCLUDE_DIR}) - set(PLIST_DEFINITIONS -DHAVE_LIBPLIST=1) - - if(NOT TARGET Plist::Plist) - add_library(Plist::Plist UNKNOWN IMPORTED) - if(PLIST_LIBRARY) - set_target_properties(Plist::Plist PROPERTIES - IMPORTED_LOCATION "${PLIST_LIBRARY}") - endif() - set_target_properties(Plist::Plist PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${PLIST_INCLUDE_DIR}" - INTERFACE_COMPILE_DEFINITIONS HAVE_LIBPLIST=1) - endif() -endif() - -mark_as_advanced(PLIST_INCLUDE_DIR PLIST_LIBRARY) diff --git a/project/cmake/modules/FindPulseAudio.cmake b/project/cmake/modules/FindPulseAudio.cmake deleted file mode 100644 index 5761005e7a..0000000000 --- a/project/cmake/modules/FindPulseAudio.cmake +++ /dev/null @@ -1,68 +0,0 @@ -#.rst: -# FindPulseAudio -# -------------- -# Finds the PulseAudio library -# -# This will define the following variables:: -# -# PULSEAUDIO_FOUND - system has the PulseAudio library -# PULSEAUDIO_INCLUDE_DIRS - the PulseAudio include directory -# PULSEAUDIO_LIBRARIES - the libraries needed to use PulseAudio -# PULSEAUDIO_DEFINITIONS - the definitions needed to use PulseAudio -# -# and the following imported targets:: -# -# PulseAudio::PulseAudio - The PulseAudio library - -if(NOT PulseAudio_FIND_VERSION) - set(PulseAudio_FIND_VERSION 2.0.0) -endif() - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_PULSEAUDIO libpulse>=${PulseAudio_FIND_VERSION} QUIET) - pkg_check_modules(PC_PULSEAUDIO_MAINLOOP libpulse-mainloop-glib QUIET) -endif() - -find_path(PULSEAUDIO_INCLUDE_DIR NAMES pulse/pulseaudio.h - PATHS ${PC_PULSEAUDIO_INCLUDEDIR} ${PC_PULSEAUDIO_INCLUDE_DIRS}) - -find_library(PULSEAUDIO_LIBRARY NAMES pulse libpulse - PATHS ${PC_PULSEAUDIO_LIBDIR} ${PC_PULSEAUDIO_LIBRARY_DIRS}) - -find_library(PULSEAUDIO_MAINLOOP_LIBRARY NAMES pulse-mainloop pulse-mainloop-glib libpulse-mainloop-glib - PATHS ${PC_PULSEAUDIO_LIBDIR} ${PC_PULSEAUDIO_LIBRARY_DIRS}) - -if(PC_PULSEAUDIO_VERSION) - set(PULSEAUDIO_VERSION_STRING ${PC_PULSEAUDIO_VERSION}) -elseif(PULSEAUDIO_INCLUDE_DIR AND EXISTS "${PULSEAUDIO_INCLUDE_DIR}/pulse/version.h") - file(STRINGS "${PULSEAUDIO_INCLUDE_DIR}/pulse/version.h" pulseaudio_version_str REGEX "^#define[\t ]+pa_get_headers_version\\(\\)[\t ]+\\(\".*\"\\).*") - string(REGEX REPLACE "^#define[\t ]+pa_get_headers_version\\(\\)[\t ]+\\(\"([^\"]+)\"\\).*" "\\1" PULSEAUDIO_VERSION_STRING "${pulseaudio_version_str}") - unset(pulseaudio_version_str) -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(PulseAudio - REQUIRED_VARS PULSEAUDIO_LIBRARY PULSEAUDIO_MAINLOOP_LIBRARY PULSEAUDIO_INCLUDE_DIR - VERSION_VAR PULSEAUDIO_VERSION_STRING) - -if(PULSEAUDIO_FOUND) - set(PULSEAUDIO_INCLUDE_DIRS ${PULSEAUDIO_INCLUDE_DIR}) - set(PULSEAUDIO_LIBRARIES ${PULSEAUDIO_LIBRARY} ${PULSEAUDIO_MAINLOOP_LIBRARY}) - set(PULSEAUDIO_DEFINITIONS -DHAVE_LIBPULSE=1) - - if(NOT TARGET PulseAudio::PulseAudioMainloop) - add_library(PulseAudio::PulseAudioMainloop UNKNOWN IMPORTED) - set_target_properties(PulseAudio::PulseAudioMainloop PROPERTIES - IMPORTED_LOCATION "${PULSEAUDIO_MAINLOOP_LIBRARY}") - endif() - if(NOT TARGET PulseAudio::PulseAudio) - add_library(PulseAudio::PulseAudio UNKNOWN IMPORTED) - set_target_properties(PulseAudio::PulseAudio PROPERTIES - IMPORTED_LOCATION "${PULSEAUDIO_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${PULSEAUDIO_INCLUDE_DIR}" - INTERFACE_COMPILE_DEFINITIONS HAVE_LIBPULSE=1 - INTERFACE_LINK_LIBRARIES PulseAudio::PulseAudioMainloop) - endif() -endif() - -mark_as_advanced(PULSEAUDIO_INCLUDE_DIR PULSEAUDIO_LIBRARY PULSEAUDIO_MAINLOOP_LIBRARY) diff --git a/project/cmake/modules/FindPython.cmake b/project/cmake/modules/FindPython.cmake deleted file mode 100644 index 75dcd6cfbb..0000000000 --- a/project/cmake/modules/FindPython.cmake +++ /dev/null @@ -1,39 +0,0 @@ -# - Try to find python -# Once done this will define -# -# PYTHON_FOUND - system has PYTHON -# PYTHON_INCLUDE_DIRS - the python include directory -# PYTHON_LIBRARIES - The python libraries - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_PYTHON python>=2.7 QUIET) -endif() - -find_program(PYTHON_EXECUTABLE python ONLY_CMAKE_FIND_ROOT_PATH) -find_library(PYTHON_LIBRARY NAMES python2.7 PATHS ${PC_PYTHON_LIBDIR}) -find_path(PYTHON_INCLUDE_DIR NAMES Python.h PATHS ${PC_PYTHON_INCLUDE_DIRS} ${DEPENDS_PATH}/include/python2.7) - -if(KODI_DEPENDSBUILD) - find_library(FFI_LIBRARY ffi REQUIRED) - find_library(EXPAT_LIBRARY expat REQUIRED) - find_library(INTL_LIBRARY intl REQUIRED) - find_library(GMP_LIBRARY gmp REQUIRED) - - if(NOT CORE_SYSTEM_NAME STREQUAL android) - set(PYTHON_DEP_LIBRARIES pthread dl util) - endif() - - set(PYTHON_LIBRARIES ${PYTHON_LIBRARY} ${FFI_LIBRARY} ${EXPAT_LIBRARY} ${INTL_LIBRARY} ${GMP_LIBRARY} ${PYTHON_DEP_LIBRARIES}) -else() - find_package(PythonLibs 2.7 REQUIRED) - list(APPEND PYTHON_LIBRARIES ${PC_PYTHON_STATIC_LIBRARIES}) -endif() - - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(PYTHON REQUIRED_VARS PYTHON_INCLUDE_DIR PYTHON_LIBRARY PYTHON_LIBRARIES) -if(PYTHON_FOUND) - set(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIR}) -endif() - -mark_as_advanced(PYTHON_EXECUTABLE PYTHON_INCLUDE_DIRS PYTHON_INCLUDE_DIR PYTHON_LIBRARY PYTHON_LIBRARIES PYTHON_LDFLAGS FFI_LIBRARY EXPAT_LIBRARY INTL_LIBRARY GMP_LIBRARY) diff --git a/project/cmake/modules/FindSSE.cmake b/project/cmake/modules/FindSSE.cmake deleted file mode 100644 index 055466367b..0000000000 --- a/project/cmake/modules/FindSSE.cmake +++ /dev/null @@ -1,143 +0,0 @@ -# Check if SSE instructions are available on the machine where -# the project is compiled. -include(TestCXXAcceptsFlag) - -if(CMAKE_SYSTEM_NAME MATCHES "Linux") - if(CPU MATCHES "x86_64" OR CPU MATCHES "i.86") - exec_program(cat ARGS "/proc/cpuinfo" OUTPUT_VARIABLE CPUINFO) - - string(REGEX REPLACE "^.*(sse).*$" "\\1" _SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "sse" "${_SSE_THERE}" _SSE_TRUE) - CHECK_CXX_ACCEPTS_FLAG("-msse" _SSE_OK) - - string(REGEX REPLACE "^.*(sse2).*$" "\\1" _SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "sse2" "${_SSE_THERE}" _SSE2_TRUE) - CHECK_CXX_ACCEPTS_FLAG("-msse2" _SSE2_OK) - - # /proc/cpuinfo apparently omits sse3 :( - string(REGEX REPLACE "^.*[^s](sse3).*$" "\\1" _SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "sse3" "${_SSE_THERE}" _SSE3_TRUE) - if(NOT _SSE3_TRUE) - string(REGEX REPLACE "^.*(T2300).*$" "\\1" _SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "T2300" "${_SSE_THERE}" _SSE3_TRUE) - endif() - CHECK_CXX_ACCEPTS_FLAG("-msse3" _SSE3_OK) - - string(REGEX REPLACE "^.*(ssse3).*$" "\\1" _SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "ssse3" "${_SSE_THERE}" _SSSE3_TRUE) - CHECK_CXX_ACCEPTS_FLAG("-mssse3" _SSSE3_OK) - - string(REGEX REPLACE "^.*(sse4_1).*$" "\\1" _SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "sse4_1" "${_SSE_THERE}" _SSE41_TRUE) - CHECK_CXX_ACCEPTS_FLAG("-msse4.1" _SSE41_OK) - - string(REGEX REPLACE "^.*(sse4_2).*$" "\\1" _SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "sse4_2" "${_SSE_THERE}" _SSE42_TRUE) - CHECK_CXX_ACCEPTS_FLAG("-msse4.2" _SSE42_OK) - - string(REGEX REPLACE "^.*(avx).*$" "\\1" _SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "avx" "${_SSE_THERE}" _AVX_TRUE) - CHECK_CXX_ACCEPTS_FLAG("-mavx" _AVX_OK) - - string(REGEX REPLACE "^.*(avx2).*$" "\\1" _SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "avx2" "${_SSE_THERE}" _AVX2_TRUE) - CHECK_CXX_ACCEPTS_FLAG("-mavx2" _AVX2_OK) - endif() -elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin") - if(NOT CPU MATCHES "arm") - exec_program("/usr/sbin/sysctl -n machdep.cpu.features machdep.cpu.leaf7_features" OUTPUT_VARIABLE CPUINFO) - - string(REGEX REPLACE "^.*[^S](SSE).*$" "\\1" _SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "SSE" "${_SSE_THERE}" _SSE_TRUE) - CHECK_CXX_ACCEPTS_FLAG("-msse" _SSE_OK) - - string(REGEX REPLACE "^.*[^S](SSE2).*$" "\\1" _SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "SSE2" "${_SSE_THERE}" _SSE2_TRUE) - CHECK_CXX_ACCEPTS_FLAG("-msse2" _SSE2_OK) - - string(REGEX REPLACE "^.*[^S](SSE3).*$" "\\1" _SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "SSE3" "${_SSE_THERE}" _SSE3_TRUE) - CHECK_CXX_ACCEPTS_FLAG("-msse3" _SSE3_OK) - - string(REGEX REPLACE "^.*(SSSE3).*$" "\\1" _SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "SSSE3" "${_SSE_THERE}" _SSSE3_TRUE) - CHECK_CXX_ACCEPTS_FLAG("-mssse3" _SSSE3_OK) - - string(REGEX REPLACE "^.*(SSE4.1).*$" "\\1" _SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "SSE4.1" "${_SSE_THERE}" _SSE41_TRUE) - CHECK_CXX_ACCEPTS_FLAG("-msse4.1" _SSE41_OK) - - string(REGEX REPLACE "^.*(SSE4.2).*$" "\\1" _SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "SSE4.2" "${_SSE_THERE}" _SSE42_TRUE) - CHECK_CXX_ACCEPTS_FLAG("-msse4.2" _SSE42_OK) - - string(REGEX REPLACE "^.*(AVX).*$" "\\1" _SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "AVX" "${_SSE_THERE}" _AVX_TRUE) - CHECK_CXX_ACCEPTS_FLAG("-mavx" _AVX_OK) - - string(REGEX REPLACE "^.*(AVX2).*$" "\\1" _SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "AVX2" "${_SSE_THERE}" _AVX2_TRUE) - CHECK_CXX_ACCEPTS_FLAG("-mavx2" _AVX2_OK) - endif() -elseif(CMAKE_SYSTEM_NAME MATCHES "Windows") - # TODO - set(_SSE_TRUE true) - set(_SSE_OK true) - set(_SSE2_TRUE true) - set(_SSE2_OK true) -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(SSE - REQUIRED_VARS _SSE_TRUE _SSE_OK - FAIL_MESSAGE "Could not find hardware support for SSE") -find_package_handle_standard_args(SSE2 - REQUIRED_VARS _SSE2_TRUE _SSE2_OK - FAIL_MESSAGE "Could not find hardware support for SSE2") -find_package_handle_standard_args(SSE3 - REQUIRED_VARS _SSE3_TRUE _SSE3_OK - FAIL_MESSAGE "Could not find hardware support for SSE3") -find_package_handle_standard_args(SSSE3 - REQUIRED_VARS _SSSE3_TRUE _SSSE3_OK - FAIL_MESSAGE "Could not find hardware support for SSSE3") -find_package_handle_standard_args(SSE4_1 - REQUIRED_VARS _SSE41_TRUE _SSE41_OK - FAIL_MESSAGE "Could not find hardware support for SSE4.1") -find_package_handle_standard_args(SSE4_2 - REQUIRED_VARS _SSE42_TRUE _SSE42_OK - FAIL_MESSAGE "Could not find hardware support for SSE4.2") -find_package_handle_standard_args(AVX - REQUIRED_VARS _AVX_TRUE _AVX_OK - FAIL_MESSAGE "Could not find hardware support for AVX") -find_package_handle_standard_args(AVX2 - REQUIRED_VARS _AVX2_TRUE _AVX2_OK - FAIL_MESSAGE "Could not find hardware support for AVX2") - -mark_as_advanced(SSE2_FOUND SSE3_FOUND SSSE3_FOUND SSE4_1_FOUND SSE4_2_FOUND AVX_FOUND AVX2_FOUND) - -unset(_SSE_THERE) -unset(_SSE_TRUE) -unset(_SSE_OK) -unset(_SSE_OK CACHE) -unset(_SSE2_TRUE) -unset(_SSE2_OK) -unset(_SSE2_OK CACHE) -unset(_SSE3_TRUE) -unset(_SSE3_OK) -unset(_SSE3_OK CACHE) -unset(_SSSE3_TRUE) -unset(_SSSE3_OK) -unset(_SSSE3_OK CACHE) -unset(_SSE4_1_TRUE) -unset(_SSE41_OK) -unset(_SSE41_OK CACHE) -unset(_SSE4_2_TRUE) -unset(_SSE42_OK) -unset(_SSE42_OK CACHE) -unset(_AVX_TRUE) -unset(_AVX_OK) -unset(_AVX_OK CACHE) -unset(_AVX2_TRUE) -unset(_AVX2_OK) -unset(_AVX2_OK CACHE) - diff --git a/project/cmake/modules/FindSSH.cmake b/project/cmake/modules/FindSSH.cmake deleted file mode 100644 index 538c699a2d..0000000000 --- a/project/cmake/modules/FindSSH.cmake +++ /dev/null @@ -1,47 +0,0 @@ -#.rst: -# FindSSH -# ------- -# Finds the SSH library -# -# This will will define the following variables:: -# -# SSH_FOUND - system has SSH -# SSH_INCLUDE_DIRS - the SSH include directory -# SSH_LIBRARIES - the SSH libraries -# SSH_DEFINITIONS - the SSH definitions -# -# and the following imported targets:: -# -# SSH::SSH - The SSH library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_SSH libssh QUIET) -endif() - -find_path(SSH_INCLUDE_DIR NAMES libssh/libssh.h - PATHS ${PC_SSH_INCLUDEDIR}) -find_library(SSH_LIBRARY NAMES ssh - PATHS ${PC_SSH_LIBDIR}) - -set(SSH_VERSION ${PC_SSH_VERSION}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(SSH - REQUIRED_VARS SSH_LIBRARY SSH_INCLUDE_DIR - VERSION_VAR SSH_VERSION) - -if(SSH_FOUND) - set(SSH_LIBRARIES ${SSH_LIBRARY}) - set(SSH_INCLUDE_DIRS ${SSH_INCLUDE_DIR}) - set(SSH_DEFINITIONS -DHAVE_LIBSSH=1) - - if(NOT TARGET SSH::SSH) - add_library(SSH::SSH UNKNOWN IMPORTED) - set_target_properties(SSH::SSH PROPERTIES - IMPORTED_LOCATION "${SSH_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${SSH_INCLUDE_DIR}" - INTERFACE_COMPILE_DEFINITIONS HAVE_LIBSSH=1) - endif() -endif() - -mark_as_advanced(SSH_INCLUDE_DIR SSH_LIBRARY) diff --git a/project/cmake/modules/FindSWIG.cmake b/project/cmake/modules/FindSWIG.cmake deleted file mode 100644 index 523b49bd82..0000000000 --- a/project/cmake/modules/FindSWIG.cmake +++ /dev/null @@ -1,29 +0,0 @@ -#.rst: -# FindSWIG -# -------- -# Finds the SWIG executable -# -# This will will define the following variables:: -# -# SWIG_FOUND - system has SWIG -# SWIG_EXECUTABLE - the SWIG executable - -find_program(SWIG_EXECUTABLE NAMES swig3.0 swig2.0 swig - PATH_SUFFIXES swig) -if(SWIG_EXECUTABLE) - execute_process(COMMAND ${SWIG_EXECUTABLE} -swiglib - OUTPUT_VARIABLE SWIG_DIR - ERROR_VARIABLE SWIG_swiglib_error - RESULT_VARIABLE SWIG_swiglib_result) - execute_process(COMMAND ${SWIG_EXECUTABLE} -version - OUTPUT_VARIABLE SWIG_version_output - ERROR_VARIABLE SWIG_version_output - RESULT_VARIABLE SWIG_version_result) - string(REGEX REPLACE ".*SWIG Version[^0-9.]*\([0-9.]+\).*" "\\1" - SWIG_VERSION "${SWIG_version_output}") -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(SWIG - REQUIRED_VARS SWIG_EXECUTABLE SWIG_DIR - VERSION_VAR SWIG_VERSION) diff --git a/project/cmake/modules/FindSdl.cmake b/project/cmake/modules/FindSdl.cmake deleted file mode 100644 index 91bcac5bf7..0000000000 --- a/project/cmake/modules/FindSdl.cmake +++ /dev/null @@ -1,46 +0,0 @@ -#.rst: -# FindSDL -# ------- -# Finds the SDL library -# -# This will will define the following variables:: -# -# SDL_FOUND - system has SDL -# SDL_INCLUDE_DIRS - the SDL include directory -# SDL_LIBRARIES - the SDL libraries -# SDL_DEFINITIONS - the SDL compile definitions - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_SDL2 sdl2 QUIET) - if(PC_SDL2_FOUND) - set(SDL_VERSION ${PC_SDL2_VERSION}) - else() - pkg_check_modules(PC_SDL1 sdl QUIET) - if(PC_SDL1_FOUND) - set(SDL_VERSION ${PC_SDL1_VERSION}) - endif() - endif() -endif() - -find_path(SDL_INCLUDE_DIR SDL/SDL.h - PATHS ${PC_SDL2_INCLUDE_DIR} ${PC_SDL1_INCLUDE_DIR}) -find_library(SDL_LIBRARY NAMES SDL2 SDL - PATHS ${PC_SDL2_LIBDIR} ${PC_SDL1_LIBDIR}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Sdl REQUIRED_VARS SDL_LIBRARY SDL_INCLUDE_DIR - VERSION_VAR SDL_VERSION) - -if(SDL_FOUND) - set(SDL_LIBRARIES ${SDL_LIBRARY}) - set(SDL_INCLUDE_DIRS ${SDL_INCLUDE_DIR}) - set(SDL_DEFINITIONS -DHAVE_SDL=1) - - if(SDL_VERSION VERSION_GREATER 2) - list(APPEND SDL_DEFINITIONS -DHAVE_SDL_VERSION=2) - elseif(SDL_VERSION VERSION_GREATER 1) - list(APPEND SDL_DEFINITIONS -DHAVE_SDL_VERSION=1) - endif() -endif() - -mark_as_advanced(SDL_LIBRARY SDL_INCLUDE_DIR) diff --git a/project/cmake/modules/FindShairplay.cmake b/project/cmake/modules/FindShairplay.cmake deleted file mode 100644 index 87d3107f60..0000000000 --- a/project/cmake/modules/FindShairplay.cmake +++ /dev/null @@ -1,63 +0,0 @@ -#.rst: -# FindShairplay -# ------------- -# Finds the Shairplay library -# -# This will will define the following variables:: -# -# SHAIRPLAY_FOUND - system has Shairplay -# SHAIRPLAY_INCLUDE_DIRS - the Shairplay include directory -# SHAIRPLAY_LIBRARIES - the Shairplay libraries -# SHAIRPLAY_DEFINITIONS - the Shairplay compile definitions -# -# and the following imported targets:: -# -# Shairplay::Shairplay - The Shairplay library - -find_path(SHAIRPLAY_INCLUDE_DIR shairplay/raop.h) - -include(FindPackageHandleStandardArgs) -if(NOT WIN32) - find_library(SHAIRPLAY_LIBRARY NAMES shairplay) - - if(SHAIRPLAY_INCLUDE_DIR AND SHAIRPLAY_LIBRARY) - include(CheckCSourceCompiles) - set(CMAKE_REQUIRED_INCLUDES ${SHAIRPLAY_INCLUDE_DIRS}) - set(CMAKE_REQUIRED_LIBRARIES ${SHAIRPLAY_LIBRARIES}) - check_c_source_compiles("#include <shairplay/raop.h> - - int main() - { - struct raop_callbacks_s foo; - foo.cls; - return 0; - } - " HAVE_SHAIRPLAY_CALLBACK_CLS) - endif() - - find_package_handle_standard_args(Shairplay - REQUIRED_VARS SHAIRPLAY_LIBRARY SHAIRPLAY_INCLUDE_DIR HAVE_SHAIRPLAY_CALLBACK_CLS) -else() - # Dynamically loaded DLL - find_package_handle_standard_args(Shairplay - REQUIRED_VARS SHAIRPLAY_INCLUDE_DIR) -endif() - -if(SHAIRPLAY_FOUND) - set(SHAIRPLAY_LIBRARIES ${SHAIRPLAY_LIBRARY}) - set(SHAIRPLAY_INCLUDE_DIRS ${SHAIRPLAY_INCLUDE_DIR}) - set(SHAIRPLAY_DEFINITIONS -DHAVE_LIBSHAIRPLAY=1) - - if(NOT TARGET Shairplay::Shairplay) - add_library(Shairplay::Shairplay UNKNOWN IMPORTED) - if(SHAIRPLAY_LIBRARY) - set_target_properties(Shairplay::Shairplay PROPERTIES - IMPORTED_LOCATION "${SHAIRPLAY_LIBRARY}") - endif() - set_target_properties(Shairplay::Shairplay PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${SHAIRPLAY_INCLUDE_DIR}" - INTERFACE_COMPILE_DEFINITIONS HAVE_LIBSHAIRPLAY=1) - endif() -endif() - -mark_as_advanced(SHAIRPLAY_INCLUDE_DIR SHAIRPLAY_LIBRARY) diff --git a/project/cmake/modules/FindSmbClient.cmake b/project/cmake/modules/FindSmbClient.cmake deleted file mode 100644 index 6455cce3a1..0000000000 --- a/project/cmake/modules/FindSmbClient.cmake +++ /dev/null @@ -1,47 +0,0 @@ -#.rst: -# FindSmbClient -# ------------- -# Finds the SMB Client library -# -# This will will define the following variables:: -# -# SMBCLIENT_FOUND - system has SmbClient -# SMBCLIENT_INCLUDE_DIRS - the SmbClient include directory -# SMBCLIENT_LIBRARIES - the SmbClient libraries -# SMBCLIENT_DEFINITIONS - the SmbClient definitions -# -# and the following imported targets:: -# -# SmbClient::SmbClient - The SmbClient library - -if(PKGCONFIG_FOUND) - pkg_check_modules(PC_SMBCLIENT smbclient QUIET) -endif() - -find_path(SMBCLIENT_INCLUDE_DIR NAMES libsmbclient.h - PATHS ${PC_SMBCLIENT_INCLUDEDIR}) -find_library(SMBCLIENT_LIBRARY NAMES smbclient - PATHS ${PC_SMBCLIENT_LIBDIR}) - -set(SMBCLIENT_VERSION ${PC_SMBCLIENT_VERSION}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(SmbClient - REQUIRED_VARS SMBCLIENT_LIBRARY SMBCLIENT_INCLUDE_DIR - VERSION_VAR SMBCLIENT_VERSION) - -if(SMBCLIENT_FOUND) - set(SMBCLIENT_LIBRARIES ${SMBCLIENT_LIBRARY}) - set(SMBCLIENT_INCLUDE_DIRS ${SMBCLIENT_INCLUDE_DIR}) - set(SMBCLIENT_DEFINITIONS -DHAVE_LIBSMBCLIENT=1) - - if(NOT TARGET SmbClient::SmbClient) - add_library(SmbClient::SmbClient UNKNOWN IMPORTED) - set_target_properties(SmbClient::SmbClient PROPERTIES - IMPORTED_LOCATION "${SMBCLIENT_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${SMBCLIENT_INCLUDE_DIR}" - INTERFACE_COMPILE_DEFINITIONS HAVE_LIBSMBCLIENT=1) - endif() -endif() - -mark_as_advanced(LIBSMBCLIENT_INCLUDE_DIR LIBSMBCLIENT_LIBRARY) diff --git a/project/cmake/modules/FindSqlite3.cmake b/project/cmake/modules/FindSqlite3.cmake deleted file mode 100644 index abde0cff0a..0000000000 --- a/project/cmake/modules/FindSqlite3.cmake +++ /dev/null @@ -1,44 +0,0 @@ -#.rst: -# FindSqlite3 -# ----------- -# Finds the SQLite3 library -# -# This will will define the following variables:: -# -# SQLITE3_FOUND - system has SQLite3 -# SQLITE3_INCLUDE_DIRS - the SQLite3 include directory -# SQLITE3_LIBRARIES - the SQLite3 libraries -# -# and the following imported targets:: -# -# SQLite3::SQLite3 - The SQLite3 library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_SQLITE3 sqlite3 QUIET) -endif() - -find_path(SQLITE3_INCLUDE_DIR NAMES sqlite3.h - PATHS ${PC_SQLITE3_INCLUDEDIR}) -find_library(SQLITE3_LIBRARY NAMES sqlite3 - PATHS ${PC_SQLITE3_LIBDIR}) - -set(SQLITE3_VERSION ${PC_SQLITE3_VERSION}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Sqlite3 - REQUIRED_VARS SQLITE3_LIBRARY SQLITE3_INCLUDE_DIR - VERSION_VAR SQLITE3_VERSION) - -if(SQLITE3_FOUND) - set(SQLITE3_INCLUDE_DIRS ${SQLITE3_INCLUDE_DIR}) - set(SQLITE3_LIBRARIES ${SQLITE3_LIBRARY}) - - if(NOT TARGET SQLite3::SQLite3) - add_library(SQLite3::SQLite3 UNKNOWN IMPORTED) - set_target_properties(SQLite3::SQLite3 PROPERTIES - IMPORTED_LOCATION "${SQLITE3_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${SQLITE3_INCLUDE_DIR}") - endif() -endif() - -mark_as_advanced(SQLITE3_INCLUDE_DIR SQLITE3_LIBRARY) diff --git a/project/cmake/modules/FindTagLib.cmake b/project/cmake/modules/FindTagLib.cmake deleted file mode 100644 index 8c8c2f30a1..0000000000 --- a/project/cmake/modules/FindTagLib.cmake +++ /dev/null @@ -1,60 +0,0 @@ -#.rst: -# FindTagLib -# ---------- -# Finds the TagLib library -# -# This will will define the following variables:: -# -# TAGLIB_FOUND - system has TagLib -# TAGLIB_INCLUDE_DIRS - the TagLib include directory -# TAGLIB_LIBRARIES - the TagLib libraries -# -# and the following imported targets:: -# -# TagLib::TagLib - The TagLib library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_TAGLIB taglib>=1.9.0 QUIET) -endif() - -find_path(TAGLIB_INCLUDE_DIR taglib/tag.h - PATHS ${PC_TAGLIB_INCLUDEDIR}) -find_library(TAGLIB_LIBRARY_RELEASE NAMES tag - PATHS ${PC_TAGLIB_LIBDIR}) -find_library(TAGLIB_LIBRARY_DEBUG NAMES tagd - PATHS ${PC_TAGLIB_LIBDIR}) -set(TAGLIB_VERSION ${PC_TAGLIB_VERSION}) - -include(SelectLibraryConfigurations) -select_library_configurations(TAGLIB) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(TagLib - REQUIRED_VARS TAGLIB_LIBRARY TAGLIB_INCLUDE_DIR - VERSION_VAR TAGLIB_VERSION) - -if(TAGLIB_FOUND) - set(TAGLIB_LIBRARIES ${TAGLIB_LIBRARY}) - - # Workaround broken .pc file - list(APPEND TAGLIB_LIBRARIES ${PC_TAGLIB_ZLIB_LIBRARIES}) - - set(TAGLIB_INCLUDE_DIRS ${TAGLIB_INCLUDE_DIR}) - if(NOT TARGET TagLib::TagLib) - add_library(TagLib::TagLib UNKNOWN IMPORTED) - if(TAGLIB_LIBRARY_RELEASE) - set_target_properties(TagLib::TagLib PROPERTIES - IMPORTED_CONFIGURATIONS RELEASE - IMPORTED_LOCATION "${TAGLIB_LIBRARY_RELEASE}") - endif() - if(TAGLIB_LIBRARY_DEBUG) - set_target_properties(TagLib::TagLib PROPERTIES - IMPORTED_CONFIGURATIONS DEBUG - IMPORTED_LOCATION "${TAGLIB_LIBRARY_DEBUG}") - endif() - set_target_properties(TagLib::TagLib PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${TAGLIB_INCLUDE_DIR}") - endif() -endif() - -mark_as_advanced(TAGLIB_INCLUDE_DIR TAGLIB_LIBRARY) diff --git a/project/cmake/modules/FindTexturePacker.cmake b/project/cmake/modules/FindTexturePacker.cmake deleted file mode 100644 index 677b4d983b..0000000000 --- a/project/cmake/modules/FindTexturePacker.cmake +++ /dev/null @@ -1,41 +0,0 @@ -#.rst: -# FindTexturePacker -# ----------------- -# Finds the TexturePacker -# -# If WITH_TEXTUREPACKER is defined and points to a directory, -# this path will be used to search for the Texturepacker binary -# -# -# This will define the following (imported) targets:: -# -# TexturePacker::TexturePacker - The TexturePacker executable - -if(NOT TARGET TexturePacker::TexturePacker) - if(KODI_DEPENDSBUILD) - add_executable(TexturePacker::TexturePacker IMPORTED GLOBAL) - set_target_properties(TexturePacker::TexturePacker PROPERTIES - IMPORTED_LOCATION "${NATIVEPREFIX}/bin/TexturePacker") - elseif(WIN32) - add_executable(TexturePacker::TexturePacker IMPORTED GLOBAL) - set_target_properties(TexturePacker::TexturePacker PROPERTIES - IMPORTED_LOCATION "${CORE_SOURCE_DIR}/tools/TexturePacker/TexturePacker.exe") - else() - if(WITH_TEXTUREPACKER) - get_filename_component(_tppath ${WITH_TEXTUREPACKER} ABSOLUTE) - find_program(TEXTUREPACKER_EXECUTABLE TexturePacker PATHS ${_tppath}) - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(TexturePacker DEFAULT_MSG TEXTUREPACKER_EXECUTABLE) - if(TEXTUREPACKER_FOUND) - add_executable(TexturePacker::TexturePacker IMPORTED GLOBAL) - set_target_properties(TexturePacker::TexturePacker PROPERTIES - IMPORTED_LOCATION "${TEXTUREPACKER_EXECUTABLE}") - endif() - mark_as_advanced(TEXTUREPACKER) - else() - add_subdirectory(${CORE_SOURCE_DIR}/tools/depends/native/TexturePacker build/texturepacker) - add_executable(TexturePacker::TexturePacker ALIAS TexturePacker) - endif() - endif() -endif() diff --git a/project/cmake/modules/FindTinyXML.cmake b/project/cmake/modules/FindTinyXML.cmake deleted file mode 100644 index 1220a94387..0000000000 --- a/project/cmake/modules/FindTinyXML.cmake +++ /dev/null @@ -1,68 +0,0 @@ -#.rst: -# FindTinyXML -# ----------- -# Finds the TinyXML library -# -# This will will define the following variables:: -# -# TINYXML_FOUND - system has TinyXML -# TINYXML_INCLUDE_DIRS - the TinyXML include directory -# TINYXML_LIBRARIES - the TinyXML libraries -# TINYXML_DEFINITIONS - the TinyXML definitions -# -# and the following imported targets:: -# -# TinyXML::TinyXML - The TinyXML library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_TINYXML tinyxml QUIET) -endif() - -find_path(TINYXML_INCLUDE_DIR tinyxml.h - PATH_SUFFIXES tinyxml - PATHS ${PC_TINYXML_INCLUDEDIR}) -find_library(TINYXML_LIBRARY_RELEASE NAMES tinyxml tinyxmlSTL - PATH_SUFFIXES tinyxml - PATHS ${PC_TINYXML_LIBDIR}) -find_library(TINYXML_LIBRARY_DEBUG NAMES tinyxmld tinyxmlSTLd - PATH_SUFFIXES tinyxml - PATHS ${PC_TINYXML_LIBDIR}) -set(TINYXML_VERSION ${PC_TINYXML_VERSION}) - -include(SelectLibraryConfigurations) -select_library_configurations(TINYXML) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(TinyXML - REQUIRED_VARS TINYXML_LIBRARY TINYXML_INCLUDE_DIR - VERSION_VAR TINYXML_VERSION) - -if(TINYXML_FOUND) - set(TINYXML_LIBRARIES ${TINYXML_LIBRARY}) - set(TINYXML_INCLUDE_DIRS ${TINYXML_INCLUDE_DIR}) - if(WIN32) - set(TINYXML_DEFINITIONS -DTIXML_USE_STL=1) - endif() - - if(NOT TARGET TinyXML::TinyXML) - add_library(TinyXML::TinyXML UNKNOWN IMPORTED) - if(TINYXML_LIBRARY_RELEASE) - set_target_properties(TinyXML::TinyXML PROPERTIES - IMPORTED_CONFIGURATIONS RELEASE - IMPORTED_LOCATION "${TINYXML_LIBRARY_RELEASE}") - endif() - if(TINYXML_LIBRARY_DEBUG) - set_target_properties(TinyXML::TinyXML PROPERTIES - IMPORTED_CONFIGURATIONS DEBUG - IMPORTED_LOCATION "${TINYXML_LIBRARY_DEBUG}") - endif() - set_target_properties(TinyXML::TinyXML PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${TINYXML_INCLUDE_DIR}") - if(WIN32) - set_target_properties(TinyXML::TinyXML PROPERTIES - INTERFACE_COMPILE_DEFINITIONS TIXML_USE_STL=1) - endif() - endif() -endif() - -mark_as_advanced(TINYXML_INCLUDE_DIR TINYXML_LIBRARY) diff --git a/project/cmake/modules/FindUDEV.cmake b/project/cmake/modules/FindUDEV.cmake deleted file mode 100644 index 422c437d91..0000000000 --- a/project/cmake/modules/FindUDEV.cmake +++ /dev/null @@ -1,47 +0,0 @@ -#.rst: -# FindUDEV -# ------- -# Finds the UDEV library -# -# This will will define the following variables:: -# -# UDEV_FOUND - system has UDEV -# UDEV_INCLUDE_DIRS - the UDEV include directory -# UDEV_LIBRARIES - the UDEV libraries -# UDEV_DEFINITIONS - the UDEV definitions -# -# and the following imported targets:: -# -# UDEV::UDEV - The UDEV library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_UDEV libudev QUIET) -endif() - -find_path(UDEV_INCLUDE_DIR NAMES libudev.h - PATHS ${PC_UDEV_INCLUDEDIR}) -find_library(UDEV_LIBRARY NAMES udev - PATHS ${PC_UDEV_LIBDIR}) - -set(UDEV_VERSION ${PC_UDEV_VERSION}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(UDEV - REQUIRED_VARS UDEV_LIBRARY UDEV_INCLUDE_DIR - VERSION_VAR UDEV_VERSION) - -if(UDEV_FOUND) - set(UDEV_LIBRARIES ${UDEV_LIBRARY}) - set(UDEV_INCLUDE_DIRS ${UDEV_INCLUDE_DIR}) - set(UDEV_DEFINITIONS -DHAVE_LIBUDEV=1) - - if(NOT TARGET UDEV::UDEV) - add_library(UDEV::UDEV UNKNOWN IMPORTED) - set_target_properties(UDEV::UDEV PROPERTIES - IMPORTED_LOCATION "${UDEV_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${UDEV_INCLUDE_DIR}" - INTERFACE_COMPILE_DEFINITIONS HAVE_LIBUDEV=1) - endif() -endif() - -mark_as_advanced(UDEV_INCLUDE_DIR UDEV_LIBRARY) diff --git a/project/cmake/modules/FindUUID.cmake b/project/cmake/modules/FindUUID.cmake deleted file mode 100644 index 173fac277d..0000000000 --- a/project/cmake/modules/FindUUID.cmake +++ /dev/null @@ -1,43 +0,0 @@ -#.rst: -# FindUUID -# -------- -# Finds the libuuid library -# -# This will will define the following variables:: -# -# UUID_FOUND - system has libuuid -# UUID_INCLUDE_DIRS - the libuuid include directory -# UUID_LIBRARIES - the libuuid libraries -# -# and the following imported targets:: -# -# UUID::UUID - The libuuid library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_UUID uuid QUIET) -endif() - -find_path(UUID_INCLUDE_DIR uuid/uuid.h - PATHS ${PC_UUID_INCLUDEDIR}) -find_library(UUID_LIBRARY uuid - PATHS ${PC_UUID_LIBRARY}) -set(UUID_VERSION ${PC_UUID_VERSION}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(UUID - REQUIRED_VARS UUID_LIBRARY UUID_INCLUDE_DIR - VERSION_VAR UUID_VERSION) - -if(UUID_FOUND) - set(UUID_LIBRARIES ${UUID_LIBRARY}) - set(UUID_INCLUDE_DIRS ${UUID_INCLUDE_DIR}) - - if(NOT TARGET UUID::UUID) - add_library(UUID::UUID UNKNOWN IMPORTED) - set_target_properties(UUID::UUID PROPERTIES - IMPORTED_LOCATION "${UUID_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${UUID_INCLUDE_DIR}") - endif() -endif() - -mark_as_advanced(UUID_INCLUDE_DIR UUID_LIBRARY) diff --git a/project/cmake/modules/FindVAAPI.cmake b/project/cmake/modules/FindVAAPI.cmake deleted file mode 100644 index ea9a3c9558..0000000000 --- a/project/cmake/modules/FindVAAPI.cmake +++ /dev/null @@ -1,72 +0,0 @@ -#.rst: -# FindVAAPI -# --------- -# Finds the VAAPI library -# -# This will will define the following variables:: -# -# VAAPI_FOUND - system has VAAPI -# VAAPI_INCLUDE_DIRS - the VAAPI include directory -# VAAPI_LIBRARIES - the VAAPI libraries -# VAAPI_DEFINITIONS - the VAAPI definitions -# -# and the following imported targets:: -# -# VAAPI::VAAPI - The VAAPI library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_VAAPI libva libva-x11 QUIET) -endif() - -find_path(VAAPI_INCLUDE_DIR va/va.h - PATHS ${PC_VAAPI_libva_INCLUDEDIR}) -find_library(VAAPI_libva_LIBRARY NAMES va - PATHS ${PC_VAAPI_libva_LIBDIR}) -find_library(VAAPI_libva-x11_LIBRARY NAMES va-x11 - PATHS ${PC_VAAPI_libva_LIBDIR}) -find_library(VAAPI_libva-drm_LIBRARY NAMES va-drm - PATHS ${PC_VAAPI_libva_LIBDIR}) - -if(PC_VAAPI_libva_VERSION) - set(VAAPI_VERSION_STRING ${PC_VAAPI_libva_VERSION}) -elseif(VAAPI_INCLUDE_DIR AND EXISTS "${VAAPI_INCLUDE_DIR}/va/va_version.h") - file(STRINGS "${VAAPI_INCLUDE_DIR}/va/va_version.h" vaapi_version_str REGEX "^#define[\t ]+VA_VERSION_S[\t ]+\".*\".*") - string(REGEX REPLACE "^#define[\t ]+VA_VERSION_S[\t ]+\"([^\"]+)\".*" "\\1" VAAPI_VERSION_STRING "${vaapi_version_str}") - unset(vaapi_version_str) -endif() - -if(NOT VAAPI_FIND_VERSION) - set(VAAPI_FIND_VERSION 0.38.0) -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(VAAPI - REQUIRED_VARS VAAPI_libva_LIBRARY VAAPI_libva-x11_LIBRARY VAAPI_libva-drm_LIBRARY VAAPI_INCLUDE_DIR - VERSION_VAR VAAPI_VERSION_STRING) - -if(VAAPI_FOUND) - set(VAAPI_INCLUDE_DIRS ${VAAPI_INCLUDE_DIR}) - set(VAAPI_LIBRARIES ${VAAPI_libva_LIBRARY} ${VAAPI_libva-x11_LIBRARY} ${VAAPI_libva-drm_LIBRARY}) - set(VAAPI_DEFINITIONS -DHAVE_LIBVA=1) - - if(NOT TARGET VAAPI::VAAPI_X11) - add_library(VAAPI::VAAPI_X11 UNKNOWN IMPORTED) - set_target_properties(VAAPI::VAAPI_X11 PROPERTIES - IMPORTED_LOCATION "${VAAPI_libva-x11_LIBRARY}") - endif() - if (NOT TARGET VAAPI::VAAPI_DRM) - add_library(VAAPI::VAAPI_DRM UNKNOWN IMPORTED) - set_target_properties(VAAPI::VAAPI_DRM PROPERTIES - IMPORTED_LOCATION "${VAAPI_libva-drm_LIBRARY}") - endif() - if(NOT TARGET VAAPI::VAAPI) - add_library(VAAPI::VAAPI UNKNOWN IMPORTED) - set_target_properties(VAAPI::VAAPI PROPERTIES - IMPORTED_LOCATION "${VAAPI_libva_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${VAAPI_INCLUDE_DIR}" - INTERFACE_COMPILE_DEFINITIONS HAVE_LIBVA=1 - INTERFACE_LINK_LIBRARIES "VAAPI::VAAPI_X11 VAAPI::VAAPI_DRM") - endif() -endif() - -mark_as_advanced(VAAPI_INCLUDE_DIR VAAPI_libva_LIBRARY VAAPI_libva-x11_LIBRARY VAAPI_libva-drm_LIBRARY) diff --git a/project/cmake/modules/FindVDPAU.cmake b/project/cmake/modules/FindVDPAU.cmake deleted file mode 100644 index b99e03f49b..0000000000 --- a/project/cmake/modules/FindVDPAU.cmake +++ /dev/null @@ -1,47 +0,0 @@ -#.rst: -# FindVDPAU -# --------- -# Finds the VDPAU library -# -# This will will define the following variables:: -# -# VDPAU_FOUND - system has VDPAU -# VDPAU_INCLUDE_DIRS - the VDPAU include directory -# VDPAU_LIBRARIES - the VDPAU libraries -# VDPAU_DEFINITIONS - the VDPAU definitions -# -# and the following imported targets:: -# -# VDPAU::VDPAU - The VDPAU library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_VDPAU vdpau QUIET) -endif() - -find_path(VDPAU_INCLUDE_DIR NAMES vdpau/vdpau.h vdpau/vdpau_x11.h - PATHS ${PC_VDPAU_INCLUDEDIR}) -find_library(VDPAU_LIBRARY NAMES vdpau - PATHS ${PC_VDPAU_LIBDIR}) - -set(VDPAU_VERSION ${PC_VDPAU_VERSION}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(VDPAU - REQUIRED_VARS VDPAU_LIBRARY VDPAU_INCLUDE_DIR - VERSION_VAR VDPAU_VERSION) - -if(VDPAU_FOUND) - set(VDPAU_INCLUDE_DIRS ${VDPAU_INCLUDE_DIR}) - set(VDPAU_LIBRARIES ${VDPAU_LIBRARY}) - set(VDPAU_DEFINITIONS -DHAVE_LIBVDPAU=1) - - if(NOT TARGET VDPAU::VDPAU) - add_library(VDPAU::VDPAU UNKNOWN IMPORTED) - set_target_properties(VDPAU::VDPAU PROPERTIES - IMPORTED_LOCATION "${VDPAU_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${VDPAU_INCLUDE_DIR}" - INTERFACE_COMPILE_DEFINITIONS HAVE_LIBVDPAU=1) - endif() -endif() - -mark_as_advanced(VDPAU_INCLUDE_DIR VDPAU_LIBRARY) diff --git a/project/cmake/modules/FindX.cmake b/project/cmake/modules/FindX.cmake deleted file mode 100644 index 19bb770cfa..0000000000 --- a/project/cmake/modules/FindX.cmake +++ /dev/null @@ -1,57 +0,0 @@ -#.rst: -# FindX -# ----- -# Finds the X11 library -# -# This will will define the following variables:: -# -# X_FOUND - system has X11 -# X_INCLUDE_DIRS - the X11 include directory -# X_LIBRARIES - the X11 libraries -# X_DEFINITIONS - the X11 definitions -# -# and the following imported targets:: -# -# X::X - The X11 library -# X::Xext - The X11 extension library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_X x11 xext QUIET) -endif() - -find_path(X_INCLUDE_DIR NAMES X11/Xlib.h - PATHS ${PC_X_x11_INCLUDEDIR}) -find_library(X_LIBRARY NAMES X11 - PATHS ${PC_X_x11_LIBDIR}) -find_library(X_EXT_LIBRARY NAMES Xext - PATHS ${PC_X_xext_LIBDIR}) - -set(X_VERSION ${PC_X_x11_VERSION}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(X - REQUIRED_VARS X_LIBRARY X_EXT_LIBRARY X_INCLUDE_DIR - VERSION_VAR X_VERSION) - -if(X_FOUND) - set(X_LIBRARIES ${X_LIBRARY} ${X_EXT_LIBRARY}) - set(X_INCLUDE_DIRS ${X_INCLUDE_DIR}) - set(X_DEFINITIONS -DHAVE_X11=1) - - if(NOT TARGET X::X) - add_library(X::X UNKNOWN IMPORTED) - set_target_properties(X::X PROPERTIES - IMPORTED_LOCATION "${X_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${X_INCLUDE_DIR}" - INTERFACE_COMPILE_DEFINITIONS HAVE_X11=1) - endif() - if(NOT TARGET X::Xext) - add_library(X::Xext UNKNOWN IMPORTED) - set_target_properties(X::Xext PROPERTIES - IMPORTED_LOCATION "${X_EXT_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${X_INCLUDE_DIR}" - INTERFACE_LINK_LIBRARIES X::X) - endif() -endif() - -mark_as_advanced(X_INCLUDE_DIR X_LIBRARY X_EXT_LIBRARY) diff --git a/project/cmake/modules/FindXRandR.cmake b/project/cmake/modules/FindXRandR.cmake deleted file mode 100644 index 9feaedc6f7..0000000000 --- a/project/cmake/modules/FindXRandR.cmake +++ /dev/null @@ -1,47 +0,0 @@ -#.rst: -# FindXRandR -# ---------- -# Finds the XRandR library -# -# This will will define the following variables:: -# -# XRANDR_FOUND - system has XRANDR -# XRANDR_INCLUDE_DIRS - the XRANDR include directory -# XRANDR_LIBRARIES - the XRANDR libraries -# XRANDR_DEFINITIONS - the XRANDR definitions -# -# and the following imported targets:: -# -# XRandR::XRandR - The XRANDR library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_XRANDR xrandr QUIET) -endif() - -find_path(XRANDR_INCLUDE_DIR NAMES X11/extensions/Xrandr.h - PATHS ${PC_XRANDR_INCLUDEDIR}) -find_library(XRANDR_LIBRARY NAMES Xrandr - PATHS ${PC_XRANDR_LIBDIR}) - -set(XRANDR_VERSION ${PC_XRANDR_VERSION}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(XRandR - REQUIRED_VARS XRANDR_LIBRARY XRANDR_INCLUDE_DIR - VERSION_VAR XRANDR_VERSION) - -if(XRANDR_FOUND) - set(XRANDR_LIBRARIES ${XRANDR_LIBRARY}) - set(XRANDR_INCLUDE_DIRS ${XRANDR_INCLUDE_DIR}) - set(XRANDR_DEFINITIONS -DHAVE_LIBXRANDR=1) - - if(NOT TARGET XRandR::XRandR) - add_library(XRandR::XRandR UNKNOWN IMPORTED) - set_target_properties(XRandR::XRandR PROPERTIES - IMPORTED_LOCATION "${XRANDR_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${XRANDR_INCLUDE_DIR}" - INTERFACE_COMPILE_DEFINITIONS HAVE_LIBXRANDR=1) - endif() -endif() - -mark_as_advanced(XRANDR_INCLUDE_DIR XRANDR_LIBRARY) diff --git a/project/cmake/modules/FindXSLT.cmake b/project/cmake/modules/FindXSLT.cmake deleted file mode 100644 index f7fea9e343..0000000000 --- a/project/cmake/modules/FindXSLT.cmake +++ /dev/null @@ -1,50 +0,0 @@ -#.rst: -# FindXSLT -# -------- -# Finds the XSLT library -# -# This will will define the following variables:: -# -# XSLT_FOUND - system has XSLT -# XSLT_INCLUDE_DIRS - the XSLT include directory -# XSLT_LIBRARIES - the XSLT libraries -# XSLT_DEFINITIONS - the XSLT definitions -# -# and the following imported targets:: -# -# XSLT::XSLT - The XSLT library - -find_package(LibXml2 REQUIRED) - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_XSLT libxslt QUIET) -endif() - -find_path(XSLT_INCLUDE_DIR NAMES libxslt/xslt.h - PATHS ${PC_XSLT_INCLUDEDIR}) -find_library(XSLT_LIBRARY NAMES xslt libxslt - PATHS ${PC_XSLT_LIBDIR}) - -set(XSLT_VERSION ${PC_XSLT_VERSION}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(XSLT - REQUIRED_VARS XSLT_LIBRARY XSLT_INCLUDE_DIR - VERSION_VAR XSLT_VERSION) - -if(XSLT_FOUND) - set(XSLT_LIBRARIES ${XSLT_LIBRARY} ${LIBXML2_LIBRARIES}) - set(XSLT_INCLUDE_DIRS ${XSLT_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR}) - set(XSLT_DEFINITIONS -DHAVE_LIBXSLT=1) - - if(NOT TARGET XSLT::XSLT) - add_library(XSLT::XSLT UNKNOWN IMPORTED) - set_target_properties(XSLT::XSLT PROPERTIES - IMPORTED_LOCATION "${XSLT_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${XSLT_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR}" - INTERFACE_COMPILE_DEFINITIONS HAVE_LIBXSLT=1 - INTERFACE_LINK_LIBRARIES "${LIBXML2_LIBRARIES}") - endif() -endif() - -mark_as_advanced(XSLT_INCLUDE_DIR XSLT_LIBRARY) diff --git a/project/cmake/modules/FindYajl.cmake b/project/cmake/modules/FindYajl.cmake deleted file mode 100644 index c73a67b809..0000000000 --- a/project/cmake/modules/FindYajl.cmake +++ /dev/null @@ -1,62 +0,0 @@ -#.rst: -# FindYajl -# -------- -# Finds the Yajl library -# -# This will will define the following variables:: -# -# YAJL_FOUND - system has Yajl -# YAJL_INCLUDE_DIRS - Yajl include directory -# YAJL_LIBRARIES - the Yajl libraries -# -# and the following imported targets:: -# -# Yajl::Yajl - The Yajl library - -if(NOT Yajl_FIND_VERSION) - set(Yajl_FIND_VERSION 2.0.0) -endif() - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_YAJL yajl>=${Yajl_FIND_VERSION} QUIET) -endif() - -find_path(YAJL_INCLUDE_DIR NAMES yajl/yajl_common.h - PATHS ${PC_YAJL_INCLUDEDIR}) -find_library(YAJL_LIBRARY NAMES yajl - PATHS ${PC_YAJL_LIBDIR}) - -if(PC_YAJL_VERSION) - set(YAJL_VERSION_STRING ${PC_YAJL_VERSION}) -elseif(YAJL_INCLUDE_DIR AND EXISTS "${YAJL_INCLUDE_DIR}/yajl/yajl_version.h") - file(STRINGS "${YAJL_INCLUDE_DIR}/yajl/yajl_version.h" yajl_version_str REGEX "^[ \t]*#define[ \t]+YAJL_(MAJOR|MINOR|MICRO)") - string(REGEX REPLACE "YAJL_MAJOR ([0-9]+)" "\\1" YAJL_VERSION_MAJOR "${YAJL_VERSION_MAJOR}") - - string(REGEX REPLACE ".*YAJL_MAJOR ([0-9]+).*" "\\1" yajl_major "${yajl_version_str}") - string(REGEX REPLACE ".*YAJL_MINOR ([0-9]+).*" "\\1" yajl_minor "${yajl_version_str}") - string(REGEX REPLACE ".*YAJL_MICRO ([0-9]+).*" "\\1" yajl_micro "${yajl_version_str}") - set(YAJL_VERSION_STRING "${yajl_major}.${yajl_minor}.${yajl_micro}") - unset(yajl_version_str) - unset(yajl_major) - unset(yajl_minor) - unset(yajl_micro) -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Yajl - REQUIRED_VARS YAJL_LIBRARY YAJL_INCLUDE_DIR - VERSION_VAR YAJL_VERSION_STRING) - -if(YAJL_FOUND) - set(YAJL_INCLUDE_DIRS ${YAJL_INCLUDE_DIR}) - set(YAJL_LIBRARIES ${YAJL_LIBRARY}) - - if(NOT TARGET Yajl::Yajl) - add_library(Yajl::Yajl UNKNOWN IMPORTED) - set_target_properties(Yajl::Yajl PROPERTIES - IMPORTED_LOCATION "${YAJL_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${YAJL_INCLUDE_DIR}") - endif() -endif() - -mark_as_advanced(YAJL_INCLUDE_DIR YAJL_LIBRARY) diff --git a/project/cmake/modules/FindZip.cmake b/project/cmake/modules/FindZip.cmake deleted file mode 100644 index e0a38c1290..0000000000 --- a/project/cmake/modules/FindZip.cmake +++ /dev/null @@ -1,46 +0,0 @@ -#.rst: -# FindZip -# ----------- -# Finds the Zip library -# -# This will will define the following variables:: -# -# ZIP_FOUND - system has Zip -# ZIP_INCLUDE_DIRS - the Zip include directory -# ZIP_LIBRARIES - the Zip libraries -# ZIP_DEFINITIONS - the Zip libraries -# -# and the following imported targets:: -# -# ZIP::ZIP - The Zip library - -if(PKG_CONFIG_FOUND) - pkg_check_modules(PC_ZIP libzip QUIET) -endif() - -find_path(ZIP_INCLUDE_DIR zip.h - PATHS ${PC_ZIP_INCLUDEDIR}) -find_library(ZIP_LIBRARY NAMES zip - PATHS ${PC_ZIP_LIBDIR}) -set(ZIP_VERSION ${PC_ZIP_VERSION}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(ZIP - REQUIRED_VARS ZIP_LIBRARY ZIP_INCLUDE_DIR - VERSION_VAR ZIP_VERSION) - -if(ZIP_FOUND) - set(ZIP_LIBRARIES ${ZIP_LIBRARY}) - set(ZIP_INCLUDE_DIRS ${ZIP_INCLUDE_DIR}) - set(ZIP_DEFINITIONS "${PC_ZIP_CFLAGS}") - - if(NOT TARGET ZIP::ZIP) - add_library(ZIP::ZIP UNKNOWN IMPORTED) - set_target_properties(ZIP::ZIP PROPERTIES - IMPORTED_LOCATION "${ZIP_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${ZIP_INCLUDE_DIR}" - INTERFACE_COMPILE_DEFINITIONS "${PC_ZIP_CFLAGS}") - endif() -endif() - -mark_as_advanced(ZIP_INCLUDE_DIR ZIP_LIBRARY) diff --git a/project/cmake/modules/LDGOLD.cmake b/project/cmake/modules/LDGOLD.cmake deleted file mode 100644 index ad19c6b349..0000000000 --- a/project/cmake/modules/LDGOLD.cmake +++ /dev/null @@ -1,45 +0,0 @@ -option(ENABLE_LDGOLD "Use GNU gold linker" ON) - -set(LDGOLD_FOUND FALSE) -if(ENABLE_LDGOLD) - execute_process(COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version ERROR_QUIET OUTPUT_VARIABLE LD_VERSION) - if(LD_VERSION MATCHES "GNU gold") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold") - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold") - set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold") - set(LDGOLD_FOUND TRUE) - message(STATUS "Linker: GNU gold") - else() - message(WARNING "GNU gold linker is not available, falling back to default system linker") - endif() -else() - message(STATUS "Linker: Default system linker") -endif() - -set(DEFAULT_ENABLE_DEBUGFISSION FALSE) -if(CMAKE_BUILD_TYPE STREQUAL Debug OR - CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo AND - LDGOLD_FOUND) - set(DEFAULT_ENABLE_DEBUGFISSION TRUE) -endif() - -include(CMakeDependentOption) -cmake_dependent_option(ENABLE_DEBUGFISSION "Enable Debug Fission support" ON - "DEFAULT_ENABLE_DEBUGFISSION" OFF) - -set(DEBUGFISSION_FOUND FALSE) -if(ENABLE_DEBUGFISSION) - include(TestCXXAcceptsFlag) - check_cxx_accepts_flag(-gsplit-dwarf CXX_ACCEPTS_GSPLIT_DWARF) - if(CXX_ACCEPTS_GSPLIT_DWARF) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -gsplit-dwarf") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -gsplit-dwarf") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gdb-index") - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gdb-index") - set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gdb-index") - set(DEBUGFISSION_FOUND TRUE) - message(STATUS "Debug Fission enabled") - else() - message(WARNING "Debug Fission is not available") - endif() -endif() diff --git a/project/cmake/modules/extra/ECMEnableSanitizers.cmake b/project/cmake/modules/extra/ECMEnableSanitizers.cmake deleted file mode 100644 index aa7092df18..0000000000 --- a/project/cmake/modules/extra/ECMEnableSanitizers.cmake +++ /dev/null @@ -1,149 +0,0 @@ -#.rst: -# ECMEnableSanitizers -# ------------------- -# -# Enable compiler sanitizer flags. -# -# The following sanitizers are supported: -# -# - Address Sanitizer -# - Memory Sanitizer -# - Thread Sanitizer -# - Leak Sanitizer -# - Undefined Behaviour Sanitizer -# -# All of them are implemented in Clang, depending on your version, and -# there is an work in progress in GCC, where some of them are currently -# implemented. -# -# This module will check your current compiler version to see if it -# supports the sanitizers that you want to enable -# -# Usage -# ===== -# -# Simply add:: -# -# include(ECMEnableSanitizers) -# -# to your ``CMakeLists.txt``. Note that this module is included in -# KDECompilerSettings, so projects using that module do not need to also -# include this one. -# -# The sanitizers are not enabled by default. Instead, you must set -# ``ECM_ENABLE_SANITIZERS`` (either in your ``CMakeLists.txt`` or on the -# command line) to a semicolon-separated list of sanitizers you wish to enable. -# The options are: -# -# - address -# - memory -# - thread -# - leak -# - undefined -# -# The sanitizers "address", "memory" and "thread" are mutually exclusive. You -# cannot enable two of them in the same build. -# -# "leak" requires the "address" sanitizer. -# -# .. note:: -# -# To reduce the overhead induced by the instrumentation of the sanitizers, it -# is advised to enable compiler optimizations (``-O1`` or higher). -# -# Example -# ======= -# -# This is an example of usage:: -# -# mkdir build -# cd build -# cmake -DECM_ENABLE_SANITIZERS='address;leak;undefined' .. -# -# .. note:: -# -# Most of the sanitizers will require Clang. To enable it, use:: -# -# -DCMAKE_CXX_COMPILER=clang++ -# -# Since 1.3.0. - -#============================================================================= -# Copyright 2014 Mathieu Tarral <mathieu.tarral@gmail.com> -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file COPYING-CMAKE-SCRIPTS for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of extra-cmake-modules, substitute the full -# License text for the above reference.) - -# MACRO check_compiler_version -#----------------------------- -macro (check_compiler_version gcc_required_version clang_required_version) - if ( - ( - CMAKE_CXX_COMPILER_ID MATCHES "GNU" - AND - CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${gcc_required_version} - ) - OR - ( - CMAKE_CXX_COMPILER_ID MATCHES "Clang" - AND - CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${clang_required_version} - ) - ) - # error ! - message(FATAL_ERROR "You ask to enable the sanitizer ${CUR_SANITIZER}, - but your compiler ${CMAKE_CXX_COMPILER_ID} version ${CMAKE_CXX_COMPILER_VERSION} - does not support it ! - You should use at least GCC ${gcc_required_version} or Clang ${clang_required_version} - (99.99 means not implemented yet)") - endif () -endmacro () - -# MACRO check_compiler_support -#------------------------------ -macro (enable_sanitizer_flags sanitize_option) - if (${sanitize_option} MATCHES "address") - check_compiler_version("4.8" "3.1") - set(XSAN_COMPILE_FLAGS "-fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls") - set(XSAN_LINKER_FLAGS "asan") - elseif (${sanitize_option} MATCHES "thread") - check_compiler_version("4.8" "3.1") - set(XSAN_COMPILE_FLAGS "-fsanitize=thread") - set(XSAN_LINKER_FLAGS "tsan") - elseif (${sanitize_option} MATCHES "memory") - check_compiler_version("99.99" "3.1") - set(XSAN_COMPILE_FLAGS "-fsanitize=memory") - elseif (${sanitize_option} MATCHES "leak") - check_compiler_version("4.9" "3.4") - set(XSAN_COMPILE_FLAGS "-fsanitize=leak") - set(XSAN_LINKER_FLAGS "lsan") - elseif (${sanitize_option} MATCHES "undefined") - check_compiler_version("4.9" "3.1") - set(XSAN_COMPILE_FLAGS "-fsanitize=undefined -fno-omit-frame-pointer -fno-optimize-sibling-calls") - else () - message(FATAL_ERROR "Compiler sanitizer option \"${sanitize_option}\" not supported.") - endif () -endmacro () - -# for each element of the ECM_ENABLE_SANITIZERS list -foreach ( CUR_SANITIZER ${ECM_ENABLE_SANITIZERS} ) - # lowercase filter - string(TOLOWER ${CUR_SANITIZER} CUR_SANITIZER) - # check option and enable appropriate flags - enable_sanitizer_flags ( ${CUR_SANITIZER} ) - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${XSAN_COMPILE_FLAGS}" ) - if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") - link_libraries(${XSAN_LINKER_FLAGS}) - endif() - if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - string(REPLACE "-Wl,--no-undefined" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}") - string(REPLACE "-Wl,--no-undefined" "" CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}") - endif () -endforeach () |