diff options
Diffstat (limited to 'cmake/3rdparty')
8 files changed, 181 insertions, 131 deletions
diff --git a/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake b/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake index 16dc1768ea..9ac8e2fa0c 100644 --- a/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake +++ b/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake @@ -120,11 +120,16 @@ list(APPEND CMAKE_REQUIRED_LIBRARIES "${EGL_LIBRARY}") list(APPEND CMAKE_REQUIRED_INCLUDES "${EGL_INCLUDE_DIR}") list(APPEND CMAKE_REQUIRED_DEFINITIONS "${EGL_DEFINITIONS}") +if(_qt_igy_gui_libs) + list(APPEND CMAKE_REQUIRED_LIBRARIES "${_qt_igy_gui_libs}") +endif() + check_cxx_source_compiles(" #include <EGL/egl.h> -int main(int argc, char *argv[]) { - EGLint x = 0; EGLDisplay dpy = 0; EGLContext ctx = 0; +int main(int, char **) { + [[maybe_unused]] EGLint x = 0; + EGLDisplay dpy = 0; EGLContext ctx = 0; eglDestroyContext(dpy, ctx); }" HAVE_EGL) diff --git a/cmake/3rdparty/extra-cmake-modules/find-modules/FindGLIB2.cmake b/cmake/3rdparty/extra-cmake-modules/find-modules/FindGLIB2.cmake index 8f873c1b45..24a194c9cb 100644 --- a/cmake/3rdparty/extra-cmake-modules/find-modules/FindGLIB2.cmake +++ b/cmake/3rdparty/extra-cmake-modules/find-modules/FindGLIB2.cmake @@ -71,6 +71,30 @@ find_library(GTHREAD2_LIBRARIES HINTS ${PC_GTHREAD2_LIBDIR} ) +pkg_check_modules(PC_GOBJECT QUIET gobject-2.0) + +find_path(GLIB2_GOBJECT_INCLUDE_DIRS + NAMES glib-object.h + HINTS ${PC_GOBJECT_INCLUDEDIR} + PATH_SUFFIXES glib-2.0) + +find_library(GLIB2_GOBJECT_LIBRARIES + NAMES gobject-2.0 + HINTS ${PC_GOBJECT_LIBDIR} +) + +pkg_check_modules(PC_GIO QUIET gio-2.0) + +find_path(GLIB2_GIO_INCLUDE_DIRS + NAMES gio/gio.h + HINTS ${PC_GIO_INCLUDEDIR} + PATH_SUFFIXES glib-2.0) + +find_library(GLIB2_GIO_LIBRARIES + NAMES gio-2.0 + HINTS ${PC_GIO_LIBDIR} +) + # search the glibconfig.h include dir under the same root where the library is found get_filename_component(glib2LibDir "${GLIB2_LIBRARIES}" PATH) @@ -82,14 +106,30 @@ find_path(GLIB2_INTERNAL_INCLUDE_DIR glibconfig.h # for now it is optional if(GLIB2_INTERNAL_INCLUDE_DIR) list(APPEND GLIB2_INCLUDE_DIRS "${GLIB2_INTERNAL_INCLUDE_DIR}") + list(APPEND GLIB2_GOBJECT_INCLUDE_DIRS "${GLIB2_INTERNAL_INCLUDE_DIR}") + list(APPEND GLIB2_GIO_INCLUDE_DIRS "${GLIB2_INTERNAL_INCLUDE_DIR}") endif() # Deprecated synonyms set(GLIB2_INCLUDE_DIR "${GLIB2_INCLUDE_DIRS}") set(GLIB2_LIBRARY "${GLIB2_LIBRARIES}") +set(GLIB2_GOBJECT_INCLUDE_DIR "${GLIB2_GOBJECT_INCLUDE_DIRS}") +set(GLIB2_GOBJECT_LIBRARY "${GLIB2_GOBJECT_LIBRARIES}") +set(GLIB2_GIO_INCLUDE_DIR "${GLIB2_GIO_INCLUDE_DIRS}") +set(GLIB2_GIO_LIBRARY "${GLIB2_GIO_LIBRARIES}") + +if(GLIB2_GOBJECT_LIBRARIES AND GLIB2_GOBJECT_INCLUDE_DIRS) + set(GLIB2_GOBJECT_FOUND TRUE) +endif() + +if(GLIB2_GIO_LIBRARIES AND GLIB2_GIO_INCLUDE_DIRS) + set(GLIB2_GIO_FOUND TRUE) +endif() include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(GLIB2 DEFAULT_MSG GLIB2_LIBRARIES GTHREAD2_LIBRARIES GLIB2_INCLUDE_DIRS) +find_package_handle_standard_args(GLIB2 + REQUIRED_VARS GLIB2_LIBRARIES GTHREAD2_LIBRARIES GLIB2_INCLUDE_DIRS + HANDLE_COMPONENTS) if(GLIB2_FOUND AND NOT TARGET GLIB2::GLIB2) add_library(GLIB2::GLIB2 UNKNOWN IMPORTED) @@ -99,8 +139,26 @@ if(GLIB2_FOUND AND NOT TARGET GLIB2::GLIB2) INTERFACE_INCLUDE_DIRECTORIES "${GLIB2_INCLUDE_DIRS}") endif() +if(GLIB2_GOBJECT_FOUND AND NOT TARGET GLIB2::GOBJECT) + add_library(GLIB2::GOBJECT UNKNOWN IMPORTED) + set_target_properties(GLIB2::GOBJECT PROPERTIES + IMPORTED_LOCATION "${GLIB2_GOBJECT_LIBRARIES}" + INTERFACE_INCLUDE_DIRECTORIES "${GLIB2_GOBJECT_INCLUDE_DIRS}") +endif() + +if(GLIB2_GIO_FOUND AND NOT TARGET GLIB2::GIO) + add_library(GLIB2::GIO UNKNOWN IMPORTED) + set_target_properties(GLIB2::GIO PROPERTIES + IMPORTED_LOCATION "${GLIB2_GIO_LIBRARIES}" + INTERFACE_INCLUDE_DIRECTORIES "${GLIB2_GIO_INCLUDE_DIRS}") +endif() + mark_as_advanced(GLIB2_INCLUDE_DIRS GLIB2_INCLUDE_DIR - GLIB2_LIBRARIES GLIB2_LIBRARY) + GLIB2_LIBRARIES GLIB2_LIBRARY + GLIB2_GOBJECT_INCLUDE_DIRS GLIB2_GOBJECT_INCLUDE_DIR + GLIB2_GOBJECT_LIBRARIES GLIB2_GOBJECT_LIBRARY + GLIB2_GIO_INCLUDE_DIRS GLIB2_GIO_INCLUDE_DIR + GLIB2_GIO_LIBRARIES GLIB2_GIO_LIBRARY) include(FeatureSummary) set_package_properties(GLIB2 PROPERTIES diff --git a/cmake/3rdparty/extra-cmake-modules/find-modules/FindWaylandScanner.cmake b/cmake/3rdparty/extra-cmake-modules/find-modules/FindWaylandScanner.cmake index 13291afcda..60adaf4184 100644 --- a/cmake/3rdparty/extra-cmake-modules/find-modules/FindWaylandScanner.cmake +++ b/cmake/3rdparty/extra-cmake-modules/find-modules/FindWaylandScanner.cmake @@ -107,9 +107,6 @@ set_package_properties(WaylandScanner PROPERTIES DESCRIPTION "Executable that converts XML protocol files to C code" ) - -include(CMakeParseArguments) - function(ecm_add_wayland_client_protocol out_var) # Parse arguments set(oneValueArgs PROTOCOL BASENAME) diff --git a/cmake/3rdparty/extra-cmake-modules/find-modules/FindXCB.cmake b/cmake/3rdparty/extra-cmake-modules/find-modules/FindXCB.cmake index d530d2d7f4..26b9bf8963 100644 --- a/cmake/3rdparty/extra-cmake-modules/find-modules/FindXCB.cmake +++ b/cmake/3rdparty/extra-cmake-modules/find-modules/FindXCB.cmake @@ -129,10 +129,6 @@ set(XCB_known_components XVMC ) -# XINPUT is unstable; do not include it by default -set(XCB_default_components ${XCB_known_components}) -list(REMOVE_ITEM XCB_default_components "XINPUT") - # default component info: xcb components have fairly predictable # header files, library names and pkg-config names foreach(_comp ${XCB_known_components}) @@ -141,6 +137,9 @@ foreach(_comp ${XCB_known_components}) set(XCB_${_comp}_pkg_config "xcb-${_lc_comp}") set(XCB_${_comp}_lib "xcb-${_lc_comp}") set(XCB_${_comp}_header "xcb/${_lc_comp}.h") + if(USE_XCB_${_comp}_STATIC) + set(XCB_${_comp}_lib "lib${XCB_${_comp}_lib}.a") + endif() endforeach() # exceptions set(XCB_XCB_component_deps) @@ -175,11 +174,6 @@ ecm_find_package_parse_components(XCB DEFAULT_COMPONENTS ${XCB_default_components} ) -list(FIND XCB_components "XINPUT" _XCB_XINPUT_index) -if (NOT _XCB_XINPUT_index EQUAL -1) - message(AUTHOR_WARNING "XINPUT from XCB was requested: this is EXPERIMENTAL and is likely to unavailable on many systems!") -endif() - ecm_find_package_handle_library_components(XCB COMPONENTS ${XCB_components} ) @@ -196,6 +190,6 @@ find_package_handle_standard_args(XCB include(FeatureSummary) set_package_properties(XCB PROPERTIES - URL "http://xcb.freedesktop.org" + URL "https://xcb.freedesktop.org/" DESCRIPTION "X protocol C-language Binding" ) diff --git a/cmake/3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers.cmake b/cmake/3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers.cmake index 4c43e99b6b..15610587bd 100644 --- a/cmake/3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers.cmake +++ b/cmake/3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers.cmake @@ -1,104 +1,83 @@ -#.rst: -# ECMEnableSanitizers -# ------------------- +# SPDX-FileCopyrightText: 2014 Mathieu Tarral <mathieu.tarral@gmail.com> # -# Enable compiler sanitizer flags. -# -# The following sanitizers are supported: -# -# - Address Sanitizer -# - Memory Sanitizer -# - Thread Sanitizer -# - Leak Sanitizer -# - Undefined Behaviour Sanitizer -# -# All of them are implemented in Clang, depending on your version, and -# there is an work in progress in GCC, where some of them are currently -# implemented. -# -# This module will check your current compiler version to see if it -# supports the sanitizers that you want to enable -# -# Usage -# ===== -# -# Simply add:: -# -# include(ECMEnableSanitizers) -# -# to your ``CMakeLists.txt``. Note that this module is included in -# KDECompilerSettings, so projects using that module do not need to also -# include this one. -# -# The sanitizers are not enabled by default. Instead, you must set -# ``ECM_ENABLE_SANITIZERS`` (either in your ``CMakeLists.txt`` or on the -# command line) to a semicolon-separated list of sanitizers you wish to enable. -# The options are: -# -# - address -# - memory -# - thread -# - leak -# - undefined -# - fuzzer-no-link -# - fuzzer -# -# The sanitizers "address", "memory" and "thread" are mutually exclusive. You -# cannot enable two of them in the same build. -# -# "leak" requires the "address" sanitizer. -# -# .. note:: -# -# To reduce the overhead induced by the instrumentation of the sanitizers, it -# is advised to enable compiler optimizations (``-O1`` or higher). -# -# Example -# ======= -# -# This is an example of usage:: -# -# mkdir build -# cd build -# cmake -DECM_ENABLE_SANITIZERS='address;leak;undefined' .. -# -# .. note:: -# -# Most of the sanitizers will require Clang. To enable it, use:: -# -# -DCMAKE_CXX_COMPILER=clang++ -# -# Since 1.3.0. +# SPDX-License-Identifier: BSD-3-Clause -#============================================================================= -# Copyright 2014 Mathieu Tarral <mathieu.tarral@gmail.com> -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#[=======================================================================[.rst: +ECMEnableSanitizers +------------------- + +Enable compiler sanitizer flags. + +The following sanitizers are supported: + +- Address Sanitizer +- Memory Sanitizer +- Thread Sanitizer +- Leak Sanitizer +- Undefined Behaviour Sanitizer + +All of them are implemented in Clang, depending on your version, and +there is an work in progress in GCC, where some of them are currently +implemented. + +This module will check your current compiler version to see if it +supports the sanitizers that you want to enable + +Usage +===== + +Simply add:: + + include(ECMEnableSanitizers) + +to your ``CMakeLists.txt``. Note that this module is included in +KDECompilerSettings, so projects using that module do not need to also +include this one. + +The sanitizers are not enabled by default. Instead, you must set +``ECM_ENABLE_SANITIZERS`` (either in your ``CMakeLists.txt`` or on the +command line) to a semicolon-separated list of sanitizers you wish to enable. +The options are: + +- address +- memory +- thread +- leak +- undefined +- fuzzer-no-link +- fuzzer + +The sanitizers "address", "memory" and "thread" are mutually exclusive. You +cannot enable two of them in the same build. + +"leak" requires the "address" sanitizer. + +.. note:: + + To reduce the overhead induced by the instrumentation of the sanitizers, it + is advised to enable compiler optimizations (``-O1`` or higher). + +Example +======= + +This is an example of usage:: + + mkdir build + cd build + cmake -DECM_ENABLE_SANITIZERS='address;leak;undefined' .. + +.. note:: + + Most of the sanitizers will require Clang. To enable it, use:: + + -DCMAKE_CXX_COMPILER=clang++ + +Since 1.3.0. +#]=======================================================================] # MACRO check_compiler_version #----------------------------- -macro (check_compiler_version gcc_required_version clang_required_version) +macro (check_compiler_version gcc_required_version clang_required_version msvc_required_version) if ( ( CMAKE_CXX_COMPILER_ID MATCHES "GNU" @@ -111,12 +90,19 @@ macro (check_compiler_version gcc_required_version clang_required_version) AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${clang_required_version} ) + OR + ( + CMAKE_CXX_COMPILER_ID MATCHES "MSVC" + AND + CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${msvc_required_version} + ) ) # error ! message(FATAL_ERROR "You ask to enable the sanitizer ${CUR_SANITIZER}, but your compiler ${CMAKE_CXX_COMPILER_ID} version ${CMAKE_CXX_COMPILER_VERSION} does not support it ! - You should use at least GCC ${gcc_required_version} or Clang ${clang_required_version} + You should use at least GCC ${gcc_required_version}, Clang ${clang_required_version} + or MSVC ${msvc_required_version} (99.99 means not implemented yet)") endif () endmacro () @@ -125,29 +111,33 @@ endmacro () #------------------------------ macro (enable_sanitizer_flags sanitize_option) if (${sanitize_option} MATCHES "address") - check_compiler_version("4.8" "3.1") - set(XSAN_COMPILE_FLAGS "-fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls") - set(XSAN_LINKER_FLAGS "asan") + check_compiler_version("4.8" "3.1" "19.28") + if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + set(XSAN_COMPILE_FLAGS "-fsanitize=address") + else() + set(XSAN_COMPILE_FLAGS "-fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls") + set(XSAN_LINKER_FLAGS "asan") + endif() elseif (${sanitize_option} MATCHES "thread") - check_compiler_version("4.8" "3.1") + check_compiler_version("4.8" "3.1" "99.99") set(XSAN_COMPILE_FLAGS "-fsanitize=thread") set(XSAN_LINKER_FLAGS "tsan") elseif (${sanitize_option} MATCHES "memory") - check_compiler_version("99.99" "3.1") + check_compiler_version("99.99" "3.1" "99.99") set(XSAN_COMPILE_FLAGS "-fsanitize=memory") elseif (${sanitize_option} MATCHES "leak") - check_compiler_version("4.9" "3.4") + check_compiler_version("4.9" "3.4" "99.99") set(XSAN_COMPILE_FLAGS "-fsanitize=leak") set(XSAN_LINKER_FLAGS "lsan") elseif (${sanitize_option} MATCHES "undefined") - check_compiler_version("4.9" "3.1") + check_compiler_version("4.9" "3.1" "99.99") set(XSAN_COMPILE_FLAGS "-fsanitize=undefined -fsanitize=float-divide-by-zero -fno-omit-frame-pointer -fno-optimize-sibling-calls") elseif (${sanitize_option} MATCHES "fuzzer-no-link") - check_compiler_version("99.99" "6.0") + check_compiler_version("99.99" "6.0" "99.99") set(XSAN_COMPILE_FLAGS "-fsanitize=fuzzer-no-link") set(XSAN_LINKER_FLAGS "-fsanitize=fuzzer-no-link") elseif (${sanitize_option} MATCHES "fuzzer") - check_compiler_version("99.99" "6.0") + check_compiler_version("99.99" "6.0" "99.99") set(XSAN_COMPILE_FLAGS "-fsanitize=fuzzer") else () message(FATAL_ERROR "Compiler sanitizer option \"${sanitize_option}\" not supported.") @@ -155,7 +145,7 @@ macro (enable_sanitizer_flags sanitize_option) endmacro () if (ECM_ENABLE_SANITIZERS) - if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") + if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "MSVC") # for each element of the ECM_ENABLE_SANITIZERS list foreach ( CUR_SANITIZER ${ECM_ENABLE_SANITIZERS} ) # lowercase filter @@ -168,7 +158,15 @@ if (ECM_ENABLE_SANITIZERS) endif() set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${XSAN_COMPILE_FLAGS}" ) if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") - link_libraries(${XSAN_LINKER_FLAGS}) + string(JOIN "" linker_flags + "$<" + "$<NOT:" + "$<BOOL:$<TARGET_PROPERTY:SKIP_SANITIZER>>" + ">:" + "${XSAN_LINKER_FLAGS}" + ">" + ) + link_libraries("${linker_flags}") endif() if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") string(REPLACE "-Wl,--no-undefined" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}") diff --git a/cmake/3rdparty/extra-cmake-modules/modules/ECMFindModuleHelpers.cmake b/cmake/3rdparty/extra-cmake-modules/modules/ECMFindModuleHelpers.cmake index c1df19d504..a5dabb1074 100644 --- a/cmake/3rdparty/extra-cmake-modules/modules/ECMFindModuleHelpers.cmake +++ b/cmake/3rdparty/extra-cmake-modules/modules/ECMFindModuleHelpers.cmake @@ -68,7 +68,7 @@ # If SKIP_DEPENDENCY_HANDLING is not set, the INTERFACE_LINK_LIBRARIES property # of the imported target for <component> will be set to contain the imported # targets for the components listed in <name>_<component>_component_deps. -# <component>_FOUND will also be set to false if any of the compoments in +# <component>_FOUND will also be set to false if any of the components in # <name>_<component>_component_deps are not found. This requires the components # in <name>_<component>_component_deps to be listed before <component> in the # COMPONENTS argument. @@ -123,8 +123,6 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -include(CMakeParseArguments) - macro(ecm_find_package_version_check module_name) if(CMAKE_VERSION VERSION_LESS 2.8.12) message(FATAL_ERROR "CMake 2.8.12 is required by Find${module_name}.cmake") diff --git a/cmake/3rdparty/extra-cmake-modules/qt_attribution.json b/cmake/3rdparty/extra-cmake-modules/qt_attribution.json index cebebf82eb..1839af3690 100644 --- a/cmake/3rdparty/extra-cmake-modules/qt_attribution.json +++ b/cmake/3rdparty/extra-cmake-modules/qt_attribution.json @@ -6,10 +6,10 @@ "Description": "Additional CMake modules.", "Homepage": "https://api.kde.org/ecm/", - "Version": "5.50.0", + "Version": "5.84.0", "License": "BSD-3-Clause", - "LicenseId": "BSD 3-Clause License", + "LicenseId": "BSD-3-Clause", "LicenseFile": "COPYING-CMAKE-SCRIPTS", "Copyright": "Copyright © 2011-2018 The KDE community" } diff --git a/cmake/3rdparty/kwin/qt_attribution.json b/cmake/3rdparty/kwin/qt_attribution.json index 5c22641132..fef6bbe4c3 100644 --- a/cmake/3rdparty/kwin/qt_attribution.json +++ b/cmake/3rdparty/kwin/qt_attribution.json @@ -9,7 +9,7 @@ "Version": "5.13.4", "License": "BSD-3-Clause", - "LicenseId": "BSD 3-Clause License", + "LicenseId": "BSD-3-Clause", "LicenseFile": "COPYING-CMAKE-SCRIPTS", "Copyright": "Copyright 2014 Alex Merry <alex.merry@kde.org> Copyright 2014 Martin Gräßlin <mgraesslin@kde.org>, |