2020-05-24 15:14:33 +08:00
|
|
|
cmake_minimum_required(VERSION 3.5)
|
|
|
|
project(ads_demo VERSION ${VERSION_SHORT})
|
|
|
|
|
2021-04-29 04:52:45 +08:00
|
|
|
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
|
|
|
|
find_package(Qt${QT_VERSION_MAJOR} 5.5 COMPONENTS Core Gui Widgets REQUIRED)
|
|
|
|
if(WIN32 AND QT_VERSION_MAJOR LESS 6)
|
|
|
|
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS AxContainer REQUIRED)
|
2020-01-11 22:16:33 +08:00
|
|
|
endif()
|
2019-01-16 17:44:34 +08:00
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
set(ads_demo_SRCS
|
|
|
|
main.cpp
|
|
|
|
MainWindow.cpp
|
2019-05-05 00:08:47 +08:00
|
|
|
mainwindow.ui
|
2020-04-14 23:24:34 +08:00
|
|
|
StatusDialog.cpp
|
|
|
|
StatusDialog.ui
|
2019-12-10 21:44:44 +08:00
|
|
|
demo.qrc
|
2019-01-16 17:44:34 +08:00
|
|
|
)
|
2019-01-17 00:49:59 +08:00
|
|
|
add_executable(AdvancedDockingSystemDemo WIN32 ${ads_demo_SRCS})
|
2020-05-24 15:14:33 +08:00
|
|
|
target_include_directories(AdvancedDockingSystemDemo PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../src")
|
2021-04-29 04:52:45 +08:00
|
|
|
target_link_libraries(AdvancedDockingSystemDemo PUBLIC Qt${QT_VERSION_MAJOR}::Core
|
|
|
|
Qt${QT_VERSION_MAJOR}::Gui
|
|
|
|
Qt${QT_VERSION_MAJOR}::Widgets)
|
|
|
|
if(WIN32 AND QT_VERSION_MAJOR LESS 6)
|
|
|
|
target_link_libraries(AdvancedDockingSystemDemo PUBLIC Qt${QT_VERSION_MAJOR}::AxContainer)
|
2019-01-16 17:44:34 +08:00
|
|
|
endif()
|
2020-05-24 15:14:33 +08:00
|
|
|
target_link_libraries(AdvancedDockingSystemDemo PRIVATE qtadvanceddocking)
|
2019-01-17 00:49:59 +08:00
|
|
|
set_target_properties(AdvancedDockingSystemDemo PROPERTIES
|
2020-05-24 15:14:33 +08:00
|
|
|
AUTOMOC ON
|
|
|
|
AUTORCC ON
|
|
|
|
AUTOUIC ON
|
|
|
|
CXX_STANDARD 14
|
|
|
|
CXX_STANDARD_REQUIRED ON
|
|
|
|
CXX_EXTENSIONS OFF
|
|
|
|
VERSION ${VERSION_SHORT}
|
2019-01-16 17:44:34 +08:00
|
|
|
EXPORT_NAME "Qt Advanced Docking System Demo"
|
2019-01-17 00:49:59 +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"
|
2019-01-16 17:44:34 +08:00
|
|
|
)
|
2020-05-24 15:14:33 +08:00
|
|
|
#if(BUILD_STATIC)
|
|
|
|
# target_compile_definitions(AdvancedDockingSystemDemo PRIVATE ADS_STATIC)
|
|
|
|
#endif()
|
|
|
|
|