summaryrefslogtreecommitdiffstats
path: root/cmake/3rdparty/extra-cmake-modules/find-modules
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/3rdparty/extra-cmake-modules/find-modules')
-rw-r--r--cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake9
-rw-r--r--cmake/3rdparty/extra-cmake-modules/find-modules/FindGLIB2.cmake72
-rw-r--r--cmake/3rdparty/extra-cmake-modules/find-modules/FindWaylandScanner.cmake3
-rw-r--r--cmake/3rdparty/extra-cmake-modules/find-modules/FindXCB.cmake14
4 files changed, 80 insertions, 18 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 1e13104187..24a194c9cb 100644
--- a/cmake/3rdparty/extra-cmake-modules/find-modules/FindGLIB2.cmake
+++ b/cmake/3rdparty/extra-cmake-modules/find-modules/FindGLIB2.cmake
@@ -64,6 +64,37 @@ find_library(GLIB2_LIBRARIES
HINTS ${PC_GLIB2_LIBDIR}
)
+pkg_check_modules(PC_GTHREAD2 QUIET gthread-2.0)
+
+find_library(GTHREAD2_LIBRARIES
+ NAMES gthread-2.0
+ 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)
@@ -75,24 +106,59 @@ 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 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)
set_target_properties(GLIB2::GLIB2 PROPERTIES
IMPORTED_LOCATION "${GLIB2_LIBRARIES}"
- INTERFACE_INCLUDE_DIRECTORIES "${GLIB2_INCLUDE_DIRS}")
+ INTERFACE_LINK_LIBRARIES "${GTHREAD2_LIBRARIES}"
+ 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"
)