代码拉取完成,页面将自动刷新
cmake_minimum_required(VERSION 3.16)
project(QtAwesome)
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Widgets)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
add_library(QtAwesome
QtAwesome/QtAwesome.h
QtAwesome/QtAwesome.cpp
QtAwesome/QtAwesomeAnim.h
QtAwesome/QtAwesomeAnim.cpp
QtAwesome/QtAwesomeEnumGenerated.h
QtAwesome/QtAwesomeStringGenerated.h
QtAwesome/QtAwesomeFree.qrc
)
include(GNUInstallDirs)
target_include_directories(QtAwesome
INTERFACE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/QtAwesome>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
target_link_libraries(QtAwesome PUBLIC
Qt${QT_VERSION_MAJOR}::Widgets
)
install(TARGETS QtAwesome EXPORT QtAwesomeConfig
RUNTIME DESTINATION ${CMAKE_INSTALL_BINARYDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
install(EXPORT QtAwesomeConfig
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/QtAwesome/
NAMESPACE QtAwesome::
)
export(EXPORT QtAwesomeConfig NAMESPACE QtAwesome::)
install(FILES
QtAwesome/QtAwesome.h
QtAwesome/QtAwesomeAnim.h
QtAwesome/QtAwesomeEnumGenerated.h
QtAwesome/QtAwesomeStringGenerated.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/QtAwesome
)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。