From af2307e9ef859822a5ed1f3a02b2d0bdc5dfb2d6 Mon Sep 17 00:00:00 2001 From: Zhang Sheng Date: Tue, 7 Jan 2025 15:31:18 +0800 Subject: [PATCH] refactor: unify plugin library names - Updated plugin library names to follow consistent naming pattern: * Changed libdfmplugin-core.so to libdfm-core-plugin.so * Updated all plugin library names to use dfm-*-plugin format - Separated PROJECT_NAME and BIN_NAME in CMake files: * PROJECT_NAME remains as dfmplugin-* * BIN_NAME set to dfm-*-plugin for output libraries - Updated references in main applications to use new library names - Maintained same installation paths and dependencies Log: This change improves consistency in plugin naming across the project. --- src/apps/dde-file-dialog-wayland/main.cpp | 2 +- src/apps/dde-file-dialog-x11/main.cpp | 2 +- src/apps/dde-file-dialog/main.cpp | 2 +- .../filepreview/main.cpp | 2 +- src/apps/dde-file-manager/main.cpp | 2 +- .../core/views/filedialogstatusbar.cpp | 3 ++- .../dfmplugin-avfsbrowser/CMakeLists.txt | 9 +++++---- .../dfmplugin-computer/CMakeLists.txt | 11 ++++++----- .../filemanager/dfmplugin-core/CMakeLists.txt | 9 +++++---- .../dfmplugin-detailspace/CMakeLists.txt | 9 +++++---- .../dfmplugin-disk-encrypt-entry/CMakeLists.txt | 17 +++++++++-------- .../dfmplugin-encrypt-manager/CMakeLists.txt | 9 +++++---- .../dfmplugin-myshares/CMakeLists.txt | 11 ++++++----- .../dfmplugin-optical/CMakeLists.txt | 9 +++++---- .../filemanager/dfmplugin-recent/CMakeLists.txt | 9 +++++---- .../filemanager/dfmplugin-search/CMakeLists.txt | 11 ++++++----- .../dfmplugin-sidebar/CMakeLists.txt | 9 +++++---- .../dfmplugin-smbbrowser/CMakeLists.txt | 9 +++++---- .../dfmplugin-titlebar/CMakeLists.txt | 9 +++++---- .../filemanager/dfmplugin-trash/CMakeLists.txt | 9 +++++---- .../filemanager/dfmplugin-vault/CMakeLists.txt | 9 +++++---- .../dfmplugin-workspace/CMakeLists.txt | 11 ++++++----- 22 files changed, 95 insertions(+), 78 deletions(-) diff --git a/src/apps/dde-file-dialog-wayland/main.cpp b/src/apps/dde-file-dialog-wayland/main.cpp index 6ba027970f..92f675655a 100644 --- a/src/apps/dde-file-dialog-wayland/main.cpp +++ b/src/apps/dde-file-dialog-wayland/main.cpp @@ -37,7 +37,7 @@ static constexpr char kCommonPluginInterface[] { "org.deepin.plugin.common" }; static constexpr char kDialogCorePluginName[] { "filedialog-core-plugin" }; static constexpr char kDialogCoreLibName[] { "libfiledialog-core-plugin.so" }; static constexpr char kDFMCorePluginName[] { "dfmplugin-core" }; -static constexpr char kDFMCoreLibName[] { "libdfmplugin-core.so" }; +static constexpr char kDFMCoreLibName[] { "libdfm-core-plugin.so" }; static void initLog() { diff --git a/src/apps/dde-file-dialog-x11/main.cpp b/src/apps/dde-file-dialog-x11/main.cpp index 931846df7e..278b2558ae 100644 --- a/src/apps/dde-file-dialog-x11/main.cpp +++ b/src/apps/dde-file-dialog-x11/main.cpp @@ -37,7 +37,7 @@ static constexpr char kCommonPluginInterface[] { "org.deepin.plugin.common" }; static constexpr char kDialogCorePluginName[] { "filedialog-core-plugin" }; static constexpr char kDialogCoreLibName[] { "libfiledialog-core-plugin.so" }; static constexpr char kDFMCorePluginName[] { "dfmplugin-core" }; -static constexpr char kDFMCoreLibName[] { "libdfmplugin-core.so" }; +static constexpr char kDFMCoreLibName[] { "libdfm-core-plugin.so" }; static void initLog() { diff --git a/src/apps/dde-file-dialog/main.cpp b/src/apps/dde-file-dialog/main.cpp index 1da28b584d..af53f8641a 100644 --- a/src/apps/dde-file-dialog/main.cpp +++ b/src/apps/dde-file-dialog/main.cpp @@ -37,7 +37,7 @@ static constexpr char kCommonPluginInterface[] { "org.deepin.plugin.common" }; static constexpr char kDialogCorePluginName[] { "filedialog-core-plugin" }; static constexpr char kDialogCoreLibName[] { "libfiledialog-core-plugin.so" }; static constexpr char kDFMCorePluginName[] { "dfmplugin-core" }; -static constexpr char kDFMCoreLibName[] { "libdfmplugin-core.so" }; +static constexpr char kDFMCoreLibName[] { "libdfm-core-plugin.so" }; static void initLog() { diff --git a/src/apps/dde-file-manager-preview/filepreview/main.cpp b/src/apps/dde-file-manager-preview/filepreview/main.cpp index a8c4a6fd6e..c15d0c978f 100644 --- a/src/apps/dde-file-manager-preview/filepreview/main.cpp +++ b/src/apps/dde-file-manager-preview/filepreview/main.cpp @@ -3,7 +3,7 @@ // SPDX-License-Identifier: GPL-3.0-or-later #include "previewsingleapplication.h" - +#include #ifdef DFM_ORGANIZATION_NAME # define ORGANIZATION_NAME DFM_ORGANIZATION_NAME #else diff --git a/src/apps/dde-file-manager/main.cpp b/src/apps/dde-file-manager/main.cpp index f509acbd86..eb167337ae 100644 --- a/src/apps/dde-file-manager/main.cpp +++ b/src/apps/dde-file-manager/main.cpp @@ -48,7 +48,7 @@ using namespace GlobalDConfDefines::BaseConfig; static constexpr char kFmPluginInterface[] { "org.deepin.plugin.filemanager" }; static constexpr char kCommonPluginInterface[] { "org.deepin.plugin.common" }; static constexpr char kPluginCore[] { "dfmplugin-core" }; -static constexpr char kLibCore[] { "libdfmplugin-core.so" }; +static constexpr char kLibCore[] { "libdfm-core-plugin.so" }; static constexpr int kMemoryThreshold { 80 * 1024 }; // 80MB static constexpr int kTimerInterval { 60 * 1000 }; // 1 min diff --git a/src/plugins/filedialog/core/views/filedialogstatusbar.cpp b/src/plugins/filedialog/core/views/filedialogstatusbar.cpp index 94d9784980..8210948104 100644 --- a/src/plugins/filedialog/core/views/filedialogstatusbar.cpp +++ b/src/plugins/filedialog/core/views/filedialogstatusbar.cpp @@ -308,7 +308,7 @@ void FileDialogStatusBar::updateLayout() if (curMode == kUnknow) return; - if (!mainWindow) + if (!mainWindow || !mainWindow->centralWidget()) return; setVisible(true); @@ -358,6 +358,7 @@ void FileDialogStatusBar::updateLayout() contentLayout->addWidget(curRejectButton); contentLayout->addWidget(curAcceptButton); + mainWindow->centralWidget()->layout()->addWidget(this); return; } diff --git a/src/plugins/filemanager/dfmplugin-avfsbrowser/CMakeLists.txt b/src/plugins/filemanager/dfmplugin-avfsbrowser/CMakeLists.txt index 2f7b32c510..bb6a574a51 100644 --- a/src/plugins/filemanager/dfmplugin-avfsbrowser/CMakeLists.txt +++ b/src/plugins/filemanager/dfmplugin-avfsbrowser/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 3.10) project(dfmplugin-avfsbrowser) +set(BIN_NAME dfm-avfsbrowser-plugin) set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -11,22 +12,22 @@ FILE(GLOB_RECURSE WORKSPACE_FILES CONFIGURE_DEPENDS ) find_package(Qt6 COMPONENTS Core) -add_library(${PROJECT_NAME} +add_library(${BIN_NAME} SHARED ${WORKSPACE_FILES} ) -set_target_properties(${PROJECT_NAME} PROPERTIES +set_target_properties(${BIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${DFM_BUILD_PLUGIN_FILEMANAGER_DIR}) -target_link_libraries(${PROJECT_NAME} +target_link_libraries(${BIN_NAME} DFM6::base DFM6::framework ) #install library file install(TARGETS - ${PROJECT_NAME} + ${BIN_NAME} LIBRARY DESTINATION ${DFM_PLUGIN_FILEMANAGER_CORE_DIR} diff --git a/src/plugins/filemanager/dfmplugin-computer/CMakeLists.txt b/src/plugins/filemanager/dfmplugin-computer/CMakeLists.txt index 0f1932184c..5b92626736 100644 --- a/src/plugins/filemanager/dfmplugin-computer/CMakeLists.txt +++ b/src/plugins/filemanager/dfmplugin-computer/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 3.10) project(dfmplugin-computer) +set(BIN_NAME dfm-computer-plugin) set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -14,20 +15,20 @@ find_package(PkgConfig REQUIRED) pkg_check_modules(Secret REQUIRED libsecret-1) find_package(Qt6 COMPONENTS Core) -add_library(${PROJECT_NAME} +add_library(${BIN_NAME} SHARED ${COMPUTER_FILES} ) -set_target_properties(${PROJECT_NAME} PROPERTIES +set_target_properties(${BIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${DFM_BUILD_PLUGIN_FILEMANAGER_DIR}) -target_include_directories(${PROJECT_NAME} +target_include_directories(${BIN_NAME} PUBLIC ${Secret_INCLUDE_DIRS} ) -target_link_libraries(${PROJECT_NAME} +target_link_libraries(${BIN_NAME} DFM6::base DFM6::framework ${Secret_LIBRARIES} @@ -35,7 +36,7 @@ target_link_libraries(${PROJECT_NAME} #install library file install(TARGETS - ${PROJECT_NAME} + ${BIN_NAME} LIBRARY DESTINATION ${DFM_PLUGIN_FILEMANAGER_CORE_DIR} diff --git a/src/plugins/filemanager/dfmplugin-core/CMakeLists.txt b/src/plugins/filemanager/dfmplugin-core/CMakeLists.txt index be72748a3a..4075ae66bd 100644 --- a/src/plugins/filemanager/dfmplugin-core/CMakeLists.txt +++ b/src/plugins/filemanager/dfmplugin-core/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 3.10) project(dfmplugin-core) +set(BIN_NAME dfm-core-plugin) set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -11,22 +12,22 @@ FILE(GLOB_RECURSE CORE_FILES CONFIGURE_DEPENDS ) find_package(Qt6 COMPONENTS Core) -add_library(${PROJECT_NAME} +add_library(${BIN_NAME} SHARED ${CORE_FILES} ) -set_target_properties(${PROJECT_NAME} PROPERTIES +set_target_properties(${BIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${DFM_BUILD_PLUGIN_FILEMANAGER_DIR}) -target_link_libraries(${PROJECT_NAME} +target_link_libraries(${BIN_NAME} DFM6::base DFM6::framework ) #install library file install(TARGETS - ${PROJECT_NAME} + ${BIN_NAME} LIBRARY DESTINATION ${DFM_PLUGIN_FILEMANAGER_CORE_DIR} diff --git a/src/plugins/filemanager/dfmplugin-detailspace/CMakeLists.txt b/src/plugins/filemanager/dfmplugin-detailspace/CMakeLists.txt index 7e4e25cf62..0c8963644b 100644 --- a/src/plugins/filemanager/dfmplugin-detailspace/CMakeLists.txt +++ b/src/plugins/filemanager/dfmplugin-detailspace/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 3.10) project(dfmplugin-detailspace) +set(BIN_NAME dfm-detailspace-plugin) set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -11,22 +12,22 @@ FILE(GLOB_RECURSE DETAILSPCE_FILES CONFIGURE_DEPENDS ) find_package(Qt6 COMPONENTS Core) -add_library(${PROJECT_NAME} +add_library(${BIN_NAME} SHARED ${DETAILSPCE_FILES} ) -set_target_properties(${PROJECT_NAME} PROPERTIES +set_target_properties(${BIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${DFM_BUILD_PLUGIN_FILEMANAGER_DIR}) -target_link_libraries(${PROJECT_NAME} +target_link_libraries(${BIN_NAME} DFM6::base DFM6::framework ) #install library file install(TARGETS - ${PROJECT_NAME} + ${BIN_NAME} LIBRARY DESTINATION ${DFM_PLUGIN_FILEMANAGER_CORE_DIR} diff --git a/src/plugins/filemanager/dfmplugin-disk-encrypt-entry/CMakeLists.txt b/src/plugins/filemanager/dfmplugin-disk-encrypt-entry/CMakeLists.txt index a0edaafbd7..518d2f72dd 100644 --- a/src/plugins/filemanager/dfmplugin-disk-encrypt-entry/CMakeLists.txt +++ b/src/plugins/filemanager/dfmplugin-disk-encrypt-entry/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 3.0) project(dfmplugin-disk-encrypt LANGUAGES CXX) +set(BIN_NAME dfm-disk-encrypt-plugin) set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -14,15 +15,15 @@ file(GLOB_RECURSE SRC "${CMAKE_SOURCE_DIR}/src/services/diskencrypt/globaltypesdefine.h" ) -add_library(${PROJECT_NAME} SHARED ${SRC}) +add_library(${BIN_NAME} SHARED ${SRC}) -target_link_libraries(${PROJECT_NAME} PRIVATE +target_link_libraries(${BIN_NAME} PRIVATE DFM6::base DFM6::framework ) -target_compile_definitions(${PROJECT_NAME} PRIVATE DFMPLUGIN_DISK_ENCRYPT_LIBRARY) -set_target_properties(${PROJECT_NAME} PROPERTIES +target_compile_definitions(${BIN_NAME} PRIVATE DFMPLUGIN_DISK_ENCRYPT_LIBRARY) +set_target_properties(${BIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${DFM_BUILD_PLUGIN_FILEMANAGER_DIR}) # 设置翻译文件目录 @@ -34,16 +35,16 @@ set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION "${CMAKE_CURR qt6_add_translation(QM_FILES ${TS_FILES}) # 添加自定义目标以确保翻译文件被构建 -add_custom_target(${PROJECT_NAME}_translations ALL DEPENDS ${QM_FILES}) -add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_translations) +add_custom_target(${BIN_NAME}_translations ALL DEPENDS ${QM_FILES}) +add_dependencies(${BIN_NAME} ${BIN_NAME}_translations) # 安装 -install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${DFM_PLUGIN_FILEMANAGER_CORE_DIR}) +install(TARGETS ${BIN_NAME} LIBRARY DESTINATION ${DFM_PLUGIN_FILEMANAGER_CORE_DIR}) # 安装翻译文件 install(FILES ${QM_FILES} DESTINATION share/dde-file-manager/translations) INSTALL_DCONFIG("org.deepin.dde.file-manager.diskencrypt.json") -message(">>>> install ${PROJECT_NAME} into ${DFM_PLUGIN_FILEMANAGER_CORE_DIR}") +message(">>>> install ${BIN_NAME} into ${DFM_PLUGIN_FILEMANAGER_CORE_DIR}") diff --git a/src/plugins/filemanager/dfmplugin-encrypt-manager/CMakeLists.txt b/src/plugins/filemanager/dfmplugin-encrypt-manager/CMakeLists.txt index 4808043aee..3cdc3e68b1 100644 --- a/src/plugins/filemanager/dfmplugin-encrypt-manager/CMakeLists.txt +++ b/src/plugins/filemanager/dfmplugin-encrypt-manager/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 3.0) project(dfmplugin-encrypt-manager) +set(BIN_NAME dfm-encrypt-plugin) set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -11,15 +12,15 @@ file(GLOB_RECURSE SRC ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/*.json) -add_library(${PROJECT_NAME} SHARED +add_library(${BIN_NAME} SHARED ${SRC}) -set_target_properties(${PROJECT_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${DFM_BUILD_PLUGIN_FILEMANAGER_DIR}) +set_target_properties(${BIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${DFM_BUILD_PLUGIN_FILEMANAGER_DIR}) -target_link_libraries(${PROJECT_NAME} PUBLIC +target_link_libraries(${BIN_NAME} PUBLIC Qt6::Core DFM6::base DFM6::framework ) -install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${DFM_PLUGIN_FILEMANAGER_CORE_DIR}) +install(TARGETS ${BIN_NAME} LIBRARY DESTINATION ${DFM_PLUGIN_FILEMANAGER_CORE_DIR}) diff --git a/src/plugins/filemanager/dfmplugin-myshares/CMakeLists.txt b/src/plugins/filemanager/dfmplugin-myshares/CMakeLists.txt index abee35e75f..d03923054b 100644 --- a/src/plugins/filemanager/dfmplugin-myshares/CMakeLists.txt +++ b/src/plugins/filemanager/dfmplugin-myshares/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 3.10) project(dfmplugin-myshares) +set(BIN_NAME dfm-myshares-plugin) set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -11,24 +12,24 @@ FILE(GLOB_RECURSE SHARES_FILES CONFIGURE_DEPENDS ) find_package(Qt6 COMPONENTS Core) -add_library(${PROJECT_NAME} +add_library(${BIN_NAME} SHARED ${SHARES_FILES} ) -add_library(DFMPlugin::myshares ALIAS ${PROJECT_NAME}) +add_library(DFMPlugin::myshares ALIAS ${BIN_NAME}) -set_target_properties(${PROJECT_NAME} PROPERTIES +set_target_properties(${BIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${DFM_BUILD_PLUGIN_FILEMANAGER_DIR}) -target_link_libraries(${PROJECT_NAME} +target_link_libraries(${BIN_NAME} DFM6::base DFM6::framework ) #install library file install(TARGETS - ${PROJECT_NAME} + ${BIN_NAME} LIBRARY DESTINATION ${DFM_PLUGIN_FILEMANAGER_CORE_DIR} diff --git a/src/plugins/filemanager/dfmplugin-optical/CMakeLists.txt b/src/plugins/filemanager/dfmplugin-optical/CMakeLists.txt index 172410f1fd..b71d5c703d 100644 --- a/src/plugins/filemanager/dfmplugin-optical/CMakeLists.txt +++ b/src/plugins/filemanager/dfmplugin-optical/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 3.10) project(dfmplugin-optical) +set(BIN_NAME dfm-optical-plugin) set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -13,15 +14,15 @@ FILE(GLOB_RECURSE OPTICAL_FILES CONFIGURE_DEPENDS find_package(Qt6 COMPONENTS DBus Widgets Concurrent SvgWidgets REQUIRED) set(SVGLIB Qt6::Svg) -add_library(${PROJECT_NAME} +add_library(${BIN_NAME} SHARED ${OPTICAL_FILES} ) -set_target_properties(${PROJECT_NAME} PROPERTIES +set_target_properties(${BIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${DFM_BUILD_PLUGIN_FILEMANAGER_DIR}) -target_link_libraries(${PROJECT_NAME} PRIVATE +target_link_libraries(${BIN_NAME} PRIVATE Qt6::Core Qt6::Widgets Qt6::DBus @@ -33,7 +34,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE #install library file install(TARGETS - ${PROJECT_NAME} + ${BIN_NAME} LIBRARY DESTINATION ${DFM_PLUGIN_FILEMANAGER_CORE_DIR} diff --git a/src/plugins/filemanager/dfmplugin-recent/CMakeLists.txt b/src/plugins/filemanager/dfmplugin-recent/CMakeLists.txt index 4f2340e094..7d1dfe03eb 100644 --- a/src/plugins/filemanager/dfmplugin-recent/CMakeLists.txt +++ b/src/plugins/filemanager/dfmplugin-recent/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 3.10) project(dfmplugin-recent) +set(BIN_NAME dfm-recent-plugin) set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -18,15 +19,15 @@ qt6_add_dbus_interface(RECENT_FILES ${DFM_DBUS_XML_DIR}/org.deepin.Filemanager.Daemon.RecentManager.xml recentmanager_interface) -add_library(${PROJECT_NAME} +add_library(${BIN_NAME} SHARED ${RECENT_FILES} ) -set_target_properties(${PROJECT_NAME} PROPERTIES +set_target_properties(${BIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${DFM_BUILD_PLUGIN_FILEMANAGER_DIR}) -target_link_libraries(${PROJECT_NAME} +target_link_libraries(${BIN_NAME} DFM6::base DFM6::framework Qt6::Xml @@ -35,7 +36,7 @@ target_link_libraries(${PROJECT_NAME} #install library file install(TARGETS - ${PROJECT_NAME} + ${BIN_NAME} LIBRARY DESTINATION ${DFM_PLUGIN_FILEMANAGER_CORE_DIR} diff --git a/src/plugins/filemanager/dfmplugin-search/CMakeLists.txt b/src/plugins/filemanager/dfmplugin-search/CMakeLists.txt index 748ab5387f..6229e68da0 100644 --- a/src/plugins/filemanager/dfmplugin-search/CMakeLists.txt +++ b/src/plugins/filemanager/dfmplugin-search/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 3.10) project(dfmplugin-search) +set(BIN_NAME dfm-search-plugin) set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -32,23 +33,23 @@ pkg_check_modules(PCRE REQUIRED libpcre) set(DBUS_INTERFACE_FILE "${CMAKE_SOURCE_DIR}/assets/dbus/org.deepin.Filemanager.TextIndex.xml") qt_add_dbus_interface(INTERFACE_SOURCES ${DBUS_INTERFACE_FILE} textindex_interface) -add_library(${PROJECT_NAME} +add_library(${BIN_NAME} SHARED ${SRC_FILES} ${INTERFACE_SOURCES} ) -set_target_properties(${PROJECT_NAME} PROPERTIES +set_target_properties(${BIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${DFM_BUILD_PLUGIN_FILEMANAGER_DIR}) -target_include_directories(${PROJECT_NAME} +target_include_directories(${BIN_NAME} PUBLIC ${CMAKE_SOURCE_DIR}/3rdparty ${GLIB_INCLUDE_DIRS} ${PCRE_INCLUDE_DIRS} ) -target_link_libraries(${PROJECT_NAME} +target_link_libraries(${BIN_NAME} DFM6::base DFM6::framework ${GLIB_LIBRARIES} @@ -59,7 +60,7 @@ target_link_libraries(${PROJECT_NAME} #install library file install(TARGETS - ${PROJECT_NAME} + ${BIN_NAME} LIBRARY DESTINATION ${DFM_PLUGIN_FILEMANAGER_CORE_DIR} diff --git a/src/plugins/filemanager/dfmplugin-sidebar/CMakeLists.txt b/src/plugins/filemanager/dfmplugin-sidebar/CMakeLists.txt index 57cac84ace..bad8da9200 100644 --- a/src/plugins/filemanager/dfmplugin-sidebar/CMakeLists.txt +++ b/src/plugins/filemanager/dfmplugin-sidebar/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 3.10) project(dfmplugin-sidebar) +set(BIN_NAME dfm-sidebar-plugin) add_definitions(-DSIDEBAR_TREEVIEW) set(SIDEBAR_TREEVIEW ON) @@ -46,22 +47,22 @@ FILE(GLOB SIDEBAR_FILES endif() find_package(Qt6 COMPONENTS Core) -add_library(${PROJECT_NAME} +add_library(${BIN_NAME} SHARED ${SIDEBAR_FILES} ) -set_target_properties(${PROJECT_NAME} PROPERTIES +set_target_properties(${BIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${DFM_BUILD_PLUGIN_FILEMANAGER_DIR}) -target_link_libraries(${PROJECT_NAME} +target_link_libraries(${BIN_NAME} DFM6::base DFM6::framework ) #install library file install(TARGETS - ${PROJECT_NAME} + ${BIN_NAME} LIBRARY DESTINATION ${DFM_PLUGIN_FILEMANAGER_CORE_DIR} diff --git a/src/plugins/filemanager/dfmplugin-smbbrowser/CMakeLists.txt b/src/plugins/filemanager/dfmplugin-smbbrowser/CMakeLists.txt index e22b417e69..ed97bc254d 100644 --- a/src/plugins/filemanager/dfmplugin-smbbrowser/CMakeLists.txt +++ b/src/plugins/filemanager/dfmplugin-smbbrowser/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 3.10) project(dfmplugin-smbbrowser) +set(BIN_NAME dfm-smbbrowser-plugin) set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -15,16 +16,16 @@ find_package(PkgConfig REQUIRED) pkg_check_modules(LibSecret REQUIRED libsecret-1 IMPORTED_TARGET) -add_library(${PROJECT_NAME} +add_library(${BIN_NAME} SHARED ${BROWSER_FILES} ) -set_target_properties(${PROJECT_NAME} PROPERTIES +set_target_properties(${BIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${DFM_BUILD_PLUGIN_FILEMANAGER_DIR}) target_link_libraries( - ${PROJECT_NAME} + ${BIN_NAME} Qt6::Network DFM6::base DFM6::framework @@ -33,7 +34,7 @@ target_link_libraries( #install library file install(TARGETS - ${PROJECT_NAME} + ${BIN_NAME} LIBRARY DESTINATION ${DFM_PLUGIN_FILEMANAGER_CORE_DIR} diff --git a/src/plugins/filemanager/dfmplugin-titlebar/CMakeLists.txt b/src/plugins/filemanager/dfmplugin-titlebar/CMakeLists.txt index 0159fe28db..b0a4ba5f19 100644 --- a/src/plugins/filemanager/dfmplugin-titlebar/CMakeLists.txt +++ b/src/plugins/filemanager/dfmplugin-titlebar/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 3.10) project(dfmplugin-titlebar) +set(BIN_NAME dfm-titlebar-plugin) set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -10,23 +11,23 @@ FILE(GLOB_RECURSE TITLEBAR_FILES CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/*.json" ) -add_library(${PROJECT_NAME} +add_library(${BIN_NAME} SHARED ${TITLEBAR_FILES} ) -set_target_properties(${PROJECT_NAME} PROPERTIES +set_target_properties(${BIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${DFM_BUILD_PLUGIN_FILEMANAGER_DIR}) find_package(Qt6 COMPONENTS Core) -target_link_libraries(${PROJECT_NAME} +target_link_libraries(${BIN_NAME} DFM6::base DFM6::framework ) #install library file install(TARGETS - ${PROJECT_NAME} + ${BIN_NAME} LIBRARY DESTINATION ${DFM_PLUGIN_FILEMANAGER_CORE_DIR} diff --git a/src/plugins/filemanager/dfmplugin-trash/CMakeLists.txt b/src/plugins/filemanager/dfmplugin-trash/CMakeLists.txt index 56db3ed707..ffe8da9535 100644 --- a/src/plugins/filemanager/dfmplugin-trash/CMakeLists.txt +++ b/src/plugins/filemanager/dfmplugin-trash/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 3.10) project(dfmplugin-trash) +set(BIN_NAME dfm-trash-plugin) set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -12,22 +13,22 @@ FILE(GLOB_RECURSE TRASH_FILES CONFIGURE_DEPENDS find_package(Qt6 COMPONENTS Xml REQUIRED) -add_library(${PROJECT_NAME} +add_library(${BIN_NAME} SHARED ${TRASH_FILES} ) -set_target_properties(${PROJECT_NAME} PROPERTIES +set_target_properties(${BIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${DFM_BUILD_PLUGIN_FILEMANAGER_DIR}) -target_link_libraries(${PROJECT_NAME} +target_link_libraries(${BIN_NAME} DFM6::base DFM6::framework ) #install library file install(TARGETS - ${PROJECT_NAME} + ${BIN_NAME} LIBRARY DESTINATION ${DFM_PLUGIN_FILEMANAGER_CORE_DIR} diff --git a/src/plugins/filemanager/dfmplugin-vault/CMakeLists.txt b/src/plugins/filemanager/dfmplugin-vault/CMakeLists.txt index 47bab311ce..3ec1e6cdd0 100644 --- a/src/plugins/filemanager/dfmplugin-vault/CMakeLists.txt +++ b/src/plugins/filemanager/dfmplugin-vault/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 3.10) project(dfmplugin-vault) +set(BIN_NAME dfm-vault-plugin) set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -16,16 +17,16 @@ pkg_check_modules(secret REQUIRED libsecret-1 IMPORTED_TARGET) pkg_check_modules(polkit REQUIRED polkit-agent-1 polkit-qt6-1) set(VAULT_EXTRA_LIBRARIES ${polkit_LIBRARIES}) -add_library(${PROJECT_NAME} +add_library(${BIN_NAME} SHARED ${VAULT_FILES} ) -set_target_properties(${PROJECT_NAME} PROPERTIES +set_target_properties(${BIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${DFM_BUILD_PLUGIN_FILEMANAGER_DIR}) find_package(Qt6 COMPONENTS Core) -target_link_libraries(${PROJECT_NAME} +target_link_libraries(${BIN_NAME} DFM6::base DFM6::framework ${VAULT_EXTRA_LIBRARIES} @@ -38,7 +39,7 @@ install(FILES polkit/com.deepin.filemanager.vault.policy #install library file install(TARGETS - ${PROJECT_NAME} + ${BIN_NAME} LIBRARY DESTINATION ${DFM_PLUGIN_FILEMANAGER_CORE_DIR} diff --git a/src/plugins/filemanager/dfmplugin-workspace/CMakeLists.txt b/src/plugins/filemanager/dfmplugin-workspace/CMakeLists.txt index 193f2e1b99..627a61e2f7 100644 --- a/src/plugins/filemanager/dfmplugin-workspace/CMakeLists.txt +++ b/src/plugins/filemanager/dfmplugin-workspace/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 3.10) project(dfmplugin-workspace) +set(BIN_NAME dfm-workspace-plugin) set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -10,28 +11,28 @@ FILE(GLOB_RECURSE WORKSPACE_FILES CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/*.json" ) -add_library(${PROJECT_NAME} +add_library(${BIN_NAME} SHARED ${WORKSPACE_FILES} ) find_package(Dtk6 COMPONENTS Widget REQUIRED) -set_target_properties(${PROJECT_NAME} PROPERTIES +set_target_properties(${BIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${DFM_BUILD_PLUGIN_FILEMANAGER_DIR}) -target_include_directories(${PROJECT_NAME} PRIVATE +target_include_directories(${BIN_NAME} PRIVATE ${Qt6Widgets_PRIVATE_INCLUDE_DIRS} ) -target_link_libraries(${PROJECT_NAME} +target_link_libraries(${BIN_NAME} DFM6::base DFM6::framework ) #install library file install(TARGETS - ${PROJECT_NAME} + ${BIN_NAME} LIBRARY DESTINATION ${DFM_PLUGIN_FILEMANAGER_CORE_DIR}