2019-01-16 17:44:34 +08:00
|
|
|
cmake_minimum_required(VERSION 3.3)
|
2019-01-26 00:28:36 +08:00
|
|
|
set (CMAKE_CXX_STANDARD 14)
|
2019-01-16 17:44:34 +08:00
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
|
|
set(CMAKE_AUTOMOC ON)
|
|
|
|
set(CMAKE_AUTOUIC ON)
|
|
|
|
set(CMAKE_AUTORCC ON)
|
|
|
|
project(ads_demo VERSION "1.0")
|
2019-01-26 00:28:36 +08:00
|
|
|
set(REQUIRED_QT_VERSION 5.5.0)
|
2019-01-16 17:44:34 +08:00
|
|
|
find_package(Qt5Core ${REQUIRED_QT_VERSION} REQUIRED)
|
|
|
|
find_package(Qt5Gui ${REQUIRED_QT_VERSION} REQUIRED)
|
|
|
|
find_package(Qt5Widgets ${REQUIRED_QT_VERSION} REQUIRED)
|
|
|
|
set(ads_demo_LIBS ${ads_demo_LIBS} ${Qt5Core_LIBRARIES})
|
|
|
|
set(ads_demo_INCLUDE ${ads_demo_INCLUDE} ${Qt5Core_INCLUDE_DIRS})
|
|
|
|
set(ads_demo_COMPILE_DEFINE ${ads_demo_COMPILE_DEFINE} ${Qt5Core_COMPILE_DEFINITIONS} )
|
|
|
|
set(ads_demo_LIBS ${ads_demo_LIBS} ${Qt5Gui_LIBRARIES})
|
|
|
|
set(ads_demo_INCLUDE ${ads_demo_INCLUDE} ${Qt5Gui_INCLUDE_DIRS})
|
|
|
|
set(ads_demo_COMPILE_DEFINE ${ads_demo_COMPILE_DEFINE} ${Qt5Gui_COMPILE_DEFINITIONS})
|
|
|
|
set(ads_demo_LIBS ${ads_demo_LIBS} ${Qt5Widgets_LIBRARIES})
|
|
|
|
set(ads_demo_INCLUDE ${ads_demo_INCLUDE} ${Qt5Widgets_INCLUDE_DIRS})
|
|
|
|
set(ads_demo_COMPILE_DEFINE ${ads_demo_COMPILE_DEFINE} ${Qt5Widgets_COMPILE_DEFINITIONS})
|
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
set(ads_demo_SRCS
|
|
|
|
main.cpp
|
|
|
|
MainWindow.cpp
|
2019-05-05 00:08:47 +08:00
|
|
|
mainwindow.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})
|
2019-01-16 17:44:34 +08:00
|
|
|
if(BUILD_STATIC)
|
|
|
|
set(ads_demo_DEFINE ${ads_demo_DEFINE} ADS_STATIC)
|
|
|
|
endif()
|
2019-01-17 00:49:59 +08:00
|
|
|
add_dependencies(AdvancedDockingSystemDemo qtadvanceddocking)
|
|
|
|
target_include_directories(AdvancedDockingSystemDemo PUBLIC
|
2019-01-16 17:44:34 +08:00
|
|
|
$<BUILD_INTERFACE:${ads_demo_INCLUDE}>
|
|
|
|
$<INSTALL_INTERFACE:include>
|
|
|
|
)
|
2019-01-17 00:49:59 +08:00
|
|
|
target_include_directories(AdvancedDockingSystemDemo PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../src" ${ads_demo_INCLUDE})
|
|
|
|
target_link_libraries(AdvancedDockingSystemDemo PRIVATE qtadvanceddocking ${ads_demo_LIBS})
|
|
|
|
target_compile_definitions(AdvancedDockingSystemDemo PRIVATE ${ads_demo_DEFINE})
|
|
|
|
set_target_properties(AdvancedDockingSystemDemo PROPERTIES
|
2019-01-16 17:44:34 +08:00
|
|
|
VERSION "1.0"
|
|
|
|
SOVERSION 1
|
|
|
|
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
|
|
|
)
|