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.90.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 
0024 set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].")
0025 
0026 find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED COMPONENTS Network Widgets)
0027 find_package(KF5 ${KF_MIN_VERSION} REQUIRED COMPONENTS Config DocTools I18n KIO WidgetsAddons)
0028 if (QT_MAJOR_VERSION STREQUAL 6)
0029     find_package(Qt6 REQUIRED COMPONENTS Core5Compat)
0030 endif()
0031 find_package(MusicBrainz5)
0032 set_package_properties(MusicBrainz5 PROPERTIES
0033    DESCRIPTION "Music metadata lookup for KDE multimedia applications through libkcddb. You need version 5.x of libmusicbrainz"
0034    URL "https://www.musicbrainz.org"
0035    TYPE OPTIONAL
0036    PURPOSE "A library that provides access to metadata lookup on the MusicBrainz server")
0037 
0038 if(MUSICBRAINZ5_FOUND)
0039     set(HAVE_MUSICBRAINZ5 1)
0040 else()
0041     set(HAVE_MUSICBRAINZ5 0)
0042 endif()
0043 
0044 add_definitions(
0045     -DQT_DISABLE_DEPRECATED_BEFORE=0x050f00
0046     -DQT_DEPRECATED_WARNINGS_SINCE=0x060000
0047     -DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055800
0048     -DKF_DEPRECATED_WARNINGS_SINCE=0x060000
0049 )
0050 
0051 configure_file(config-musicbrainz.h.in ${CMAKE_CURRENT_BINARY_DIR}/config-musicbrainz.h )
0052 include_directories(${CMAKE_CURRENT_BINARY_DIR})
0053 
0054 add_subdirectory(kcmcddb)
0055 add_subdirectory(libkcddb)
0056 
0057 if(BUILD_TESTING)
0058     find_package(Qt${QT_MAJOR_VERSION}Test REQUIRED)
0059     add_subdirectory(tests)
0060 endif()
0061 
0062 ki18n_install(po)
0063 kdoctools_install(po)
0064 
0065 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)