forked from KDE/ffmpegthumbs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
60 lines (44 loc) · 2.1 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
project(ffmpegthumbs)
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
set(QT_MIN_VERSION "5.2.0")
find_package(ECM 5.14.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
include(FeatureSummary)
include(WriteBasicConfigVersionFile)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(ECMQtDeclareLoggingCategory)
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Gui)
find_package(KF5 REQUIRED COMPONENTS KIO I18n Config)
find_package(FFmpeg COMPONENTS AVCODEC AVFORMAT SWSCALE)
find_package(Taglib REQUIRED)
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${PC_AVCODEC_INCLUDEDIR}
${PC_AVFORMAT_INCLUDEDIR}
${FFMPEG_INCLUDE_DIR}
)
# Certain versions of FFMPEG need this to be defined
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D __STDC_CONSTANT_MACROS")
add_definitions(-DTRANSLATION_DOMAIN=\"ffmpegthumbs\")
set( ffmpegthumbs_PART_SRCS
ffmpegthumbnailer.cpp
ffmpegthumbnailer/filmstripfilter.cpp
ffmpegthumbnailer/moviedecoder.cpp
ffmpegthumbnailer/imagewriter.cpp
ffmpegthumbnailer/videothumbnailer.cpp
)
ecm_qt_declare_logging_category(ffmpegthumbs_PART_SRCS HEADER ffmpegthumbs_debug.h IDENTIFIER ffmpegthumbs_LOG CATEGORY_NAME org.kde.kdemultimedia.ffmpegthumbs DEFAULT_SEVERITY Critical)
kconfig_add_kcfg_files(ffmpegthumbs_PART_SRCS ffmpegthumbnailersettings5.kcfgc)
add_library(ffmpegthumbs MODULE ${ffmpegthumbs_PART_SRCS})
target_link_libraries(ffmpegthumbs Qt5::Core Qt5::Gui KF5::KIOWidgets KF5::KIOCore KF5::I18n KF5::ConfigCore KF5::ConfigGui ${AVUTIL_LIBRARIES} ${AVFILTER_LIBRARIES} ${AVFORMAT_LIBRARIES} ${AVCODEC_LIBRARIES} ${SWSCALE_LIBRARIES} Taglib::Taglib )
install(FILES ffmpegthumbnailersettings5.kcfg DESTINATION ${KCFG_INSTALL_DIR})
install(TARGETS ffmpegthumbs DESTINATION ${PLUGIN_INSTALL_DIR})
########### install files ###############
install(FILES ffmpegthumbs.desktop DESTINATION ${SERVICES_INSTALL_DIR})
install(FILES org.kde.ffmpegthumbs.metainfo.xml
DESTINATION ${KDE_INSTALL_METAINFODIR})
if(BUILD_TESTING)
add_subdirectory(tests)
endif()