From a0dae1711732199791e012661d8d59680810fedf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E5=AD=90=E6=A5=9A=5Czhuzi?= Date: Thu, 11 May 2023 20:10:42 +0800 Subject: [PATCH] update --- src/CMakeLists.txt | 15 +++++++----- .../FluentUI/designer/fluentui.metainfo | 24 +++++++++++++++---- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fa0cc07f..55d4588e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -9,12 +9,11 @@ if(APPLE) set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "" FORCE) endif() -##设置可执行文件输出目录 -if(CMAKE_BUILD_TYPE STREQUAL "Debug") - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_PREFIX_PATH}/bin) -else() - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_PREFIX_PATH}/bin) -endif() +##设置动态库输出目录 +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_PREFIX_PATH}/bin) + +##设置库文件输出目录 +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_PREFIX_PATH}/lib) #设置版本号 add_definitions(-DVERSION=1,2,9,0) @@ -70,3 +69,7 @@ target_link_libraries(fluentui PUBLIC if(WIN32) target_link_libraries(fluentui PRIVATE dwmapi user32) endif() + +#如果是debug,则生成的库文件名后面拼接d +set_target_properties(fluentui PROPERTIES DEBUG_POSTFIX "d") +set_target_properties(fluentuiplugin PROPERTIES DEBUG_POSTFIX "d") diff --git a/src/imports/FluentUI/designer/fluentui.metainfo b/src/imports/FluentUI/designer/fluentui.metainfo index f5b27142..c3a4f548 100644 --- a/src/imports/FluentUI/designer/fluentui.metainfo +++ b/src/imports/FluentUI/designer/fluentui.metainfo @@ -1,5 +1,5 @@ -MetaInfo { - Type { +MetaInfo { + Type { name: "FluentUI.Controls.FluButton" icon: "images/button-icon16.png" @@ -7,11 +7,27 @@ MetaInfo { name: "FluButton" category: "FluentUI - Controls" libraryIcon: "images/button-icon.png" - version: "2.0" + version: "1.0" requiredImport: "FluentUI" toolTip: qsTr("A button with text.") Property { name: "text"; type: "binding"; value: "qsTr(\"Button\")" } } } -} \ No newline at end of file + + Type { + name: "FluentUI.Controls.FluText" + icon: "images/label-icon16.png" + + ItemLibraryEntry { + name: "FluText" + category: "FluentUI - Controls" + libraryIcon: "images/label-icon.png" + version: "1.0" + requiredImport: "FluentUI" + toolTip: qsTr("A text.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Text\")" } + } + } +}