mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-25 07:58:59 -06:00
Add the `--no-zstd` argument for `RCC` when `QT_FEATURE_zstd` is `OFF`. This causes user project builds to fail. That bug is fixed in Qt by https://codereview.qt-project.org/c/qt/qtbase/+/537546 but for the older versions, fix it here too. Fixes: #25664
16 lines
458 B
CMake
16 lines
458 B
CMake
enable_language(CXX)
|
|
|
|
set(CMAKE_CXX_STANDARD 11)
|
|
find_package(Qt${with_qt_version} REQUIRED COMPONENTS Core Widgets Gui)
|
|
|
|
add_library(dummy STATIC example.cpp data.qrc)
|
|
target_link_libraries(dummy Qt${with_qt_version}::Core
|
|
Qt${with_qt_version}::Widgets
|
|
Qt${with_qt_version}::Gui)
|
|
|
|
set_target_properties(dummy PROPERTIES AUTORCC ON)
|
|
|
|
if(DEFINED ZSTD_VALUE)
|
|
set(QT_FEATURE_zstd ${ZSTD_VALUE})
|
|
endif()
|