Warning, /maui/clip/src/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001
0002 include_directories(
0003 ${FFMPEG_INCLUDE_DIRS})
0004
0005 if(MPV_AVAILABLE)
0006 set(mpvSRCS
0007 backends/mpv/mpvobject.cpp
0008 backends/mpv/track.cpp
0009 backends/mpv/tracksmodel.cpp
0010 backends/mpv/subtitlesfoldersmodel.cpp
0011 backends/mpv/qthelper.h)
0012 endif()
0013
0014 set(clipSRCS
0015 main.cpp
0016 models/videosmodel.cpp
0017 models/tagsmodel.cpp
0018 models/playlistmodel.cpp
0019 models/youtubemodel.cpp
0020 utils/clip.cpp
0021 controllers/lockmanager.cpp
0022 controllers/youtube.cpp)
0023
0024 set(thumbnailerSRCS
0025 utils/thumbnailer.cpp
0026 utils/ffmpegthumbs/filmstripfilter.cpp
0027 utils/ffmpegthumbs/moviedecoder.cpp
0028 utils/ffmpegthumbs/imagewriter.cpp
0029 utils/ffmpegthumbs/videothumbnailer.cpp)
0030
0031 if(QUICK_COMPILER)
0032 qtquick_compiler_add_resources(clip_QML_QRC qml.qrc)
0033 else()
0034 qt5_add_resources(clip_QML_QRC qml.qrc)
0035 endif()
0036
0037 if(ANDROID)
0038 list(APPEND clipSRCS
0039 controllers/android/androidlockbackend.cpp)
0040
0041 add_library(${PROJECT_NAME} SHARED
0042 ${clipSRCS}
0043 ${thumbnailerSRCS}
0044 ${clip_QML_QRC})
0045 else()
0046 list(APPEND clipSRCS
0047 controllers/linux/solidlockbackend.cpp)
0048 qt_add_dbus_interface(clipSRCS controllers/linux/org.freedesktop.ScreenSaver.xml screensaverdbusinterface)
0049
0050 add_executable(${PROJECT_NAME}
0051 ${clipSRCS}
0052 ${thumbnailerSRCS}
0053 ${clip_QML_QRC}
0054 ${mpvSRCS})
0055 endif()
0056
0057 if (ANDROID)
0058 target_link_libraries(${PROJECT_NAME} Qt5::AndroidExtras Qt5::QuickControls2)
0059 else()
0060 target_link_libraries(${PROJECT_NAME} Qt::DBus)
0061 target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
0062 endif()
0063
0064 target_compile_definitions(${PROJECT_NAME}
0065 PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
0066
0067 target_compile_options(${PROJECT_NAME} PRIVATE -fexceptions)
0068
0069 if(MPV_AVAILABLE)
0070 target_link_libraries(${PROJECT_NAME} mpv)
0071 add_definitions(-DMPV_AVAILABLE)
0072 target_compile_definitions(${PROJECT_NAME} PUBLIC MPV_AVAILABLE)
0073 endif()
0074
0075 target_link_libraries(${PROJECT_NAME}
0076 MauiKit3
0077 MauiKit3::FileBrowsing
0078 Qt5::Quick
0079 Qt5::Qml
0080 Qt5::Multimedia
0081 KF5::CoreAddons
0082 KF5::I18n
0083 ${AVUTIL_LIBRARIES}
0084 ${AVFILTER_LIBRARIES}
0085 ${AVFORMAT_LIBRARIES}
0086 ${AVCODEC_LIBRARIES}
0087 ${SWSCALE_LIBRARIES}
0088 Taglib::Taglib)
0089
0090 if(UNIX AND NOT APPLE AND NOT ANDROID)
0091 install (TARGETS ${PROJECT_NAME} ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
0092 install(FILES org.kde.clip.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
0093 #TODO: port to ecm_install_icons()
0094 install(FILES assets/clip.svg DESTINATION ${KDE_INSTALL_ICONDIR}/hicolor/scalable/apps)
0095 endif()