Augment conversion scripts with requirements for qttools
The libclang test is implemented as a custom FindWrapLibClang module. The module does mostly the same things as the configure test in qmake land. Change-Id: I965f284baf7daef074e22f033047c35a917c8808 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
parent
486da5a84d
commit
5a5dc6294b
@ -32,6 +32,7 @@ import os.path
|
||||
import re
|
||||
import sys
|
||||
from typing import Set, Union, List, Dict
|
||||
from textwrap import dedent
|
||||
|
||||
from helper import map_qt_library, featureName, map_platform, \
|
||||
find_3rd_party_library_mapping, generate_find_package_info
|
||||
@ -80,6 +81,7 @@ def map_tests(test: str) -> str:
|
||||
'fsgsbase': 'TEST_subarch_fsgsbase',
|
||||
'gfni': 'TEST_subarch_gfni',
|
||||
'ibt': 'TEST_subarch_ibt',
|
||||
'libclang': 'TEST_libclang',
|
||||
'lwp': 'TEST_subarch_lwp',
|
||||
'lzcnt': 'TEST_subarch_lzcnt',
|
||||
'mmx': 'TEST_subarch_mmx',
|
||||
@ -590,6 +592,19 @@ def parseTest(ctx, test, data, cm_fh):
|
||||
cm_fh.write(qmakeFixme)
|
||||
cm_fh.write(")\n\n")
|
||||
|
||||
elif data["type"] == "libclang":
|
||||
knownTests.add(test)
|
||||
|
||||
cm_fh.write("# {}\n".format(test))
|
||||
lib_clang_lib = find_3rd_party_library_mapping("libclang")
|
||||
cm_fh.write(generate_find_package_info(lib_clang_lib))
|
||||
cm_fh.write(dedent("""
|
||||
if(TARGET WrapLibClang::WrapLibClang)
|
||||
set(TEST_libclang "ON" CACHE BOOL "Required libclang version found." FORCE)
|
||||
endif()
|
||||
"""))
|
||||
cm_fh.write("\n")
|
||||
|
||||
elif data["type"] == "x86Simd":
|
||||
knownTests.add(test)
|
||||
|
||||
|
@ -203,6 +203,7 @@ _library_map = [
|
||||
LibraryMapping('journald', 'Libsystemd', 'PkgConfig::Libsystemd'),
|
||||
LibraryMapping('jpeg', 'JPEG', 'JPEG::JPEG'), # see also libjpeg
|
||||
LibraryMapping('libatomic', 'Atomic', 'Atomic'),
|
||||
LibraryMapping('libclang', 'WrapLibClang', 'WrapLibClang::WrapLibClang'),
|
||||
LibraryMapping('libdl', None, '${CMAKE_DL_LIBS}'),
|
||||
LibraryMapping('libinput', 'Libinput', 'Libinput::Libinput'),
|
||||
LibraryMapping('libjpeg', 'JPEG', 'JPEG::JPEG'), # see also jpeg
|
||||
|
Loading…
Reference in New Issue
Block a user