diff --git a/configure.cmake b/configure.cmake index 39a85a3f25..934327a1f0 100644 --- a/configure.cmake +++ b/configure.cmake @@ -7,11 +7,8 @@ #### Libraries qt_find_package(ZLIB PROVIDED_TARGETS ZLIB::ZLIB) -set_package_properties(ZLIB PROPERTIES TYPE OPTIONAL) qt_find_package(ZSTD PROVIDED_TARGETS ZSTD::ZSTD) -set_package_properties(ZSTD PROPERTIES TYPE OPTIONAL) qt_find_package(Libudev PROVIDED_TARGETS PkgConfig::Libudev) -set_package_properties(Libudev PROPERTIES TYPE OPTIONAL) #### Tests diff --git a/src/corelib/configure.cmake b/src/corelib/configure.cmake index e9794dc2a4..019cdef67e 100644 --- a/src/corelib/configure.cmake +++ b/src/corelib/configure.cmake @@ -11,23 +11,15 @@ set_property(CACHE INPUT_iconv PROPERTY STRINGS undefined no yes posix sun gnu) #### Libraries qt_find_package(GLIB2 PROVIDED_TARGETS GLIB2::GLIB2) -set_package_properties(GLIB2 PROPERTIES TYPE OPTIONAL) qt_find_package(ICU COMPONENTS i18n uc data PROVIDED_TARGETS ICU::i18n ICU::uc ICU::data) -set_package_properties(ICU PROPERTIES TYPE OPTIONAL) qt_find_package(Libsystemd) -set_package_properties(Libsystemd PROPERTIES TYPE OPTIONAL) qt_find_package(Atomic PROVIDED_TARGETS Atomic) -set_package_properties(Atomic PROPERTIES TYPE OPTIONAL) qt_find_package(WrapRt PROVIDED_TARGETS WrapRt) -set_package_properties(WrapRt PROPERTIES TYPE OPTIONAL) qt_find_package(LTTngUST) -set_package_properties(LTTngUST PROPERTIES TYPE OPTIONAL) qt_find_package(PCRE2 PROVIDED_TARGETS PCRE2) set_package_properties(PCRE2 PROPERTIES TYPE REQUIRED) qt_find_package(PPS) -set_package_properties(PPS PROPERTIES TYPE OPTIONAL) qt_find_package(Slog2) -set_package_properties(Slog2 PROPERTIES TYPE OPTIONAL) #### Tests diff --git a/src/gui/configure.cmake b/src/gui/configure.cmake index 542460a889..86cce0535a 100644 --- a/src/gui/configure.cmake +++ b/src/gui/configure.cmake @@ -23,45 +23,26 @@ set_property(CACHE INPUT_xcb PROPERTY STRINGS undefined no yes qt system) #### Libraries qt_find_package(ATSPI2 PROVIDED_TARGETS PkgConfig::ATSPI2) -set_package_properties(ATSPI2 PROPERTIES TYPE OPTIONAL) qt_find_package(Libdrm PROVIDED_TARGETS Libdrm::Libdrm) -set_package_properties(Libdrm PROPERTIES TYPE OPTIONAL) qt_find_package(EGL) -set_package_properties(EGL PROPERTIES TYPE OPTIONAL) qt_find_package(Freetype PROVIDED_TARGETS Freetype::Freetype) set_package_properties(Freetype PROPERTIES TYPE REQUIRED) qt_find_package(Fontconfig PROVIDED_TARGETS Fontconfig::Fontconfig) -set_package_properties(Fontconfig PROPERTIES TYPE OPTIONAL) qt_find_package(gbm PROVIDED_TARGETS gbm::gbm) -set_package_properties(gbm PROPERTIES TYPE OPTIONAL) qt_find_package(harfbuzz PROVIDED_TARGETS harfbuzz::harfbuzz) -set_package_properties(harfbuzz PROPERTIES TYPE OPTIONAL) qt_find_package(Libinput PROVIDED_TARGETS Libinput::Libinput) -set_package_properties(Libinput PROPERTIES TYPE OPTIONAL) qt_find_package(JPEG) -set_package_properties(JPEG PROPERTIES TYPE OPTIONAL) qt_find_package(PNG PROVIDED_TARGETS PNG::PNG) -set_package_properties(PNG PROPERTIES TYPE OPTIONAL) qt_find_package(Mtdev PROVIDED_TARGETS PkgConfig::Mtdev) -set_package_properties(Mtdev PROPERTIES TYPE OPTIONAL) -qt_find_package(OpenGL PROVIDED_TARGETS OpenGL::GL OpenGL::OpenGL OpenGL::EGL OpenGL::GLX OpenGL::GLU) -set_package_properties(OpenGL PROPERTIES TYPE OPTIONAL) +qt_find_package(OpenGL) qt_find_package(GLESv2) -set_package_properties(GLESv2 PROPERTIES TYPE OPTIONAL) qt_find_package(Tslib PROVIDED_TARGETS PkgConfig::Tslib) -set_package_properties(Tslib PROPERTIES TYPE OPTIONAL) -qt_find_package(Vulkan PROVIDED_TARGETS Vulkan::Vulkan) -set_package_properties(Vulkan PROPERTIES TYPE OPTIONAL) +qt_find_package(Vulkan) qt_find_package(Wayland) -set_package_properties(Wayland PROPERTIES TYPE OPTIONAL) qt_find_package(X11) -set_package_properties(X11 PROPERTIES TYPE OPTIONAL) qt_find_package(XCB 1.9 PROVIDED_TARGETS XCB::XCB) -set_package_properties(XCB PROPERTIES TYPE OPTIONAL) qt_find_package(X11_XCB PROVIDED_TARGETS X11::XCB) -set_package_properties(X11_XCB PROPERTIES TYPE OPTIONAL) qt_find_package(XKB 0.4.1 PROVIDED_TARGETS XKB::XKB) -set_package_properties(XKB PROPERTIES TYPE OPTIONAL) #### Tests diff --git a/src/network/configure.cmake b/src/network/configure.cmake index c765f59c5d..c11bcf4744 100644 --- a/src/network/configure.cmake +++ b/src/network/configure.cmake @@ -7,9 +7,7 @@ #### Libraries qt_find_package(Libproxy PROVIDED_TARGETS PkgConfig::Libproxy) -set_package_properties(Libproxy PROPERTIES TYPE OPTIONAL) qt_find_package(OpenSSL) -set_package_properties(OpenSSL PROPERTIES TYPE OPTIONAL) #### Tests diff --git a/src/plugins/sqldrivers/configure.cmake b/src/plugins/sqldrivers/configure.cmake index 9f0b0dfc7e..87728099d2 100644 --- a/src/plugins/sqldrivers/configure.cmake +++ b/src/plugins/sqldrivers/configure.cmake @@ -7,11 +7,8 @@ #### Libraries qt_find_package(PostgreSQL PROVIDED_TARGETS PostgreSQL::PostgreSQL) -set_package_properties(PostgreSQL PROPERTIES TYPE OPTIONAL) qt_find_package(ODBC PROVIDED_TARGETS ODBC::ODBC) -set_package_properties(ODBC PROPERTIES TYPE OPTIONAL) qt_find_package(SQLite3) -set_package_properties(SQLite3 PROPERTIES TYPE OPTIONAL) #### Tests diff --git a/src/printsupport/configure.cmake b/src/printsupport/configure.cmake index bede6a503b..c9b5f74750 100644 --- a/src/printsupport/configure.cmake +++ b/src/printsupport/configure.cmake @@ -7,7 +7,6 @@ #### Libraries qt_find_package(Cups PROVIDED_TARGETS Cups::Cups) -set_package_properties(Cups PROPERTIES TYPE OPTIONAL) #### Tests diff --git a/src/widgets/configure.cmake b/src/widgets/configure.cmake index a67e12646c..50a50f6b05 100644 --- a/src/widgets/configure.cmake +++ b/src/widgets/configure.cmake @@ -7,7 +7,6 @@ #### Libraries qt_find_package(GTK3) -set_package_properties(GTK3 PROPERTIES TYPE OPTIONAL) #### Tests diff --git a/util/cmake/configurejson2cmake.py b/util/cmake/configurejson2cmake.py index 15cd9bab47..fc6f9845a6 100755 --- a/util/cmake/configurejson2cmake.py +++ b/util/cmake/configurejson2cmake.py @@ -270,9 +270,8 @@ def parseLib(ctx, lib, data, cm_fh, cmake_find_packages_set): else: cm_fh.write('qt_find_package({})\n'.format(newlib)) - cm_fh.write('set_package_properties({} PROPERTIES TYPE {})\n' - .format(newlib, 'REQUIRED' if isRequired else 'OPTIONAL') - ) + if isRequired: + cm_fh.write('set_package_properties({} PROPERTIES TYPE REQUIRED)\n'.format(newlib)) def lineify(label, value, quote=True): if value: