# # SPDX-FileCopyrightText: 2023 George Florea Bănuș # # SPDX-License-Identifier: BSD-3-Clause # cmake_minimum_required(VERSION 3.15) project(MpvQt VERSION 1.0.1 LANGUAGES CXX) set(REQUIRED_QT_VERSION 6.5.0) include(FeatureSummary) find_package(ECM 6.0.0 NO_MODULE) set_package_properties(ECM PROPERTIES TYPE REQUIRED URL "https://api.kde.org/ecm/" DESCRIPTION "extra cmake modules") set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) find_package(Qt6Quick ${REQUIRED_QT_VERSION}) set_package_properties(Qt6Quick PROPERTIES TYPE REQUIRED) find_package(Libmpv) set_package_properties(Libmpv PROPERTIES TYPE REQUIRED URL "https://mpv.io") feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) include(KDEInstallDirs) include(KDECMakeSettings NO_POLICY_SCOPE) include(KDECompilerSettings NO_POLICY_SCOPE) include(ECMGenerateHeaders) include(ECMGenerateExportHeader) set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/MpvQt") include(KDEClangFormat) file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h *.hpp *.c) kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES}) include(KDEGitCommitHooks) kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT) include(ECMSetupVersion) ecm_setup_version(PROJECT VARIABLE_PREFIX MPVQT VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/src/mpvqt_version.h" PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/MpvQtConfigVersion.cmake" SOVERSION 1 ) include(CMakePackageConfigHelpers) configure_package_config_file( "${CMAKE_CURRENT_SOURCE_DIR}/MpvQtConfig.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/MpvQtConfig.cmake" INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR} ) add_subdirectory(src) option(BUILD_EXAMPLES "Whether to build the examples" OFF) if (BUILD_EXAMPLES) add_subdirectory(examples/video-player) endif()