Warning, /libraries/phonon-vlc/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
0002 project(PhononVLC VERSION 0.12.0)
0003 
0004 set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
0005 
0006 option(PHONON_BUILD_QT5 "Build for Qt5" ON)
0007 option(PHONON_BUILD_QT6 "Build for Qt6" ON)
0008 
0009 # CI is stupid and doesn't allow us to set CMAKE options per build variant
0010 if($ENV{CI_JOB_NAME_SLUG} MATCHES "qt5")
0011     set(PHONON_BUILD_QT5 ON)
0012     set(PHONON_BUILD_QT6 OFF)
0013 elseif($ENV{CI_JOB_NAME_SLUG} MATCHES "qt6")
0014     set(PHONON_BUILD_QT5 OFF)
0015     set(PHONON_BUILD_QT6 ON)
0016 endif()
0017 
0018 set(VERSIONS)
0019 if(PHONON_BUILD_QT5)
0020     list(APPEND VERSIONS "5")
0021 endif()
0022 if(PHONON_BUILD_QT6)
0023     list(APPEND VERSIONS "6")
0024     set(BUILD_WITH_QT6 ON) # necessary on older ECMs
0025 endif()
0026 
0027 set(QT_NO_CREATE_VERSIONLESS_TARGETS ON)
0028 set(QT_NO_CREATE_VERSIONLESS_FUNCTIONS ON)
0029 
0030 include(FeatureSummary)
0031 
0032 # ECM
0033 find_package(ECM 5.90 NO_MODULE)
0034 set(KDE_COMPILERSETTINGS_LEVEL "5.82")
0035 set_package_properties(ECM PROPERTIES
0036     TYPE REQUIRED
0037     DESCRIPTION "Extra CMake Modules"
0038     URL "https://api.kde.org/frameworks/extra-cmake-modules/html/index.html")
0039 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
0040 
0041 # PVLC only uses static mimetype lists, they are created by cmake, hooray.
0042 include(MimeTypes.cmake)
0043 
0044 # LibVLC
0045 find_package(LIBVLC 3.0.0)
0046 set_package_properties(LIBVLC PROPERTIES
0047     TYPE REQUIRED
0048     DESCRIPTION "VLC C library"
0049     URL "http://git.videolan.org")
0050 
0051 foreach(version ${VERSIONS})
0052     set(QT_MAJOR_VERSION ${version})
0053 
0054     include(KDEInstallDirs${QT_MAJOR_VERSION})
0055     include(ECMPoQmTools)
0056     include(KDECMakeSettings)
0057     include(KDECompilerSettings)
0058     include(ECMSetupVersion)
0059 
0060     # Phonon
0061     find_package(Phonon4Qt${QT_MAJOR_VERSION} 4.12.0 NO_MODULE)
0062     set_package_properties(Phonon4Qt${QT_MAJOR_VERSION} PROPERTIES
0063         TYPE REQUIRED
0064         DESCRIPTION "Phonon core library"
0065         URL "https://api.kde.org/phonon/html/index.html")
0066 
0067     find_package(Phonon4Qt${QT_MAJOR_VERSION}Experimental 4.12.0 NO_MODULE)
0068     set_package_properties(Phonon4Qt${QT_MAJOR_VERSION}Experimental PROPERTIES
0069         TYPE OPTIONAL
0070         DESCRIPTION "Phonon experimental library"
0071         URL "https://api.kde.org/phonon/html/index.html")
0072     if(Phonon4Qt${QT_MAJOR_VERSION}Experimental_FOUND)
0073         set(PHONON_EXPERIMENTAL TRUE)
0074     endif()
0075 
0076     ecm_setup_version(PROJECT VARIABLE_PREFIX PHONON_VLC)
0077     add_subdirectory(src src${version})
0078 
0079     unset(QUERY_EXECUTABLE CACHE)
0080 endforeach()
0081 
0082 ecm_install_po_files_as_qm(poqm)
0083 
0084 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)