Warning, /multimedia/libkcddb/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
0002 
0003 project(libkcddb VERSION "5.1.0")
0004 
0005 set(QT_MIN_VERSION 5.15.2)
0006 set(KF_MIN_VERSION 5.92.0)
0007 
0008 # ECM setup
0009 include(FeatureSummary)
0010 find_package(ECM ${KF_MIN_VERSION}  NO_MODULE)
0011 set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules")
0012 set(CMAKE_MODULE_PATH "${ECM_MODULE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
0013 
0014 include(KDEInstallDirs)
0015 include(KDECMakeSettings)
0016 include(KDECompilerSettings NO_POLICY_SCOPE)
0017 
0018 include(ECMGenerateExportHeader)
0019 include(ECMSetupVersion)
0020 include(ECMQtDeclareLoggingCategory)
0021 include(CMakePackageConfigHelpers)
0022 include(ECMGenerateHeaders)
0023 include(ECMDeprecationSettings)
0024 if (QT_MAJOR_VERSION STREQUAL "6")
0025     set(QT_REQUIRED_VERSION "6.5.0")
0026     set(KF_MIN_VERSION "5.240.0")
0027     set(KF_MAJOR_VERSION "6")
0028 else()
0029     set(KF_MAJOR_VERSION "5")
0030 endif()
0031 
0032 # reset to 0 once all deprecated API has been removed on full switch to Qt6
0033 if (QT_MAJOR_VERSION STREQUAL "6")
0034 set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 5.1.0 CACHE STRING "Control the range of deprecated API excluded from the build [default=5.1.0].")
0035 else()
0036 set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].")
0037 endif()
0038 
0039 find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED COMPONENTS Network Widgets)
0040 find_package(KF${KF_MAJOR_VERSION} ${KF_MIN_VERSION} REQUIRED COMPONENTS Config DocTools I18n KIO WidgetsAddons KCMUtils)
0041 if (QT_MAJOR_VERSION STREQUAL 6)
0042     find_package(Qt6 REQUIRED COMPONENTS Core5Compat)
0043 endif()
0044 find_package(MusicBrainz5)
0045 set_package_properties(MusicBrainz5 PROPERTIES
0046    DESCRIPTION "Music metadata lookup for KDE multimedia applications through libkcddb. You need version 5.x of libmusicbrainz"
0047    URL "https://www.musicbrainz.org"
0048    TYPE OPTIONAL
0049    PURPOSE "A library that provides access to metadata lookup on the MusicBrainz server")
0050 
0051 if(MUSICBRAINZ5_FOUND)
0052     set(HAVE_MUSICBRAINZ5 1)
0053 else()
0054     set(HAVE_MUSICBRAINZ5 0)
0055 endif()
0056 
0057 if (QT_MAJOR_VERSION STREQUAL "6")
0058     ecm_set_disabled_deprecation_versions(
0059         QT 6.5
0060         KF 5.239
0061     )
0062 else()
0063     ecm_set_disabled_deprecation_versions(
0064         QT 5.15.2
0065         KF 5.101
0066     )
0067 endif()
0068 
0069 configure_file(config-musicbrainz.h.in ${CMAKE_CURRENT_BINARY_DIR}/config-musicbrainz.h )
0070 include_directories(${CMAKE_CURRENT_BINARY_DIR})
0071 
0072 add_subdirectory(kcmcddb)
0073 add_subdirectory(libkcddb)
0074 
0075 if(BUILD_TESTING)
0076     find_package(Qt${QT_MAJOR_VERSION}Test REQUIRED)
0077     add_subdirectory(tests)
0078 endif()
0079 
0080 ki18n_install(po)
0081 kdoctools_install(po)
0082 
0083 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)