Changeset View
Changeset View
Standalone View
Standalone View
CMakeLists.txt
1 | project(ffmpegthumbs) | 1 | project(ffmpegthumbs) | ||
---|---|---|---|---|---|
2 | 2 | | |||
3 | cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) | 3 | cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) | ||
4 | set(QT_MIN_VERSION "5.2.0") | 4 | set(QT_MIN_VERSION "5.2.0") | ||
5 | 5 | | |||
6 | find_package(ECM 1.0.0 REQUIRED NO_MODULE) | 6 | find_package(ECM 1.0.0 REQUIRED NO_MODULE) | ||
7 | set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) | 7 | set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) | ||
8 | 8 | | |||
9 | include(FeatureSummary) | 9 | include(FeatureSummary) | ||
10 | include(WriteBasicConfigVersionFile) | 10 | include(WriteBasicConfigVersionFile) | ||
11 | include(KDEInstallDirs) | 11 | include(KDEInstallDirs) | ||
12 | include(KDECMakeSettings) | 12 | include(KDECMakeSettings) | ||
13 | include(KDECompilerSettings NO_POLICY_SCOPE) | 13 | include(KDECompilerSettings NO_POLICY_SCOPE) | ||
14 | 14 | | |||
15 | find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Gui) | 15 | find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Gui) | ||
16 | find_package(KF5 REQUIRED COMPONENTS KIO) | 16 | find_package(KF5 REQUIRED COMPONENTS KIO I18n Config) | ||
17 | find_package(FFmpeg COMPONENTS AVCODEC AVFORMAT SWSCALE) | 17 | find_package(FFmpeg COMPONENTS AVCODEC AVFORMAT SWSCALE) | ||
18 | 18 | | |||
19 | include_directories( | 19 | include_directories( | ||
20 | ${CMAKE_CURRENT_BINARY_DIR} | 20 | ${CMAKE_CURRENT_BINARY_DIR} | ||
21 | ${PC_AVCODEC_INCLUDEDIR} | 21 | ${PC_AVCODEC_INCLUDEDIR} | ||
22 | ${PC_AVFORMAT_INCLUDEDIR} | 22 | ${PC_AVFORMAT_INCLUDEDIR} | ||
23 | ${FFMPEG_INCLUDE_DIR} | 23 | ${FFMPEG_INCLUDE_DIR} | ||
24 | ) | 24 | ) | ||
25 | 25 | | |||
26 | # Certain versions of FFMPEG need this to be defined | 26 | # Certain versions of FFMPEG need this to be defined | ||
27 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D __STDC_CONSTANT_MACROS") | 27 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D __STDC_CONSTANT_MACROS") | ||
28 | 28 | | |||
29 | set( ffmpegthumbs_PART_SRCS | 29 | set( ffmpegthumbs_PART_SRCS | ||
30 | ffmpegthumbnailer.cpp | 30 | ffmpegthumbnailer.cpp | ||
31 | ffmpegthumbnailer/filmstripfilter.cpp | 31 | ffmpegthumbnailer/filmstripfilter.cpp | ||
32 | ffmpegthumbnailer/moviedecoder.cpp | 32 | ffmpegthumbnailer/moviedecoder.cpp | ||
33 | ffmpegthumbnailer/imagewriter.cpp | 33 | ffmpegthumbnailer/imagewriter.cpp | ||
34 | ffmpegthumbnailer/videothumbnailer.cpp | 34 | ffmpegthumbnailer/videothumbnailer.cpp | ||
35 | ) | 35 | ) | ||
36 | 36 | | |||
37 | kconfig_add_kcfg_files(ffmpegthumbs_PART_SRCS ffmpegthumbnailersettings5.kcfgc) | ||||
37 | add_library(ffmpegthumbs MODULE ${ffmpegthumbs_PART_SRCS}) | 38 | add_library(ffmpegthumbs MODULE ${ffmpegthumbs_PART_SRCS}) | ||
38 | 39 | | |||
39 | target_link_libraries(ffmpegthumbs Qt5::Gui KF5::KIOWidgets ${AVUTIL_LIBRARIES} ${AVFILTER_LIBRARIES} ${AVFORMAT_LIBRARIES} ${AVCODEC_LIBRARIES} ${SWSCALE_LIBRARIES} ) | 40 | 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} ) | ||
40 | 41 | | |||
42 | install(FILES ffmpegthumbnailersettings5.kcfg DESTINATION ${KCFG_INSTALL_DIR}) | ||||
41 | install(TARGETS ffmpegthumbs DESTINATION ${PLUGIN_INSTALL_DIR}) | 43 | install(TARGETS ffmpegthumbs DESTINATION ${PLUGIN_INSTALL_DIR}) | ||
42 | 44 | | |||
43 | ########### install files ############### | 45 | ########### install files ############### | ||
44 | 46 | | |||
45 | install(FILES ffmpegthumbs.desktop DESTINATION ${SERVICES_INSTALL_DIR}) | 47 | install(FILES ffmpegthumbs.desktop DESTINATION ${SERVICES_INSTALL_DIR}) | ||
46 | 48 | | |||
47 | if(BUILD_TESTING) | 49 | if(BUILD_TESTING) | ||
48 | add_subdirectory(tests) | 50 | add_subdirectory(tests) | ||
49 | endif() | 51 | endif() |