mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-24 10:52:53 +00:00
42 lines
1.1 KiB
CMake
42 lines
1.1 KiB
CMake
project(ffmpegthumbs)
|
|
|
|
find_package(KDE4 REQUIRED)
|
|
include(KDE4Defaults)
|
|
include(MacroLibrary)
|
|
|
|
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
|
|
|
|
find_package(FFmpeg COMPONENTS AVCODEC AVFORMAT SWSCALE)
|
|
|
|
include_directories(
|
|
${KDE4_INCLUDES}
|
|
${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")
|
|
|
|
set( ffmpegthumbs_PART_SRCS
|
|
ffmpegthumbnailer.cpp
|
|
ffmpegthumbnailer/filmstripfilter.cpp
|
|
ffmpegthumbnailer/moviedecoder.cpp
|
|
ffmpegthumbnailer/imagewriter.cpp
|
|
ffmpegthumbnailer/videothumbnailer.cpp
|
|
)
|
|
|
|
kde4_add_plugin(ffmpegthumbs ${ffmpegthumbs_PART_SRCS})
|
|
|
|
target_link_libraries(ffmpegthumbs ${KDE4_KIO_LIBS} ${AVUTIL_LIBRARIES} ${AVFORMAT_LIBRARIES} ${AVCODEC_LIBRARIES} ${SWSCALE_LIBRARIES} )
|
|
|
|
install(TARGETS ffmpegthumbs DESTINATION ${PLUGIN_INSTALL_DIR})
|
|
|
|
########### install files ###############
|
|
|
|
install(FILES ffmpegthumbs.desktop DESTINATION ${SERVICES_INSTALL_DIR})
|
|
|
|
if (KDE4_BUILD_TESTS)
|
|
add_subdirectory(tests)
|
|
endif (KDE4_BUILD_TESTS)
|