main
zhuzihcu 2023-05-12 10:40:27 +08:00
parent 86790c9562
commit 0c19164c54
2 changed files with 13 additions and 13 deletions

View File

@ -93,7 +93,7 @@ set_target_properties(example PROPERTIES
#
target_link_libraries(example PRIVATE
Qt6::Quick
fluentui
fluentuiplugin
)
#

View File

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.16)
project(fluentui LANGUAGES CXX)
project(fluentuiplugin LANGUAGES CXX)
#
set(CMAKE_AUTOMOC ON)
@ -9,11 +9,8 @@ if(APPLE)
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "" FORCE)
endif()
##
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_PREFIX_PATH}/bin)
##
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_PREFIX_PATH}/lib)
#QML->D:\Qt\6.4.3\msvc2019_64\qml\FluentUI
set(QML_PLUGIN_DIRECTORY ${CMAKE_PREFIX_PATH}/qml/FluentUI)
#
add_definitions(-DVERSION=1,2,9,0)
@ -48,19 +45,23 @@ foreach(filepath IN LISTS qml_files resource_files)
endforeach()
#qml
qt_add_library(fluentui SHARED)
qt_add_qml_module(fluentui
OUTPUT_DIRECTORY ${CMAKE_PREFIX_PATH}/qml/FluentUI
qt_add_library(fluentuiplugin SHARED)
qt_add_qml_module(fluentuiplugin
#fluentuiplugin.dllfluentuipluginplugin.dll
PLUGIN_TARGET fluentuiplugin
OUTPUT_DIRECTORY ${QML_PLUGIN_DIRECTORY}
VERSION 1.0
URI "FluentUI"
SOURCES ${sources_files} fluentui.rc
QML_FILES ${qml_files}
RESOURCES ${resource_files}
#designer
DESIGNER_SUPPORTED
)
#
target_link_libraries(fluentui PUBLIC
target_link_libraries(fluentuiplugin PUBLIC
Qt::Core
Qt::Quick
Qt::Qml
@ -68,9 +69,8 @@ target_link_libraries(fluentui PUBLIC
# win32 mingw
if(WIN32)
target_link_libraries(fluentui PRIVATE dwmapi user32)
target_link_libraries(fluentuiplugin PRIVATE dwmapi user32)
endif()
#debugd
set_target_properties(fluentui PROPERTIES DEBUG_POSTFIX "d")
set_target_properties(fluentuiplugin PROPERTIES DEBUG_POSTFIX "d")