From 3ccdcfbc6d104f1f691b7feaf6ed58daae21da63 Mon Sep 17 00:00:00 2001 From: niko_yhc Date: Mon, 8 Jan 2024 13:48:50 +0800 Subject: [PATCH 07/17] fix(application):add a compilation switch to control whether the application-plugin is turned on MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加编译开关控制application-plugin是否打开 --- cmake/options.cmake | 3 ++- data/CMakeLists.txt | 5 +++++ plugins/CMakeLists.txt | 4 +++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/cmake/options.cmake b/cmake/options.cmake index f21d2b9..bc56591 100644 --- a/cmake/options.cmake +++ b/cmake/options.cmake @@ -3,4 +3,5 @@ option(PASSWD_EXPIRATION_POLICY_VISIBLE "Is password expiration policy visible" OPTION(ENABLE_USER_GROUP "Enable user group" OFF) OPTION(ENABLE_NETWORK "Enable network plugin" ON) -OPTION(ENABLE_AUDIO "Enable audio plugin" ON) \ No newline at end of file +OPTION(ENABLE_AUDIO "Enable audio plugin" ON) +OPTION(ENABLE_APPLICATION "Enable application plugin" ON) \ No newline at end of file diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index 9f66d68..8b1ed54 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -14,6 +14,11 @@ endif() if(NOT ENABLE_USER_GROUP) list(FILTER CATEGORY_DESKTOP EXCLUDE REGEX "group.desktop") endif() + +if(NOT ENABLE_APPLICATION) + list(FILTER CATEGORY_DESKTOP EXCLUDE REGEX "application.desktop") +endif() + install(FILES ${CATEGORY_DESKTOP} DESTINATION ${CATEGORY_DESKTOP_DIR}) # 安装主分类相关图标文件 diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 9acb921..ecad7b6 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -8,7 +8,9 @@ add_subdirectory(timedate) add_subdirectory(display) add_subdirectory(keybinding) add_subdirectory(authentication) -add_subdirectory(application) +if (ENABLE_APPLICATION) + add_subdirectory(application) +endif() if(ENABLE_NETWORK) add_subdirectory(network) endif() -- 2.33.0