summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Łoś <michal.los@siili.com>2024-10-01 15:34:16 +0200
committerMichał Łoś <michal.los@siili.com>2024-10-15 14:21:46 +0200
commit0ef988a03e2bff7e1869d4d166688dedc88a07cd (patch)
treedbae1ad3356797c3821f5324c6ffab65c1f79aa4
parentb44ecf0237e0cca2beb7c5e6600afd252f7e51c7 (diff)
Enable eglfs_kms building on VxWorks
VxWorks uses non-standard libraries naming and merges some other together. To fix this, in order to detect libdrm library, an alternative name needs to be used on VxWorks: `gfxLibDRM`, and search for `gfxMesaEGL` which contains `gbm` library symbols. This will enable building `eglfs_kms` plugin. Task-number: QTBUG-115777 Change-Id: I99b76596e9a46248407e8b846cf7507f436f1767 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--cmake/3rdparty/kwin/FindLibdrm.cmake11
-rw-r--r--cmake/3rdparty/kwin/Findgbm.cmake9
2 files changed, 15 insertions, 5 deletions
diff --git a/cmake/3rdparty/kwin/FindLibdrm.cmake b/cmake/3rdparty/kwin/FindLibdrm.cmake
index a94e7fbcb60..06147a62694 100644
--- a/cmake/3rdparty/kwin/FindLibdrm.cmake
+++ b/cmake/3rdparty/kwin/FindLibdrm.cmake
@@ -65,10 +65,13 @@ if(CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.12)
endif()
if(NOT WIN32)
- # Use pkg-config to get the directories and then use these values
- # in the FIND_PATH() and FIND_LIBRARY() calls
+ if (VXWORKS)
+ set(_vxworks_lib_search_path "$ENV{WIND_CC_SYSROOT}/usr/lib/common/")
+ set(_vxworks_lib_drm_library_name gfxLibDRM)
+ endif()
+
find_package(PkgConfig QUIET)
- pkg_check_modules(PKG_Libdrm QUIET libdrm)
+ pkg_check_modules(PKG_Libdrm QUIET libdrm ${_vxworks_lib_drm_library_name})
set(Libdrm_DEFINITIONS ${PKG_Libdrm_CFLAGS_OTHER})
set(Libdrm_VERSION ${PKG_Libdrm_VERSION})
@@ -84,8 +87,10 @@ if(NOT WIN32)
find_library(Libdrm_LIBRARY
NAMES
drm
+ ${_vxworks_lib_drm_library_name}
HINTS
${PKG_Libdrm_LIBRARY_DIRS}
+ "${_vxworks_lib_search_path}"
)
include(FindPackageHandleStandardArgs)
diff --git a/cmake/3rdparty/kwin/Findgbm.cmake b/cmake/3rdparty/kwin/Findgbm.cmake
index a77f7e86dbe..4ae5e449429 100644
--- a/cmake/3rdparty/kwin/Findgbm.cmake
+++ b/cmake/3rdparty/kwin/Findgbm.cmake
@@ -63,12 +63,15 @@ endif()
if(CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.12)
message(AUTHOR_WARNING "Your project should require at least CMake 2.8.12 to use Findgbm.cmake")
endif()
-
if(NOT WIN32)
+ if(VXWORKS)
+ set(_vxworks_lib_search_path "$ENV{WIND_CC_SYSROOT}/usr/lib/common/")
+ set(_vxworks_lib_gbm_library_name gfxMesaEGL)
+ endif()
# Use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
find_package(PkgConfig QUIET)
- pkg_check_modules(PKG_gbm QUIET gbm)
+ pkg_check_modules(PKG_gbm QUIET gbm "${_vxworks_lib_gbm_library_name}")
set(gbm_DEFINITIONS ${PKG_gbm_CFLAGS_OTHER})
set(gbm_VERSION ${PKG_gbm_VERSION})
@@ -82,8 +85,10 @@ if(NOT WIN32)
find_library(gbm_LIBRARY
NAMES
gbm
+ ${_vxworks_lib_gbm_library_name}
HINTS
${PKG_gbm_LIBRARY_DIRS}
+ "${_vxworks_lib_search_path}"
)
include(FindPackageHandleStandardArgs)