Skip to content

项目无法编译 #245

Description

@mygit10636

求大神帮我看看是什么问题,谢谢了
CMakeLists.txt里加了QWindowKit::Widgets就有问题
qt的版本是6.10.3
Image

cmake_minimum_required(VERSION 3.19)
project(untitled LANGUAGES CXX)

set(QWindowKit_DIR "D:/Qt/thirdPartyLibrary/qwindowkit/lib/cmake/QWindowKit")

find_package(Qt6 6.5 REQUIRED COMPONENTS Core Widgets)
find_package(QWindowKit REQUIRED COMPONENTS Widgets)

qt_standard_project_setup()

qt_add_executable(untitled
    WIN32 MACOSX_BUNDLE
    main.cpp
    MainWindow.cpp
    MainWindow.h
)

target_link_libraries(untitled
    PRIVATE
        Qt::Core
        Qt::Widgets
        QWindowKit::Widgets
)

install(TARGETS untitled
    BUNDLE  DESTINATION .
    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)

qt_generate_deploy_app_script(
    TARGET untitled
    OUTPUT_SCRIPT deploy_script
    NO_UNSUPPORTED_PLATFORM_ERROR
)
install(SCRIPT ${deploy_script})
Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions