mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-26 16:01:36 +08:00
Set required C++ standard depending on Qt version (#444)
Qt6 requires C++17 for building. ADS however only requires C++14 so far. Now when building using Conon for example the packages are built independently and ADS is built using the C++-14 flag which in turn causes the included Qt6 headers to fail the compile process. This patch bumps the required C++ standard to C++17 for builds targeting Qt6 only.
This commit is contained in:
parent
2afca346b0
commit
6302ab03d8
@ -70,8 +70,6 @@ target_link_libraries(qtadvanceddocking PUBLIC Qt${QT_VERSION_MAJOR}::Core
|
|||||||
set_target_properties(qtadvanceddocking PROPERTIES
|
set_target_properties(qtadvanceddocking PROPERTIES
|
||||||
AUTOMOC ON
|
AUTOMOC ON
|
||||||
AUTORCC ON
|
AUTORCC ON
|
||||||
CXX_STANDARD 14
|
|
||||||
CXX_STANDARD_REQUIRED ON
|
|
||||||
CXX_EXTENSIONS OFF
|
CXX_EXTENSIONS OFF
|
||||||
VERSION ${VERSION_SHORT}
|
VERSION ${VERSION_SHORT}
|
||||||
EXPORT_NAME "qtadvanceddocking"
|
EXPORT_NAME "qtadvanceddocking"
|
||||||
@ -79,6 +77,16 @@ set_target_properties(qtadvanceddocking PROPERTIES
|
|||||||
LIBRARY_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"
|
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${ads_PlatformDir}/bin"
|
||||||
)
|
)
|
||||||
|
if(QT_VERSION_MAJOR STREQUAL "5")
|
||||||
|
set_target_properties(qtadvanceddocking PROPERTIES
|
||||||
|
CXX_STANDARD 14
|
||||||
|
CXX_STANDARD_REQUIRED ON)
|
||||||
|
elseif(QT_VERSION_MAJOR STREQUAL "6")
|
||||||
|
set_target_properties(qtadvanceddocking PROPERTIES
|
||||||
|
CXX_STANDARD 17
|
||||||
|
CXX_STANDARD_REQUIRED ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
include(CMakePackageConfigHelpers)
|
include(CMakePackageConfigHelpers)
|
||||||
write_basic_package_version_file(
|
write_basic_package_version_file(
|
||||||
"qtadvanceddockingConfigVersion.cmake"
|
"qtadvanceddockingConfigVersion.cmake"
|
||||||
|
Loading…
Reference in New Issue
Block a user