CMake: Add FindPPS and use it in src/corelib/configure.cmake
Find the PPS library and use the result PPS_FOUND in configure.cmake where needed. Change-Id: I08d3ace421278dc0ae5c3128d4234e6bca906c05 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This commit is contained in:
parent
bebbb41030
commit
e11522726b
19
cmake/FindPPS.cmake
Normal file
19
cmake/FindPPS.cmake
Normal file
@ -0,0 +1,19 @@
|
||||
# Find the PPS library
|
||||
|
||||
# Will make the target PPS::PPS available when found.
|
||||
|
||||
find_library(PPS_LIBRARY NAMES "pps")
|
||||
find_path(PPS_INCLUDE_DIR NAMES "sys/pps.h" DOC "The PPS Include path")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(PPS DEFAULT_MSG PPS_INCLUDE_DIR PPS_LIBRARY)
|
||||
|
||||
mark_as_advanced(PPS_INCLUDE_DIR PPS_LIBRARY)
|
||||
|
||||
if(PPS_FOUND)
|
||||
add_library(__PPS IMPORTED)
|
||||
target_link_libraries(__PPS INTERFACE ${PPS_LIBRARY})
|
||||
target_include_directories(__PPS INTERFACE ${PPS_INCLUDE_DIR})
|
||||
|
||||
add_library(PPS::PPS ALIAS __PPS)
|
||||
endif()
|
@ -508,7 +508,7 @@ extend_target(Core CONDITION QNX AND QT_FEATURE_qqnx_pps
|
||||
kernel/qppsattributeprivate_p.h
|
||||
kernel/qppsobject.cpp kernel/qppsobject_p.h
|
||||
kernel/qppsobjectprivate_p.h
|
||||
LIBRARIES pps
|
||||
LIBRARIES PPS::PPS
|
||||
)
|
||||
|
||||
## clock_gettime:
|
||||
|
@ -22,6 +22,8 @@ find_package(WrapRt)
|
||||
set_package_properties(WrapRt PROPERTIES TYPE OPTIONAL)
|
||||
find_package(PCRE2)
|
||||
set_package_properties(PCRE2 PROPERTIES TYPE REQUIRED)
|
||||
find_package(PPS)
|
||||
set_package_properties(PPS PROPERTIES TYPE OPTIONAL)
|
||||
|
||||
|
||||
#### Tests
|
||||
@ -460,7 +462,7 @@ qt_feature("poll_select" PUBLIC PRIVATE
|
||||
qt_feature_definition("poll_select" "QT_NO_NATIVE_POLL")
|
||||
qt_feature("qqnx_pps" PRIVATE
|
||||
LABEL "PPS"
|
||||
CONDITION libs.pps OR FIXME
|
||||
CONDITION PPS_FOUND
|
||||
EMIT_IF QNX
|
||||
)
|
||||
qt_feature("renameat2" PRIVATE
|
||||
|
@ -73,6 +73,7 @@ def map_library(lib: str) -> Union[str, LibraryMapping, List[str]]:
|
||||
'openssl_headers': LibraryMapping(package="OpenSSL", resultVariable="OPENSSL_INCLUDE_DIR", appendFoundSuffix=False),
|
||||
'pcre2': ['PCRE2', 'REQUIRED'],
|
||||
'posix_iconv': None,
|
||||
'pps': 'PPS',
|
||||
'sun_iconv': None,
|
||||
'udev': 'Libudev',
|
||||
'vulkan': 'Vulkan',
|
||||
|
Loading…
x
Reference in New Issue
Block a user