diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 92ebd925..831083cd 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -93,6 +93,7 @@ set_target_properties(example PROPERTIES #链接库 target_link_libraries(example PRIVATE Qt6::Quick + fluentui ) #安装 diff --git a/example/qml/window/MainWindow.qml b/example/qml/window/MainWindow.qml index 9fd50400..48eff350 100644 --- a/example/qml/window/MainWindow.qml +++ b/example/qml/window/MainWindow.qml @@ -4,7 +4,6 @@ import QtQuick.Controls import QtQuick.Layouts import Qt.labs.platform import FluentUI -import example import "qrc:///example/qml/global/" FluWindow { diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6ea54244..d7a087ee 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -9,7 +9,7 @@ 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_SOURCE_DIR}/bin/debug) else() @@ -50,7 +50,7 @@ endforeach() #添加qml模块 qt_add_qml_module(fluentui - OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/FluentUI + OUTPUT_DIRECTORY ${CMAKE_PREFIX_PATH}/qml/FluentUI VERSION 1.0 URI "FluentUI" SOURCES ${sources_files} fluentui.rc @@ -58,12 +58,6 @@ qt_add_qml_module(fluentui RESOURCES ${resource_files} ) -#设置属性 -set_target_properties(fluentui PROPERTIES - WIN32_EXECUTABLE TRUE - MACOSX_BUNDLE TRUE -) - #链接库 target_link_libraries(fluentui PUBLIC Qt::Core