fix building. (#323)

This commit is contained in:
Nick D'Ademo 2021-05-26 00:12:24 +08:00 committed by GitHub
parent aff0bd6e25
commit 48406da6ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 7 deletions

View File

@ -4,4 +4,5 @@ add_subdirectory(simple)
add_subdirectory(sidebar)
add_subdirectory(deleteonclose)
add_subdirectory(centralwidget)
add_subdirectory(emptydockarea)
add_subdirectory(emptydockarea)
add_subdirectory(dockindock)

View File

@ -1,9 +1,9 @@
cmake_minimum_required(VERSION 3.5)
project(ads_example_simple VERSION ${VERSION_SHORT})
project(ads_example_dockindock 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)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
add_executable(DockInDock WIN32
add_executable(DockInDockExample WIN32
dockindock.cpp
dockindockmanager.cpp
perspectiveactions.cpp
@ -11,12 +11,12 @@ add_executable(DockInDock WIN32
main.cpp
mainframe.cpp
)
target_include_directories(SimpleExample PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../../src")
target_link_libraries(SimpleExample PRIVATE qtadvanceddocking)
target_link_libraries(SimpleExample PUBLIC Qt${QT_VERSION_MAJOR}::Core
target_include_directories(DockInDockExample PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../../src")
target_link_libraries(DockInDockExample PRIVATE qtadvanceddocking)
target_link_libraries(DockInDockExample PUBLIC Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Gui
Qt${QT_VERSION_MAJOR}::Widgets)
set_target_properties(SimpleExample PROPERTIES
set_target_properties(DockInDockExample PROPERTIES
AUTOMOC ON
AUTORCC ON
AUTOUIC ON