diff options
Diffstat (limited to 'sources/shiboken6/ApiExtractor/CMakeLists.txt')
-rw-r--r-- | sources/shiboken6/ApiExtractor/CMakeLists.txt | 129 |
1 files changed, 85 insertions, 44 deletions
diff --git a/sources/shiboken6/ApiExtractor/CMakeLists.txt b/sources/shiboken6/ApiExtractor/CMakeLists.txt index 040d85f54..7aa2fbd11 100644 --- a/sources/shiboken6/ApiExtractor/CMakeLists.txt +++ b/sources/shiboken6/ApiExtractor/CMakeLists.txt @@ -1,50 +1,88 @@ +# Copyright (C) 2023 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + project(apiextractor) -cmake_minimum_required(VERSION 3.16) -cmake_policy(VERSION 3.16) +cmake_minimum_required(VERSION 3.18) +cmake_policy(VERSION 3.18) set(CMAKE_AUTOMOC ON) set(apiextractor_SRC -apiextractor.cpp -apiextractorresult.cpp -abstractmetaargument.cpp -abstractmetabuilder.cpp -abstractmetaenum.cpp -abstractmetafield.cpp -abstractmetafunction.cpp -abstractmetatype.cpp -abstractmetalang.cpp -codesniphelpers.cpp -conditionalstreamreader.cpp -documentation.cpp -enclosingclassmixin.cpp -fileout.cpp -messages.cpp -modifications.cpp -propertyspec.cpp -reporthandler.cpp -sourcelocation.cpp -typeparser.cpp -typesystem.cpp -typesystemparser.cpp -include.cpp -typedatabase.cpp -textstream.cpp +abstractmetaargument.cpp abstractmetaargument.h +abstractmetabuilder.cpp abstractmetabuilder.h abstractmetabuilder_p.h +abstractmetabuilder_helpers.cpp +abstractmetaenum.cpp abstractmetaenum.h +abstractmetafield.cpp abstractmetafield.h +abstractmetafunction.cpp abstractmetafunction.h +abstractmetalang.cpp abstractmetalang.h abstractmetalang_helpers.h abstractmetalang_typedefs.h +abstractmetatype.cpp abstractmetatype.h +addedfunction.cpp addedfunction.h addedfunction_p.h +anystringview_helpers.cpp anystringview_helpers.h +apiextractor.cpp apiextractor.h apiextractorflags.h +apiextractorresult.cpp apiextractorresult.h +arraytypeentry.h +classdocumentation.cpp classdocumentation.h +codesnip.cpp codesnip.h +codesniphelpers.cpp codesniphelpers.h +complextypeentry.h +conditionalstreamreader.cpp conditionalstreamreader.h +configurabletypeentry.h +constantvaluetypeentry.h +containertypeentry.h +customconversion.cpp customconversion.h customconversion_typedefs.h +customtypenentry.h +debughelpers_p.h +dependency.h +documentation.cpp documentation.h +dotview.cpp dotview.h +enclosingclassmixin.cpp enclosingclassmixin.h +enumtypeentry.h +enumvaluetypeentry.h +exception.h +fileout.cpp fileout.h +flagstypeentry.h +functiontypeentry.h +graph.h +header_paths.h +include.cpp include.h +messages.cpp messages.h +modifications.cpp modifications.h modifications_typedefs.h +namespacetypeentry.h +objecttypeentry.h +optionsparser.cpp optionsparser.h +predefined_templates.cpp predefined_templates.h +primitivetypeentry.h +propertyspec.cpp propertyspec.h +pymethoddefentry.cpp pymethoddefentry.h +pythontypeentry.h +reporthandler.cpp reporthandler.h +smartpointertypeentry.h +sourcelocation.cpp sourcelocation.h +templateargumententry.h +textstream.cpp textstream.h +typedatabase.cpp typedatabase.h typedatabase_p.h typedatabase_typedefs.h +typedefentry.h +typeparser.cpp typeparser.h +typesystem.cpp typesystem.h typesystem_enums.h typesystem_typedefs.h +typesystemparser.cpp typesystemparser_p.h +usingmember.h +valuetypeentry.h +varargstypeentry.h +voidtypeentry.h +xmlutils.cpp xmlutils.h xmlutils_libxslt.h xmlutils_qt.h # Clang -clangparser/compilersupport.cpp -clangparser/clangparser.cpp -clangparser/clangbuilder.cpp -clangparser/clangdebugutils.cpp -clangparser/clangutils.cpp +clangparser/clangbuilder.cpp clangparser/clangbuilder.h +clangparser/clangdebugutils.cpp clangparser/clangdebugutils.h +clangparser/clangparser.cpp clangparser/clangparser.h +clangparser/clangutils.cpp clangparser/clangutils.h +clangparser/compilersupport.cpp clangparser/compilersupport.h # Old parser -parser/typeinfo.cpp -parser/codemodel.cpp -parser/enumvalue.cpp -xmlutils.cpp +parser/codemodel.cpp parser/codemodel.h parser/codemodel_fwd.h parser/codemodel_enums.h +parser/enumvalue.cpp parser/enumvalue.h +parser/typeinfo.cpp parser/typeinfo.h ) -find_package(Qt${QT_MAJOR_VERSION}Xml 6.0) find_package(LibXml2 2.6.32) find_package(LibXslt 1.1.19) @@ -56,7 +94,7 @@ endif() if(NOT HAS_LIBXSLT) set(DISABLE_DOCSTRINGS TRUE) message(WARNING - "Documentation will not be built due to missing dependency (no Qt5XmlPatterns found).") + "Documentation will not be built due to missing dependency (libxslt not found).") endif() # Export to parent scope so that generator/CMakeLists.txt gets it @@ -67,7 +105,7 @@ target_include_directories(apiextractor PRIVATE ${CLANG_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/parser) -target_link_libraries(apiextractor PUBLIC Qt${QT_MAJOR_VERSION}::Core) +target_link_libraries(apiextractor PUBLIC Qt::Core) target_link_libraries(apiextractor PRIVATE libclang) if (HAS_LIBXSLT) @@ -80,17 +118,20 @@ if (HAS_LIBXSLT) endif() if (NOT DISABLE_DOCSTRINGS) - target_sources(apiextractor PRIVATE docparser.cpp - doxygenparser.cpp - qtdocparser.cpp) + target_sources(apiextractor PRIVATE + docparser.cpp docparser.h + doxygenparser.cpp doxygenparser.h + qtdocparser.cpp qtdocparser.h) endif() -target_compile_definitions(apiextractor PRIVATE CMAKE_CXX_COMPILER="${CMAKE_CXX_COMPILER}") +target_compile_definitions(apiextractor + PRIVATE CMAKE_CXX_COMPILER="${CMAKE_CXX_COMPILER}" + PRIVATE QT_LEAN_HEADERS=1) set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE) if (BUILD_TESTS) - find_package(Qt${QT_MAJOR_VERSION}Test 6.0 REQUIRED) + find_package(Qt6 REQUIRED COMPONENTS Test) set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/tests) enable_testing() add_subdirectory(tests) |