2022-09-06 15:35:18 +08:00
|
|
|
cmake_minimum_required(VERSION 3.5)
|
2022-09-08 11:18:38 +08:00
|
|
|
project(ads_example_autohide VERSION ${VERSION_SHORT})
|
2022-09-06 15:35:18 +08:00
|
|
|
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
|
|
|
|
find_package(Qt${QT_VERSION_MAJOR} 5.5 COMPONENTS Core Gui Widgets REQUIRED)
|
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
2022-09-08 11:18:38 +08:00
|
|
|
add_executable(AutoHideExample WIN32
|
2022-09-06 15:35:18 +08:00
|
|
|
main.cpp
|
|
|
|
mainwindow.cpp
|
|
|
|
mainwindow.ui
|
|
|
|
)
|
2022-09-08 11:18:38 +08:00
|
|
|
target_include_directories(AutoHideExample PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../../src")
|
2023-02-23 22:50:50 +08:00
|
|
|
target_link_libraries(AutoHideExample PRIVATE qt${QT_VERSION_MAJOR}advanceddocking)
|
2022-09-08 11:18:38 +08:00
|
|
|
target_link_libraries(AutoHideExample PUBLIC Qt${QT_VERSION_MAJOR}::Core
|
2022-09-06 15:35:18 +08:00
|
|
|
Qt${QT_VERSION_MAJOR}::Gui
|
|
|
|
Qt${QT_VERSION_MAJOR}::Widgets)
|
2022-09-08 11:18:38 +08:00
|
|
|
set_target_properties(AutoHideExample PROPERTIES
|
2022-09-06 15:35:18 +08:00
|
|
|
AUTOMOC ON
|
|
|
|
AUTORCC ON
|
|
|
|
AUTOUIC ON
|
|
|
|
CXX_STANDARD 14
|
|
|
|
CXX_STANDARD_REQUIRED ON
|
|
|
|
CXX_EXTENSIONS OFF
|
|
|
|
VERSION ${VERSION_SHORT}
|
2022-09-08 11:18:38 +08:00
|
|
|
EXPORT_NAME "Qt Advanced Docking System Auto Hide Example"
|
2022-09-06 15:35:18 +08:00
|
|
|
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"
|
|
|
|
)
|