This commit is contained in:
zhuzihcu 2023-06-16 17:17:21 +08:00
parent 9d94bc65d5
commit fdff068752
2 changed files with 16 additions and 18 deletions

View File

@ -22,7 +22,8 @@ file(TO_CMAKE_PATH "/" PATH_SEPARATOR)
#
add_definitions(-DVERSION=1,3,4,0)
find_package(Qt6 REQUIRED COMPONENTS Quick REQUIRED)
find_package(Qt6 REQUIRED COMPONENTS Quick)
qt_standard_project_setup()
#Cpp
file(GLOB_RECURSE CPP_FILES *.cpp *.h)
@ -101,4 +102,13 @@ target_link_libraries(example PRIVATE
#
install(TARGETS example
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
qt_generate_deploy_app_script(
TARGET example
OUTPUT_SCRIPT deploy_script
NO_UNSUPPORTED_PLATFORM_ERROR
)
install(SCRIPT ${deploy_script})

View File

@ -16,6 +16,7 @@ set(QML_PLUGIN_DIRECTORY ${CMAKE_PREFIX_PATH}/qml/FluentUI)
add_definitions(-DVERSION=1,3,4,0)
find_package(Qt6 REQUIRED COMPONENTS Core Quick Qml)
qt_standard_project_setup()
#Cpp
file(GLOB_RECURSE CPP_FILES *.cpp *.h)
@ -63,20 +64,7 @@ qt_add_qml_module(fluentuiplugin
#
target_link_libraries(fluentuiplugin PUBLIC
Qt::CorePrivate
Qt::QuickPrivate
Qt::QmlPrivate
Qt::Core
Qt::Quick
Qt::Qml
)
# win32 mingw
if(WIN32)
target_link_libraries(fluentuiplugin PRIVATE dwmapi user32)
endif()
#debugd
# MinGWGCC/Clang, `d`
if(MSVC)
set_target_properties(fluentuiplugin PROPERTIES DEBUG_POSTFIX "d")
endif(MSVC)