From 2165b08dd66131688a7f6889bcbd6cb53896ab1a Mon Sep 17 00:00:00 2001 From: Hillwood Yang Date: Mon, 1 May 2023 20:47:43 +0800 Subject: [PATCH] fix: Add a missing library link and a include directory Add a missing library link and a include directory Log: Need link gsettings-qt and include ffmpeg include directory. --- Fix-library-link.patch | 0 src/CMakeLists.txt | 6 ++++-- src/libdmr/CMakeLists.txt | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 Fix-library-link.patch diff --git a/Fix-library-link.patch b/Fix-library-link.patch new file mode 100644 index 000000000..e69de29bb diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f1121fb2f..cf53974a0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -33,7 +33,10 @@ pkg_check_modules(Xcb REQUIRED IMPORTED_TARGET xcb xcb-shape) pkg_check_modules(DBusextended REQUIRED IMPORTED_TARGET dbusextended-qt5) pkg_check_modules(Gst REQUIRED IMPORTED_TARGET gobject-2.0) # IMPORTED_TARGET failed to work for some of libs under flatpak env -pkg_check_modules(Other REQUIRED gsettings-qt) +pkg_check_modules(Other REQUIRED gsettings-qt) +pkg_check_modules(FFMPEG REQUIRED IMPORTED_TARGET libavcodec libavresample libavutil) + +include_directories(${FFMPEG_INCLUDE_DIRS}) qt5_add_resources(RCS ../assets/resources.qrc) qt5_add_resources(RCS ../assets/icons/theme-icons.qrc) @@ -41,7 +44,6 @@ if (${Dtk_VERSION} LESS 2.0.6.1) qt5_add_resources(RCS ../assets/theme.qrc) endif() - file(GLOB_RECURSE SRCS LIST_DIRECTORIES false common/*.cpp widgets/*.cpp libdmr/*.cpp vendor/*.cpp dlna/*.cpp dlna/*.c) list(APPEND SRCS main.cpp) diff --git a/src/libdmr/CMakeLists.txt b/src/libdmr/CMakeLists.txt index c264f7e87..f84b2ec0a 100644 --- a/src/libdmr/CMakeLists.txt +++ b/src/libdmr/CMakeLists.txt @@ -11,6 +11,7 @@ add_definitions(-D_LIBDMR_) remove_definitions(-D_MOVIE_USE_) pkg_check_modules(Gst REQUIRED IMPORTED_TARGET gstreamer-1.0 glib-2.0) +pkg_check_modules(other REQUIRED gsettings-qt) include_directories(${CMAKE_INCLUDE_CURRENT_DIR}) @@ -27,7 +28,7 @@ target_include_directories(${CMD_NAME} PUBLIC ${PROJECT_SOURCE_DIR}/../common ${PROJECT_SOURCE_DIR}/../backends/mediaplayer ${PROJECT_SOURCE_DIR}/../backends/mpv /usr/include/glib-2.0 /usr/include/gstreamer-1.0) target_link_libraries(${CMD_NAME} PkgConfig::Dtk Qt5::Widgets Qt5::Concurrent - Qt5::Network Qt5::X11Extras Qt5::Sql Qt5::Svg Qt5::Multimedia Qt5::MultimediaWidgets Qt5::DBus PkgConfig::Gst GL) + Qt5::Network Qt5::X11Extras Qt5::Sql Qt5::Svg Qt5::Multimedia Qt5::MultimediaWidgets Qt5::DBus PkgConfig::Gst GL gsettings-qt) #target_link_libraries(${CMD_NAME} PkgConfig::Dtk Qt5::Widgets Qt5::Concurrent # Qt5::Network Qt5::X11Extras Qt5::Sql Qt5::DBus PkgConfig::AV GL png jpeg)