MeVisLab / pythonqt

Dynamic Python binding for Qt Applications
https://mevislab.github.io/pythonqt/
GNU Lesser General Public License v2.1
251 stars 89 forks source link

E:\QT\111\FluentUI\CMakeLists.txt:13: error: include could not find requested file: GetGitRevisionDescription #206

Closed xiere484 closed 7 months ago

xiere484 commented 7 months ago

cmake_minimum_required(VERSION 3.20)

project(FluentUI VERSION 1.0)

if(MSVC)

让Release也生成pdb文件

set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF")

endif()

list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/.cmake/)

include(GetGitRevisionDescription)

option(FLUENTUI_BUILD_EXAMPLES "Build FluentUI demo applications." ON) set(FLUENTUI_BUILD_STATIC_LIB OFF)

find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core) find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core)

add_subdirectory(src)

Release也支持日志打印代码位置

target_compile_definitions(fluentuiplugin PRIVATE QT_MESSAGELOGCONTEXT )

if (FLUENTUI_BUILD_EXAMPLES) add_subdirectory(example) endif ()

message("------------------------ FluentUI ------------------------") message("Build FluentUI demo applications.: ${FLUENTUI_BUILD_EXAMPLES}") message("Build static library.: ${FLUENTUI_BUILD_STATIC_LIB}") message("Path to FluentUI plugin.: ${FLUENTUI_QML_PLUGIN_DIRECTORY}")