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

0001 cmake_minimum_required(VERSION 3.16)
0002 
0003 # Release Service version, managed by release script
0004 set(RELEASE_SERVICE_VERSION_MAJOR "22")
0005 set(RELEASE_SERVICE_VERSION_MINOR "11")
0006 set(RELEASE_SERVICE_VERSION_MICRO "70")
0007 
0008 set(RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
0009 
0010 project(ffmpegthumbs VERSION ${RELEASE_SERVICE_VERSION})
0011 
0012 set(QT_MIN_VERSION "5.15.0")
0013 set(KF_MIN_VERSION "5.83.0")
0014 
0015 find_package(ECM ${KF_MIN_VERSION} REQUIRED NO_MODULE)
0016 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}  ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
0017 
0018 include(KDEInstallDirs)
0019 include(KDECMakeSettings)
0020 include(KDECompilerSettings NO_POLICY_SCOPE)
0021 
0022 include(ECMQtDeclareLoggingCategory)
0023 include(FeatureSummary)
0024 
0025 find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Gui)
0026 find_package(KF5 ${KF_MIN_VERSION} REQUIRED COMPONENTS KIO I18n Config)
0027 find_package(FFmpeg COMPONENTS AVCODEC AVFORMAT SWSCALE)
0028 find_package(Taglib REQUIRED)
0029 
0030 include_directories(
0031     ${FFMPEG_INCLUDE_DIRS}
0032     )
0033 
0034 # Certain versions of FFMPEG need this to be defined
0035 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D __STDC_CONSTANT_MACROS")
0036 
0037 add_definitions(-DTRANSLATION_DOMAIN=\"ffmpegthumbs\")
0038 
0039 add_library(ffmpegthumbs MODULE)
0040 
0041 target_sources(ffmpegthumbs PRIVATE
0042   ffmpegthumbnailer.cpp
0043   ffmpegthumbnailer/filmstripfilter.cpp
0044   ffmpegthumbnailer/moviedecoder.cpp
0045   ffmpegthumbnailer/imagewriter.cpp
0046   ffmpegthumbnailer/videothumbnailer.cpp
0047 )
0048 
0049 ecm_qt_declare_logging_category(ffmpegthumbs
0050   HEADER ffmpegthumbs_debug.h
0051   IDENTIFIER ffmpegthumbs_LOG
0052   CATEGORY_NAME org.kde.kdemultimedia.ffmpegthumbs
0053   DEFAULT_SEVERITY Critical
0054   EXPORT ffmpegthumbs
0055   DESCRIPTION "FFmpeg video thumbnailer"
0056 )
0057 
0058 kconfig_add_kcfg_files(ffmpegthumbs ffmpegthumbnailersettings5.kcfgc)
0059 
0060 target_link_libraries(ffmpegthumbs Qt::Core Qt::Gui KF5::KIOWidgets KF5::KIOCore KF5::I18n KF5::ConfigCore KF5::ConfigGui ${AVUTIL_LIBRARIES} ${AVFILTER_LIBRARIES} ${AVFORMAT_LIBRARIES} ${AVCODEC_LIBRARIES} ${SWSCALE_LIBRARIES} Taglib::Taglib )
0061 
0062 install(FILES ffmpegthumbnailersettings5.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
0063 install(TARGETS ffmpegthumbs DESTINATION ${KDE_INSTALL_PLUGINDIR})
0064 
0065 ecm_qt_install_logging_categories(
0066   EXPORT ffmpegthumbs
0067   DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}
0068 )
0069 
0070 ########### install files ###############
0071 
0072 install(FILES  ffmpegthumbs.desktop DESTINATION ${KDE_INSTALL_KSERVICESDIR})
0073 
0074 install(FILES org.kde.ffmpegthumbs.metainfo.xml
0075         DESTINATION ${KDE_INSTALL_METAINFODIR})
0076 
0077 if(BUILD_TESTING)
0078     add_subdirectory(tests)
0079 endif()
0080 
0081 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)