cmake_minimum_required(VERSION 3.5)
project(QtAdvancedDockingSystem LANGUAGES CXX VERSION ${VERSION_SHORT})
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} 5.5 COMPONENTS Core Gui Widgets REQUIRED)
if (UNIX AND NOT APPLE)
include_directories(${Qt${QT_VERSION_MAJOR}Gui_PRIVATE_INCLUDE_DIRS})
endif()
set(CMAKE_INCLUDE_CURRENT_DIR ON)
if(BUILD_STATIC)
set(CMAKE_STATIC_LIBRARY_SUFFIX "_static${CMAKE_STATIC_LIBRARY_SUFFIX}")
endif()
set(ads_SRCS
ads_globals.cpp
DockAreaTabBar.cpp
DockAreaTitleBar.cpp
DockAreaWidget.cpp
DockContainerWidget.cpp
DockManager.cpp
DockOverlay.cpp
DockSplitter.cpp
DockWidget.cpp
DockWidgetTab.cpp
DockingStateReader.cpp
DockFocusController.cpp
ElidingLabel.cpp
FloatingDockContainer.cpp
FloatingDragPreview.cpp
IconProvider.cpp
DockComponentsFactory.cpp
ads.qrc
)
set(ads_HEADERS
ads_globals.h
DockAreaTabBar.h
DockAreaTitleBar.h
DockAreaTitleBar_p.h
DockAreaWidget.h
DockContainerWidget.h
DockManager.h
DockOverlay.h
DockSplitter.h
DockWidget.h
DockWidgetTab.h
DockingStateReader.h
DockFocusController.h
ElidingLabel.h
FloatingDockContainer.h
FloatingDragPreview.h
IconProvider.h
DockComponentsFactory.h
)
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
if (UNIX AND NOT APPLE)
set(ads_SRCS linux/FloatingWidgetTitleBar.cpp ${ads_SRCS})
set(ads_HEADERS linux/FloatingWidgetTitleBar.h ${ads_HEADERS})
endif()
if(BUILD_STATIC)
add_library(qtadvanceddocking STATIC ${ads_SRCS} ${ads_HEADERS})
target_compile_definitions(qtadvanceddocking PUBLIC ADS_STATIC)
else()
add_library(qtadvanceddocking SHARED ${ads_SRCS} ${ads_HEADERS})
target_compile_definitions(qtadvanceddocking PRIVATE ADS_SHARED_EXPORT)
endif()
target_link_libraries(qtadvanceddocking PUBLIC Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Gui
Qt${QT_VERSION_MAJOR}::Widgets)
set_target_properties(qtadvanceddocking PROPERTIES
AUTOMOC ON
AUTORCC ON
CXX_STANDARD 14
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS OFF
VERSION ${VERSION_SHORT}
EXPORT_NAME "qtadvanceddocking"
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${ads_PlatformDir}/lib"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${ads_PlatformDir}/lib"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${ads_PlatformDir}/bin"
)
include(CMakePackageConfigHelpers)
write_basic_package_version_file(
"qtadvanceddockingConfigVersion.cmake"
VERSION ${VERSION_SHORT}
COMPATIBILITY SameMajorVersion
)
install(FILES ${ads_HEADERS}
DESTINATION include
COMPONENT headers
)
install(FILES
"${CMAKE_SOURCE_DIR}/LICENSE"
"${CMAKE_SOURCE_DIR}/gnu-lgpl-v2.1.md"
DESTINATION license
COMPONENT license
)
install(TARGETS qtadvanceddocking
EXPORT adsTargets
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
INCLUDES DESTINATION include
)
install(EXPORT adsTargets
FILE adsTargets.cmake
NAMESPACE ads::
DESTINATION lib/cmake/qtadvanceddocking
)
install(FILES qtadvanceddockingConfig.cmake "${CMAKE_CURRENT_BINARY_DIR}/qtadvanceddockingConfigVersion.cmake"
DESTINATION lib/cmake/qtadvanceddocking
)
target_include_directories(qtadvanceddocking PUBLIC
$<INSTALL_INTERFACE:include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)
windSnowLi
- 粉丝: 93
- 资源: 21
最新资源
- 最新版新UI包天付费视频打赏程序 带包天+可扣量+代理+多模板非云赏V系列
- YOLO算法-检测驾驶员侧车窗是否关闭数据集-564张图像带标签-车窗关闭-汽车-车窗打开.zip
- YOLO算法-下水管道缺陷检测数据集-980张图像带标签-关节偏移-障碍物-裂纹-带扣-洞-公用设施入侵-碎片.zip
- YOLO算法-刀器数据集-610张图像带标签-刀.zip
- YOLO算法-办公室椅子数据集-876张图像带标签.zip
- YOLO算法-绵羊检测数据集-574张图像带标签-羊.zip
- YOLO算法-包装好的服装数据集-654张图像带标签-.zip
- YOLO算法-警车检测数据集-676张图像带标签-.zip
- YOLO算法-垃圾箱检测数据集-1228张图像带标签-垃圾桶.zip
- YOLO算法-刀具检测数据集-300张图像带标签-.zip
- G120 EPOS基本定位功能关键点系列-堆垛机报F7452追踪原因.mp4
- YOLO算法-罐头和瓶子数据集-595张图像带标签.zip
- YOLO算法-回收站数据集-501张图像带标签-黑色垃圾箱-绿色垃圾桶-箱子-杯子-老鼠-蓝色垃圾桶.zip
- 2015年10月及2016年4月全国高等教育自学考试试题及答案02325
- YOLO算法-刀数据集-830张图像带标签-刀.zip
- YOLO算法-雨水排放涵洞模型数据集-1000张图像带标签-.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
评论0