1 Star 0 Fork 0

yuwei/qt6浏览器

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CMakeLists.txt 2.51 KB
一键复制 编辑 原始数据 按行查看 历史
yuwei 提交于 2024-04-08 09:19 . init
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
cmake_minimum_required(VERSION 3.16)
project(simplebrowser LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/webenginewidgets/simplebrowser")
find_package(Qt6 REQUIRED COMPONENTS Core Gui WebEngineWidgets)
qt_add_executable(simplebrowser
browser.cpp browser.h
browserwindow.cpp browserwindow.h
certificateerrordialog.ui
downloadmanagerwidget.cpp downloadmanagerwidget.h downloadmanagerwidget.ui
downloadwidget.cpp downloadwidget.h downloadwidget.ui
main.cpp
passworddialog.ui
tabwidget.cpp tabwidget.h
webpage.cpp webpage.h
webpopupwindow.cpp webpopupwindow.h
webview.cpp webview.h
)
if(WIN32)
set_property(
TARGET simplebrowser
APPEND PROPERTY
SOURCES simplebrowser.exe.manifest)
endif()
set_target_properties(simplebrowser PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
MACOSX_BUNDLE_GUI_IDENTIFIER "io.qt.examples.webenginewidgets.simplebrowser"
)
target_link_libraries(simplebrowser PUBLIC
Qt::Core
Qt::Gui
Qt::WebEngineWidgets
)
# Resources:
set(simplebrowser_resource_files
"data/AppLogoColor.png"
"data/ninja.png"
)
qt_add_resources(simplebrowser "simplebrowser"
PREFIX
"/"
BASE
"data"
FILES
${simplebrowser_resource_files}
)
set(simplebrowser1_resource_files
"data/3rdparty/dialog-error.png"
"data/3rdparty/edit-clear.png"
"data/3rdparty/go-bottom.png"
"data/3rdparty/go-next.png"
"data/3rdparty/go-previous.png"
"data/3rdparty/process-stop.png"
"data/3rdparty/text-html.png"
"data/3rdparty/view-refresh.png"
)
qt_add_resources(simplebrowser "simplebrowser1"
PREFIX
"/"
BASE
"data/3rdparty"
FILES
${simplebrowser1_resource_files}
)
if (APPLE)
set_target_properties(simplebrowser PROPERTIES
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.cmake.macos.plist"
)
if (NOT CMAKE_GENERATOR STREQUAL "Xcode")
# Need to sign application for location permissions to work
add_custom_command(TARGET simplebrowser
POST_BUILD COMMAND codesign -s - simplebrowser.app)
endif()
endif()
install(TARGETS simplebrowser
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yuwei_2_838529949/qt6-browser.git
git@gitee.com:yuwei_2_838529949/qt6-browser.git
yuwei_2_838529949
qt6-browser
qt6浏览器
master

搜索帮助