Add the unified PlatformGraphics module, which looks for either Integrity or VxWorks platform graphics. The PlatformGraphics module creates the interface PlatformGraphics::PlatformGraphics target which links the respective platform graphics target. It's expected that from the platform graphics targets to deliver the consistent subset of definitions, libraries, include directories, compiler and linker flags and also the special <platform>_REQUIRED_<LIBRARIES|INCLUDES|DEFINITIONS> variables. The <platform>_REQUIRED_<LIBRARIES|INCLUDES|DEFINITIONS> variables are consumed by the PlatformGraphics::PlatformGraphics and stored in the respective _qt_internal_platform_graphics_required_<type> property, to access the value without scope limitations. The property then is checked by the EGL and GLESv2 modules(this can be done elsewhere too) and is appended to the CMAKE_REQUIRED_<type> variable before running the respective compiler checks. Task-number: QTBUG-128455 Change-Id: Id1987c6294327509a14fbeeb7b8bf39aad6f486c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Karim Pinter <karim.pinter@qt.io>
26 lines
968 B
CMake
26 lines
968 B
CMake
# Copyright (C) 2024 The Qt Company Ltd.
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
#.rst:
|
|
# VxWorksPlatformGraphics
|
|
# ---------
|
|
find_package_handle_standard_args(VxWorksPlatformGraphics
|
|
FOUND_VAR
|
|
VxWorksPlatformGraphics_FOUND
|
|
REQUIRED_VARS
|
|
VxWorksPlatformGraphics_LIBRARIES_PACK
|
|
VxWorksPlatformGraphics_REQUIRED_LIBRARIES
|
|
)
|
|
|
|
if(VxWorksPlatformGraphics_FOUND
|
|
AND NOT TARGET VxWorksPlatformGraphics::VxWorksPlatformGraphics)
|
|
add_library(VxWorksPlatformGraphics::VxWorksPlatformGraphics INTERFACE IMPORTED)
|
|
set_target_properties(VxWorksPlatformGraphics::VxWorksPlatformGraphics PROPERTIES
|
|
INTERFACE_INCLUDE_DIRECTORIES "${VxWorksPlatformGraphics_INCLUDE_DIR}"
|
|
INTERFACE_LINK_LIBRARIES "${VxWorksPlatformGraphics_LIBRARIES_PACK}"
|
|
INTERFACE_COMPILE_DEFINITIONS "${VxWorksPlatformGraphics_DEFINES}"
|
|
)
|
|
set(VxWorksPlatformGraphics_REQUIRED_DEFINITIONS ${VxWorksPlatformGraphics_DEFINES})
|
|
endif()
|
|
|