CMake: Allow building bundled 3rd party libraries in qtbase
A few things are needed to accomplish that: - the python scripts do not ignore certain system_foo features anymore (it is a hardcoded list for now just to be safe) - configurejson2cmake now outputs qt_find_package(WrapSystemFoo) calls for bundled libraries (see below) - the harfbuzz .pro file is modified to accommodate pro2cmake not being able to correctly parse some conditional scopes - the freetype .pro file is modified to make sure linking of the library succeeds without duplicate symbol errors, which qmake doesn't encounter due to magical exclusion of cpp files that are included in other cpp files (presumably for include moc_foo.cpp support) - feature evaluation for Core, Gui, Network now happens in the qtbase/src directory, so that bundled libraries can be conditionally built - for each bundled library there are now two FindWrap scripts: - FindWrapSystemFoo which finds an installed library in the system - FindWrapFoo which either uses the system installed library or the built bundled one depending on a condition - projects that intend to use bundled libraries need to link against WrapFoo::WrapFoo instead of WrapSystemFoo::WrapSystemFoo targets (this is handled by pro2cmake). Unfortunately manually added qt_find_package(WrapFoo) calls might still be needed as is the case for WrapFreetype and others. - a new cmake/QtFindWrapHelper.cmake file is added that provides a macro to simplify creation of WrapFoo targets that link against a bundled or system library. The implementation is fairly ugly due to CMake macro constraints, but it was deemed better than copy-pasting a bunch of almost identical code across all FindWrapFoo.cmake files. - a qtzlib header-only module is now created when using bundled zlib, to provide public syncqt created headers for consumers that need them. These are projects that have 'QT_PRIVATE += zlib-private' in their .pro files (e.g. qtimageformats, qtlocation, qt3d, etc.) This is unfortunately needed due to QtNetwork using zlib types in its private C++ API. The change includes support for building the following bundled libraries: - zlib - libpng - libjpeg - Freetype - Harfbuzz-ng - PCRE2 The following 3rd party libraries are still using an old implementation within the CMake build system, and should be migrated to the new one in the near future: - double-conversion - Old harfbuzz The are a few libraries that are not yet ported: - system-sqlite - systemxcb - maybe others Among other things, this change allows building qtbase on Windows without requiring vcpkg. Task-number: QTBUG-82167 Change-Id: I35ecea0d832f66c1943c82e618de4a51440971a5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
This commit is contained in:
parent
1b47411832
commit
26059d1b9b
@ -1,33 +1,17 @@
|
||||
# We can't create the same interface imported target multiple times, CMake will complain if we do
|
||||
# that. This can happen if the find_package call is done in multiple different subdirectories.
|
||||
if(TARGET WrapFreetype::WrapFreetype)
|
||||
set(WrapFreetype_FOUND ON)
|
||||
return()
|
||||
include(QtFindWrapHelper NO_POLICY_SCOPE)
|
||||
|
||||
set(_qt_wrap_use_bundled FALSE)
|
||||
if(QT_FEATURE_freetype AND NOT QT_FEATURE_system_freetype)
|
||||
set(_qt_wrap_use_bundled TRUE)
|
||||
endif()
|
||||
|
||||
set(WrapFreetype_FOUND OFF)
|
||||
|
||||
# Hunter has the package named freetype, but exports the Freetype::Freetype target as upstream
|
||||
# First try the CONFIG package, and afterwards the MODULE if not found
|
||||
|
||||
find_package(Freetype CONFIG NAMES Freetype freetype QUIET)
|
||||
if(NOT Freetype_FOUND)
|
||||
find_package(Freetype MODULE)
|
||||
endif()
|
||||
|
||||
if(Freetype_FOUND)
|
||||
# vcpkg defines a lower case target name, while upstream Find module defines a prefixed
|
||||
# upper case name.
|
||||
set(potential_target_names Freetype::Freetype freetype)
|
||||
foreach(target_name ${potential_target_names})
|
||||
if(TARGET ${target_name})
|
||||
set(WrapFreetype_FOUND ON)
|
||||
set(final_target_name ${target_name})
|
||||
|
||||
add_library(WrapFreetype::WrapFreetype INTERFACE IMPORTED)
|
||||
target_link_libraries(WrapFreetype::WrapFreetype INTERFACE ${final_target_name})
|
||||
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
qt_find_package_system_or_bundled(wrap_freetype
|
||||
FRIENDLY_PACKAGE_NAME "Freetype"
|
||||
WRAP_PACKAGE_TARGET "WrapFreetype::WrapFreetype"
|
||||
WRAP_PACKAGE_FOUND_VAR_NAME "WrapFreetype_FOUND"
|
||||
BUNDLED_PACKAGE_NAME "Qt6BundledFreetype"
|
||||
BUNDLED_PACKAGE_TARGET "Qt6::BundledFreetype"
|
||||
SYSTEM_PACKAGE_NAME "WrapSystemFreetype"
|
||||
SYSTEM_PACKAGE_TARGET "WrapSystemFreetype::WrapSystemFreetype"
|
||||
USE_BUNDLED_PACKAGE "${_qt_wrap_use_bundled}"
|
||||
)
|
||||
|
@ -1,45 +1,17 @@
|
||||
# We can't create the same interface imported target multiple times, CMake will complain if we do
|
||||
# that. This can happen if the find_package call is done in multiple different subdirectories.
|
||||
if(TARGET WrapHarfbuzz::WrapHarfbuzz)
|
||||
set(WrapHarfbuzz_FOUND ON)
|
||||
return()
|
||||
include(QtFindWrapHelper NO_POLICY_SCOPE)
|
||||
|
||||
set(_qt_wrap_use_bundled FALSE)
|
||||
if(QT_FEATURE_harfbuzz AND NOT QT_FEATURE_system_harfbuzz)
|
||||
set(_qt_wrap_use_bundled TRUE)
|
||||
endif()
|
||||
|
||||
set(WrapHarfbuzz_FOUND OFF)
|
||||
|
||||
find_package(harfbuzz)
|
||||
|
||||
# Gentoo has some buggy version of a harfbuzz Config file. Check if include paths are valid.
|
||||
set(__harfbuzz_target_name "harfbuzz::harfbuzz")
|
||||
if(harfbuzz_FOUND AND TARGET "${__harfbuzz_target_name}")
|
||||
get_property(__harfbuzz_include_paths TARGET "${__harfbuzz_target_name}"
|
||||
PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
|
||||
foreach(__harfbuzz_include_dir ${__harfbuzz_include_paths})
|
||||
if(NOT EXISTS "${__harfbuzz_include_dir}")
|
||||
# Must be the broken Gentoo harfbuzzConfig.cmake file. Try to use pkg-config instead.
|
||||
set(__harfbuzz_broken_config_file TRUE)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(__harfbuzz_broken_config_file)
|
||||
find_package(PkgConfig)
|
||||
|
||||
pkg_check_modules(harfbuzz harfbuzz IMPORTED_TARGET)
|
||||
set(__harfbuzz_target_name "PkgConfig::harfbuzz")
|
||||
|
||||
if (NOT TARGET "${__harfbuzz_target_name}")
|
||||
set(harfbuzz_FOUND 0)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(TARGET "${__harfbuzz_target_name}")
|
||||
set(WrapHarfbuzz_FOUND ON)
|
||||
|
||||
add_library(WrapHarfbuzz::WrapHarfbuzz INTERFACE IMPORTED)
|
||||
target_link_libraries(WrapHarfbuzz::WrapHarfbuzz INTERFACE ${__harfbuzz_target_name})
|
||||
endif()
|
||||
unset(__harfbuzz_target_name)
|
||||
unset(__harfbuzz_include_dir)
|
||||
unset(__harfbuzz_broken_config_file)
|
||||
qt_find_package_system_or_bundled(wrap_harfbuzz
|
||||
FRIENDLY_PACKAGE_NAME "Harfbuzz"
|
||||
WRAP_PACKAGE_TARGET "WrapHarfbuzz::WrapHarfbuzz"
|
||||
WRAP_PACKAGE_FOUND_VAR_NAME "WrapHarfbuzz_FOUND"
|
||||
BUNDLED_PACKAGE_NAME "Qt6BundledHarfbuzz"
|
||||
BUNDLED_PACKAGE_TARGET "Qt6::BundledHarfbuzz"
|
||||
SYSTEM_PACKAGE_NAME "WrapSystemHarfbuzz"
|
||||
SYSTEM_PACKAGE_TARGET "WrapSystemHarfbuzz::WrapSystemHarfbuzz"
|
||||
USE_BUNDLED_PACKAGE "${_qt_wrap_use_bundled}"
|
||||
)
|
||||
|
@ -1,23 +1,17 @@
|
||||
if(TARGET WrapPCRE2::WrapPCRE2)
|
||||
set(WrapPCRE2_FOUND TRUE)
|
||||
return()
|
||||
include(QtFindWrapHelper NO_POLICY_SCOPE)
|
||||
|
||||
set(_qt_wrap_use_bundled FALSE)
|
||||
if(QT_FEATURE_pcre2 AND NOT QT_FEATURE_system_pcre2)
|
||||
set(_qt_wrap_use_bundled TRUE)
|
||||
endif()
|
||||
|
||||
find_package(PCRE2 CONFIG QUIET)
|
||||
|
||||
if(PCRE2_FOUND AND TARGET PCRE2::pcre2-16)
|
||||
# Hunter case.
|
||||
add_library(WrapPCRE2::WrapPCRE2 INTERFACE IMPORTED)
|
||||
target_link_libraries(WrapPCRE2::WrapPCRE2 INTERFACE PCRE2::pcre2-16)
|
||||
set(WrapPCRE2_FOUND TRUE)
|
||||
else()
|
||||
find_library(PCRE2_LIBRARIES NAMES pcre2-16)
|
||||
find_path(PCRE2_INCLUDE_DIRS pcre2.h)
|
||||
|
||||
if (PCRE2_LIBRARIES AND PCRE2_INCLUDE_DIRS)
|
||||
add_library(WrapPCRE2::WrapPCRE2 INTERFACE IMPORTED)
|
||||
target_link_libraries(WrapPCRE2::WrapPCRE2 INTERFACE ${PCRE2_LIBRARIES})
|
||||
target_include_directories(WrapPCRE2::WrapPCRE2 INTERFACE ${PCRE2_INCLUDE_DIRS})
|
||||
set(WrapPCRE2_FOUND TRUE)
|
||||
endif()
|
||||
endif()
|
||||
qt_find_package_system_or_bundled(wrap_pcre2
|
||||
FRIENDLY_PACKAGE_NAME "PCRE2"
|
||||
WRAP_PACKAGE_TARGET "WrapPCRE2::WrapPCRE2"
|
||||
WRAP_PACKAGE_FOUND_VAR_NAME "WrapPCRE2_FOUND"
|
||||
BUNDLED_PACKAGE_NAME "Qt6BundledPcre2"
|
||||
BUNDLED_PACKAGE_TARGET "Qt6::BundledPcre2"
|
||||
SYSTEM_PACKAGE_NAME "WrapSystemPCRE2"
|
||||
SYSTEM_PACKAGE_TARGET "WrapSystemPCRE2::WrapSystemPCRE2"
|
||||
USE_BUNDLED_PACKAGE "${_qt_wrap_use_bundled}"
|
||||
)
|
||||
|
17
cmake/FindWrapPNG.cmake
Normal file
17
cmake/FindWrapPNG.cmake
Normal file
@ -0,0 +1,17 @@
|
||||
include(QtFindWrapHelper NO_POLICY_SCOPE)
|
||||
|
||||
set(_qt_wrap_use_bundled FALSE)
|
||||
if(QT_FEATURE_png AND NOT QT_FEATURE_system_png)
|
||||
set(_qt_wrap_use_bundled TRUE)
|
||||
endif()
|
||||
|
||||
qt_find_package_system_or_bundled(wrap_png
|
||||
FRIENDLY_PACKAGE_NAME "PNG"
|
||||
WRAP_PACKAGE_TARGET "WrapPNG::WrapPNG"
|
||||
WRAP_PACKAGE_FOUND_VAR_NAME "WrapPNG_FOUND"
|
||||
BUNDLED_PACKAGE_NAME "Qt6BundledLibpng"
|
||||
BUNDLED_PACKAGE_TARGET "Qt6::BundledLibpng"
|
||||
SYSTEM_PACKAGE_NAME "WrapSystemPNG"
|
||||
SYSTEM_PACKAGE_TARGET "WrapSystemPNG::WrapSystemPNG"
|
||||
USE_BUNDLED_PACKAGE "${_qt_wrap_use_bundled}"
|
||||
)
|
35
cmake/FindWrapSystemFreetype.cmake
Normal file
35
cmake/FindWrapSystemFreetype.cmake
Normal file
@ -0,0 +1,35 @@
|
||||
# We can't create the same interface imported target multiple times, CMake will complain if we do
|
||||
# that. This can happen if the find_package call is done in multiple different subdirectories.
|
||||
if(TARGET WrapSystemFreetype::WrapSystemFreetype)
|
||||
set(WrapSystemFreetype_FOUND ON)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(WrapSystemFreetype_FOUND OFF)
|
||||
|
||||
# Hunter has the package named freetype, but exports the Freetype::Freetype target as upstream
|
||||
# First try the CONFIG package, and afterwards the MODULE if not found
|
||||
|
||||
find_package(Freetype CONFIG NAMES Freetype freetype QUIET)
|
||||
if(NOT Freetype_FOUND)
|
||||
find_package(Freetype MODULE)
|
||||
endif()
|
||||
|
||||
if(Freetype_FOUND)
|
||||
# vcpkg defines a lower case target name, while upstream Find module defines a prefixed
|
||||
# upper case name.
|
||||
set(potential_target_names Freetype::Freetype freetype)
|
||||
foreach(target_name ${potential_target_names})
|
||||
if(TARGET ${target_name})
|
||||
set(WrapSystemFreetype_FOUND ON)
|
||||
set(final_target_name ${target_name})
|
||||
|
||||
add_library(WrapSystemFreetype::WrapSystemFreetype INTERFACE IMPORTED)
|
||||
target_link_libraries(WrapSystemFreetype::WrapSystemFreetype INTERFACE
|
||||
${final_target_name})
|
||||
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
45
cmake/FindWrapSystemHarfbuzz.cmake
Normal file
45
cmake/FindWrapSystemHarfbuzz.cmake
Normal file
@ -0,0 +1,45 @@
|
||||
# We can't create the same interface imported target multiple times, CMake will complain if we do
|
||||
# that. This can happen if the find_package call is done in multiple different subdirectories.
|
||||
if(TARGET WrapSystemHarfbuzz::WrapSystemHarfbuzz)
|
||||
set(WrapSystemHarfbuzz_FOUND ON)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(WrapSystemHarfbuzz_FOUND OFF)
|
||||
|
||||
find_package(harfbuzz)
|
||||
|
||||
# Gentoo has some buggy version of a harfbuzz Config file. Check if include paths are valid.
|
||||
set(__harfbuzz_target_name "harfbuzz::harfbuzz")
|
||||
if(harfbuzz_FOUND AND TARGET "${__harfbuzz_target_name}")
|
||||
get_property(__harfbuzz_include_paths TARGET "${__harfbuzz_target_name}"
|
||||
PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
|
||||
foreach(__harfbuzz_include_dir ${__harfbuzz_include_paths})
|
||||
if(NOT EXISTS "${__harfbuzz_include_dir}")
|
||||
# Must be the broken Gentoo harfbuzzConfig.cmake file. Try to use pkg-config instead.
|
||||
set(__harfbuzz_broken_config_file TRUE)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(__harfbuzz_broken_config_file)
|
||||
find_package(PkgConfig)
|
||||
|
||||
pkg_check_modules(harfbuzz harfbuzz IMPORTED_TARGET)
|
||||
set(__harfbuzz_target_name "PkgConfig::harfbuzz")
|
||||
|
||||
if (NOT TARGET "${__harfbuzz_target_name}")
|
||||
set(harfbuzz_FOUND 0)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(TARGET "${__harfbuzz_target_name}")
|
||||
set(WrapSystemHarfbuzz_FOUND ON)
|
||||
|
||||
add_library(WrapSystemHarfbuzz::WrapSystemHarfbuzz INTERFACE IMPORTED)
|
||||
target_link_libraries(WrapSystemHarfbuzz::WrapSystemHarfbuzz INTERFACE ${__harfbuzz_target_name})
|
||||
endif()
|
||||
unset(__harfbuzz_target_name)
|
||||
unset(__harfbuzz_include_dir)
|
||||
unset(__harfbuzz_broken_config_file)
|
23
cmake/FindWrapSystemPCRE2.cmake
Normal file
23
cmake/FindWrapSystemPCRE2.cmake
Normal file
@ -0,0 +1,23 @@
|
||||
if(TARGET WrapSystemPCRE2::WrapSystemPCRE2)
|
||||
set(WrapSystemPCRE2_FOUND TRUE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
find_package(PCRE2 CONFIG QUIET)
|
||||
|
||||
if(PCRE2_FOUND AND TARGET PCRE2::pcre2-16)
|
||||
# Hunter case.
|
||||
add_library(WrapSystemPCRE2::WrapSystemPCRE2 INTERFACE IMPORTED)
|
||||
target_link_libraries(WrapSystemPCRE2::WrapSystemPCRE2 INTERFACE PCRE2::pcre2-16)
|
||||
set(WrapSystemPCRE2_FOUND TRUE)
|
||||
else()
|
||||
find_library(PCRE2_LIBRARIES NAMES pcre2-16)
|
||||
find_path(PCRE2_INCLUDE_DIRS pcre2.h)
|
||||
|
||||
if (PCRE2_LIBRARIES AND PCRE2_INCLUDE_DIRS)
|
||||
add_library(WrapSystemPCRE2::WrapSystemPCRE2 INTERFACE IMPORTED)
|
||||
target_link_libraries(WrapSystemPCRE2::WrapSystemPCRE2 INTERFACE ${PCRE2_LIBRARIES})
|
||||
target_include_directories(WrapSystemPCRE2::WrapSystemPCRE2 INTERFACE ${PCRE2_INCLUDE_DIRS})
|
||||
set(WrapSystemPCRE2_FOUND TRUE)
|
||||
endif()
|
||||
endif()
|
27
cmake/FindWrapSystemPNG.cmake
Normal file
27
cmake/FindWrapSystemPNG.cmake
Normal file
@ -0,0 +1,27 @@
|
||||
# We can't create the same interface imported target multiple times, CMake will complain if we do
|
||||
# that. This can happen if the find_package call is done in multiple different subdirectories.
|
||||
if(TARGET WrapSystemPNG::WrapSystemPNG)
|
||||
set(WrapSystemPNG_FOUND ON)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(WrapSystemPNG_FOUND OFF)
|
||||
|
||||
find_package(PNG QUIET)
|
||||
|
||||
if(PNG_FOUND)
|
||||
set(potential_target_names PNG::PNG)
|
||||
foreach(target_name ${potential_target_names})
|
||||
if(TARGET ${target_name})
|
||||
set(WrapSystemPNG_FOUND ON)
|
||||
set(final_target_name ${target_name})
|
||||
|
||||
add_library(WrapSystemPNG::WrapSystemPNG INTERFACE IMPORTED)
|
||||
target_link_libraries(WrapSystemPNG::WrapSystemPNG INTERFACE
|
||||
${final_target_name})
|
||||
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
@ -229,6 +229,7 @@ qt_copy_or_install(FILES
|
||||
cmake/QtCompilerFlags.cmake
|
||||
cmake/QtCompilerOptimization.cmake
|
||||
cmake/QtFeature.cmake
|
||||
cmake/QtFindWrapHelper.cmake
|
||||
cmake/QtPlatformSupport.cmake
|
||||
cmake/QtPlatformAndroid.cmake
|
||||
cmake/QtPostProcess.cmake
|
||||
|
74
cmake/QtFindWrapHelper.cmake
Normal file
74
cmake/QtFindWrapHelper.cmake
Normal file
@ -0,0 +1,74 @@
|
||||
# Creates an imported wrapper target that links against either a Qt bundled package
|
||||
# or a system package.
|
||||
#
|
||||
# Used for consuming 3rd party libraries in Qt.
|
||||
#
|
||||
# Example: Creates WrapFreetype::WrapFreetype linking against either
|
||||
# Qt6::BundledFreetype or WrapSystemFreetype::WrapSystemFreetype.
|
||||
#
|
||||
# The implementation has to use a unique prefix in each variable, otherwise when WrapFreetype
|
||||
# find_package()s WrapPNG, the nested call would override the parent call variables, due to macros
|
||||
# using the same scope.
|
||||
macro(qt_find_package_system_or_bundled _unique_prefix)
|
||||
set(_flags "")
|
||||
set(_options
|
||||
FRIENDLY_PACKAGE_NAME
|
||||
WRAP_PACKAGE_TARGET
|
||||
WRAP_PACKAGE_FOUND_VAR_NAME
|
||||
BUNDLED_PACKAGE_NAME
|
||||
BUNDLED_PACKAGE_TARGET
|
||||
SYSTEM_PACKAGE_NAME
|
||||
SYSTEM_PACKAGE_TARGET
|
||||
USE_BUNDLED_PACKAGE
|
||||
)
|
||||
set(_multioptions "")
|
||||
|
||||
cmake_parse_arguments("_qfwrap_${_unique_prefix}"
|
||||
"${_flags}" "${_options}" "${_multioptions}" ${ARGN})
|
||||
|
||||
# We can't create the same interface imported target multiple times, CMake will complain if we
|
||||
# do that. This can happen if the find_package call is done in multiple different
|
||||
# subdirectories.
|
||||
if(TARGET "${_qfwrap_${_unique_prefix}_WRAP_PACKAGE_TARGET}")
|
||||
set(${_qfwrap_${_unique_prefix}_WRAP_PACKAGE_FOUND_VAR_NAME} ON)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(${_qfwrap_${_unique_prefix}_WRAP_PACKAGE_FOUND_VAR_NAME} OFF)
|
||||
|
||||
if(_qfwrap_${_unique_prefix}_USE_BUNDLED_PACKAGE)
|
||||
set(${_unique_prefix}_qt_package_name_to_use
|
||||
"${_qfwrap_${_unique_prefix}_BUNDLED_PACKAGE_NAME}")
|
||||
set(${_unique_prefix}_qt_package_target_to_use
|
||||
"${_qfwrap_${_unique_prefix}_BUNDLED_PACKAGE_TARGET}")
|
||||
set(${_unique_prefix}_qt_package_success_message
|
||||
"Using Qt bundled ${_qfwrap_${_unique_prefix}_FRIENDLY_PACKAGE_NAME}.")
|
||||
set(${_unique_prefix}_qt_package_type "bundled")
|
||||
else()
|
||||
set(${_unique_prefix}_qt_package_name_to_use
|
||||
"${_qfwrap_${_unique_prefix}_SYSTEM_PACKAGE_NAME}")
|
||||
set(${_unique_prefix}_qt_package_target_to_use
|
||||
"${_qfwrap_${_unique_prefix}_SYSTEM_PACKAGE_TARGET}")
|
||||
set(${_unique_prefix}_qt_package_success_message
|
||||
"Using system ${_qfwrap_${_unique_prefix}_FRIENDLY_PACKAGE_NAME}.")
|
||||
set(${_unique_prefix}_qt_package_type "system")
|
||||
endif()
|
||||
|
||||
if(NOT TARGET "${${_unique_prefix}_qt_package_target_to_use}")
|
||||
find_package("${${_unique_prefix}_qt_package_name_to_use}")
|
||||
endif()
|
||||
|
||||
if(TARGET "${${_unique_prefix}_qt_package_target_to_use}")
|
||||
set(${_qfwrap_${_unique_prefix}_WRAP_PACKAGE_FOUND_VAR_NAME} ON)
|
||||
message(STATUS "${${_unique_prefix}_qt_package_success_message}")
|
||||
add_library("${_qfwrap_${_unique_prefix}_WRAP_PACKAGE_TARGET}" INTERFACE IMPORTED)
|
||||
target_link_libraries("${_qfwrap_${_unique_prefix}_WRAP_PACKAGE_TARGET}"
|
||||
INTERFACE
|
||||
${${_unique_prefix}_qt_package_target_to_use})
|
||||
set_target_properties("${_qfwrap_${_unique_prefix}_WRAP_PACKAGE_TARGET}" PROPERTIES
|
||||
INTERFACE_QT_3RD_PARTY_PACKAGE_TYPE
|
||||
"${${_unique_prefix}_qt_package_type}")
|
||||
elseif(${_unique_prefix}_qt_package_type STREQUAL "bundled")
|
||||
message(FATAL_ERROR "Can't find ${_qfwrap_${_unique_prefix}_BUNDLED_PACKAGE_TARGET}.")
|
||||
endif()
|
||||
endmacro()
|
@ -371,7 +371,28 @@ function(qt_internal_create_config_file_for_standalone_tests)
|
||||
${QT_CONFIG_INSTALL_DIR}
|
||||
"${INSTALL_CMAKE_NAMESPACE}BuildInternals" "${standalone_tests_config_dir}")
|
||||
|
||||
list(JOIN QT_REPO_KNOWN_MODULES " " QT_REPO_KNOWN_MODULES_STRING)
|
||||
# Filter out bundled system libraries. Otherwise when looking for their dependencies
|
||||
# (like PNG for Freetype) FindWrapPNG is searched for during configuration of
|
||||
# standalone tests, and it can happen that Core or Gui features are not
|
||||
# imported early enough, which means FindWrapPNG will try to find a system PNG library instead
|
||||
# of the bundled one.
|
||||
set(modules)
|
||||
foreach(m ${QT_REPO_KNOWN_MODULES})
|
||||
get_target_property(target_type "${m}" TYPE)
|
||||
|
||||
# Interface libraries are never bundled system libraries (hopefully).
|
||||
if(target_type STREQUAL "INTERFACE_LIBRARY")
|
||||
list(APPEND modules "${m}")
|
||||
continue()
|
||||
endif()
|
||||
|
||||
get_target_property(is_3rd_party "${m}" QT_MODULE_IS_3RDPARTY_LIBRARY)
|
||||
if(NOT is_3rd_party)
|
||||
list(APPEND modules "${m}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
list(JOIN modules " " QT_REPO_KNOWN_MODULES_STRING)
|
||||
string(STRIP "${QT_REPO_KNOWN_MODULES_STRING}" QT_REPO_KNOWN_MODULES_STRING)
|
||||
|
||||
# Skip generating and installing file if no modules were built. This make sure not to install
|
||||
|
@ -7,7 +7,6 @@
|
||||
#### Libraries
|
||||
|
||||
qt_find_package(ZLIB PROVIDED_TARGETS ZLIB::ZLIB)
|
||||
set_package_properties(ZLIB PROPERTIES TYPE REQUIRED)
|
||||
qt_find_package(ZSTD PROVIDED_TARGETS ZSTD::ZSTD)
|
||||
qt_find_package(WrapDBus1 PROVIDED_TARGETS dbus-1)
|
||||
qt_find_package(Libudev PROVIDED_TARGETS PkgConfig::Libudev)
|
||||
@ -614,6 +613,10 @@ qt_feature("alloca" PRIVATE
|
||||
LABEL "alloca()"
|
||||
CONDITION QT_FEATURE_alloca_h OR QT_FEATURE_alloca_malloc_h OR TEST_alloca_stdlib_h
|
||||
)
|
||||
qt_feature("system-zlib" PRIVATE
|
||||
LABEL "Using system zlib"
|
||||
CONDITION ZLIB_FOUND
|
||||
)
|
||||
qt_feature("zstd" PRIVATE
|
||||
LABEL "Zstandard support"
|
||||
CONDITION ZSTD_FOUND
|
||||
|
20
src/3rdparty/CMakeLists.txt
vendored
20
src/3rdparty/CMakeLists.txt
vendored
@ -1,8 +1,24 @@
|
||||
# special case skip regeneration
|
||||
# The file is maintained manually
|
||||
add_subdirectory(harfbuzz)
|
||||
add_subdirectory(double-conversion)
|
||||
|
||||
#special case begin
|
||||
if(QT_FEATURE_png AND NOT QT_FEATURE_system_png)
|
||||
add_subdirectory(libpng)
|
||||
endif()
|
||||
|
||||
if(QT_FEATURE_freetype AND NOT QT_FEATURE_system_freetype)
|
||||
add_subdirectory(freetype)
|
||||
endif()
|
||||
|
||||
if(QT_FEATURE_harfbuzz AND NOT QT_FEATURE_system_harfbuzz)
|
||||
add_subdirectory(harfbuzz-ng)
|
||||
endif()
|
||||
|
||||
if(QT_FEATURE_regularexpression AND NOT QT_FEATURE_system_pcre2)
|
||||
add_subdirectory(pcre2)
|
||||
endif()
|
||||
|
||||
if (ANDROID)
|
||||
add_subdirectory(gradle)
|
||||
endif()
|
||||
#special case end
|
||||
|
101
src/3rdparty/freetype/CMakeLists.txt
vendored
Normal file
101
src/3rdparty/freetype/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,101 @@
|
||||
# Generated from freetype.pro.
|
||||
|
||||
#####################################################################
|
||||
## BundledFreetype Generic Library:
|
||||
#####################################################################
|
||||
|
||||
qt_add_3rdparty_library(BundledFreetype
|
||||
STATIC
|
||||
INSTALL
|
||||
SOURCES
|
||||
src/autofit/afdummy.c
|
||||
src/autofit/afhints.c
|
||||
src/autofit/aflatin.c
|
||||
src/autofit/autofit.c
|
||||
src/base/ftbase.c
|
||||
src/base/ftbbox.c
|
||||
src/base/ftbitmap.c
|
||||
src/base/ftdebug.c
|
||||
src/base/ftfntfmt.c
|
||||
src/base/ftglyph.c
|
||||
src/base/ftinit.c
|
||||
src/base/ftlcdfil.c
|
||||
src/base/ftmm.c
|
||||
src/base/ftsynth.c
|
||||
src/base/fttype1.c
|
||||
src/bdf/bdf.c
|
||||
src/cache/ftcache.c
|
||||
src/cff/cff.c
|
||||
src/cid/type1cid.c
|
||||
src/gzip/ftgzip.c
|
||||
src/lzw/ftlzw.c
|
||||
src/otvalid/otvalid.c
|
||||
src/otvalid/otvbase.c
|
||||
src/otvalid/otvcommn.c
|
||||
src/otvalid/otvgdef.c
|
||||
src/otvalid/otvgpos.c
|
||||
src/otvalid/otvgsub.c
|
||||
src/otvalid/otvjstf.c
|
||||
src/otvalid/otvmod.c
|
||||
src/pcf/pcf.c
|
||||
src/pfr/pfr.c
|
||||
src/psaux/psaux.c
|
||||
src/pshinter/pshinter.c
|
||||
src/psnames/psmodule.c
|
||||
src/raster/raster.c
|
||||
src/sfnt/sfnt.c
|
||||
src/smooth/smooth.c
|
||||
src/truetype/truetype.c
|
||||
src/type1/type1.c
|
||||
src/type42/type42.c
|
||||
src/winfonts/winfnt.c
|
||||
DEFINES
|
||||
FT2_BUILD_LIBRARY
|
||||
FT_CONFIG_OPTION_SYSTEM_ZLIB
|
||||
TT_CONFIG_OPTION_SUBPIXEL_HINTING
|
||||
PUBLIC_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
)
|
||||
qt_disable_warnings(BundledFreetype)
|
||||
qt_set_symbol_visibility_hidden(BundledFreetype)
|
||||
|
||||
#### Keys ignored in scope 1:.:.:freetype.pro:<TRUE>:
|
||||
# OTHER_FILES = "$$PWD/src/autofit/afangles.c" "$$PWD/src/autofit/afglobal.c" "$$PWD/src/autofit/afloader.c" "$$PWD/src/autofit/afmodule.c"
|
||||
# QT_FOR_CONFIG = "gui-private"
|
||||
|
||||
## Scopes:
|
||||
#####################################################################
|
||||
|
||||
qt_extend_target(BundledFreetype CONDITION WIN32
|
||||
SOURCES
|
||||
src/base/ftsystem.c
|
||||
)
|
||||
|
||||
qt_extend_target(BundledFreetype CONDITION UNIX
|
||||
SOURCES
|
||||
builds/unix/ftsystem.c
|
||||
INCLUDE_DIRECTORIES
|
||||
builds/unix
|
||||
)
|
||||
|
||||
qt_extend_target(BundledFreetype CONDITION QT_FEATURE_png
|
||||
DEFINES
|
||||
FT_CONFIG_OPTION_USE_PNG
|
||||
LIBRARIES
|
||||
WrapPNG::WrapPNG
|
||||
)
|
||||
|
||||
qt_extend_target(BundledFreetype CONDITION QT_FEATURE_system_zlib
|
||||
LIBRARIES
|
||||
ZLIB::ZLIB
|
||||
)
|
||||
|
||||
qt_extend_target(BundledFreetype CONDITION NOT QT_FEATURE_system_zlib
|
||||
INCLUDE_DIRECTORIES
|
||||
../zlib/src
|
||||
)
|
||||
|
||||
qt_extend_target(BundledFreetype CONDITION NOT QT_FEATURE_system_zlib AND NOT no_core_dep
|
||||
LIBRARIES
|
||||
Qt::Core
|
||||
)
|
12
src/3rdparty/freetype/freetype.pro
vendored
12
src/3rdparty/freetype/freetype.pro
vendored
@ -11,13 +11,9 @@ MODULE_INCLUDEPATH += $$PWD/include
|
||||
load(qt_helper_lib)
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/src/autofit/afangles.c \
|
||||
$$PWD/src/autofit/afdummy.c \
|
||||
$$PWD/src/autofit/afglobal.c \
|
||||
$$PWD/src/autofit/afhints.c \
|
||||
$$PWD/src/autofit/aflatin.c \
|
||||
$$PWD/src/autofit/afloader.c \
|
||||
$$PWD/src/autofit/afmodule.c \
|
||||
$$PWD/src/autofit/autofit.c \
|
||||
$$PWD/src/base/ftbase.c \
|
||||
$$PWD/src/base/ftbitmap.c \
|
||||
@ -57,6 +53,14 @@ SOURCES += \
|
||||
$$PWD/src/type42/type42.c \
|
||||
$$PWD/src/winfonts/winfnt.c
|
||||
|
||||
# These source files are included by one of the sources above
|
||||
# which means they should not be compiled as separate object files.
|
||||
OTHER_FILES += \
|
||||
$$PWD/src/autofit/afangles.c \
|
||||
$$PWD/src/autofit/afglobal.c \
|
||||
$$PWD/src/autofit/afloader.c \
|
||||
$$PWD/src/autofit/afmodule.c
|
||||
|
||||
win32 {
|
||||
SOURCES += $$PWD/src/base/ftsystem.c
|
||||
} else {
|
||||
|
179
src/3rdparty/harfbuzz-ng/.prev_CMakeLists.txt
vendored
Normal file
179
src/3rdparty/harfbuzz-ng/.prev_CMakeLists.txt
vendored
Normal file
@ -0,0 +1,179 @@
|
||||
# Generated from harfbuzz-ng.pro.
|
||||
|
||||
#####################################################################
|
||||
## BundledHarfbuzz Generic Library:
|
||||
#####################################################################
|
||||
|
||||
qt_add_3rdparty_library(BundledHarfbuzz
|
||||
STATIC
|
||||
SOURCES
|
||||
src/hb.h
|
||||
src/hb-atomic-private.hh
|
||||
src/hb-blob.cc src/hb-blob.h
|
||||
src/hb-buffer.cc src/hb-buffer.h
|
||||
src/hb-buffer-deserialize-json.hh
|
||||
src/hb-buffer-deserialize-text.hh
|
||||
src/hb-buffer-private.hh
|
||||
src/hb-buffer-serialize.cc
|
||||
src/hb-cache-private.hh
|
||||
src/hb-common.cc src/hb-common.h
|
||||
src/hb-debug.hh
|
||||
src/hb-deprecated.h
|
||||
src/hb-dsalgs.hh
|
||||
src/hb-face.cc src/hb-face.h
|
||||
src/hb-face-private.hh
|
||||
src/hb-font.cc src/hb-font.h
|
||||
src/hb-font-private.hh
|
||||
src/hb-mutex-private.hh
|
||||
src/hb-object-private.hh
|
||||
src/hb-open-file-private.hh
|
||||
src/hb-open-type-private.hh
|
||||
src/hb-ot-cbdt-table.hh
|
||||
src/hb-ot-cmap-table.hh
|
||||
src/hb-ot-glyf-table.hh
|
||||
src/hb-ot-head-table.hh
|
||||
src/hb-ot-hhea-table.hh
|
||||
src/hb-ot-hmtx-table.hh
|
||||
src/hb-ot-maxp-table.hh
|
||||
src/hb-ot-name-table.hh
|
||||
src/hb-ot-os2-table.hh
|
||||
src/hb-ot-post-table.hh
|
||||
src/hb-ot-tag.cc
|
||||
src/hb-private.hh
|
||||
src/hb-set.cc src/hb-set.h
|
||||
src/hb-set-digest-private.hh
|
||||
src/hb-set-private.hh
|
||||
src/hb-shape.cc src/hb-shape.h
|
||||
src/hb-shape-plan.cc src/hb-shape-plan.h
|
||||
src/hb-shape-plan-private.hh
|
||||
src/hb-shaper.cc
|
||||
src/hb-shaper-impl-private.hh
|
||||
src/hb-shaper-list.hh
|
||||
src/hb-shaper-private.hh
|
||||
src/hb-string-array.hh
|
||||
src/hb-unicode.cc src/hb-unicode.h
|
||||
src/hb-unicode-private.hh
|
||||
src/hb-utf-private.hh
|
||||
src/hb-version.h
|
||||
src/hb-warning.cc
|
||||
DEFINES
|
||||
HAVE_ATEXIT
|
||||
HAVE_CONFIG_H
|
||||
HB_DISABLE_DEPRECATED
|
||||
HB_EXTERN=
|
||||
HB_NDEBUG
|
||||
HB_NO_UNICODE_FUNCS
|
||||
QT_NO_VERSION_TAGGING
|
||||
INCLUDE_DIRECTORIES
|
||||
.core.includes
|
||||
PUBLIC_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
)
|
||||
qt_disable_warnings(BundledHarfbuzz)
|
||||
qt_set_symbol_visibility_hidden(BundledHarfbuzz)
|
||||
|
||||
#### Keys ignored in scope 1:.:.:harfbuzz-ng.pro:<TRUE>:
|
||||
# SHAPERS = "opentype"
|
||||
|
||||
## Scopes:
|
||||
#####################################################################
|
||||
|
||||
qt_extend_target(BundledHarfbuzz CONDITION APPLE
|
||||
SOURCES
|
||||
src/hb-coretext.cc src/hb-coretext.h
|
||||
DEFINES
|
||||
HAVE_CORETEXT
|
||||
)
|
||||
|
||||
#### Keys ignored in scope 2:.:.:harfbuzz-ng.pro:APPLE:
|
||||
# SHAPERS = "coretext"
|
||||
|
||||
qt_extend_target(BundledHarfbuzz CONDITION UNIX
|
||||
DEFINES
|
||||
HAVE_PTHREAD
|
||||
HAVE_SCHED_H
|
||||
HAVE_SCHED_YIELD
|
||||
)
|
||||
|
||||
qt_extend_target(BundledHarfbuzz CONDITION WIN32
|
||||
DEFINES
|
||||
HB_NO_WIN1256
|
||||
)
|
||||
|
||||
qt_extend_target(BundledHarfbuzz CONDITION ANDROID
|
||||
DEFINES
|
||||
_POSIX_C_SOURCE=200112L
|
||||
)
|
||||
|
||||
qt_extend_target(BundledHarfbuzz CONDITION SHAPERS___contains___opentype
|
||||
SOURCES
|
||||
src/hb-ot.h
|
||||
src/hb-ot-font.cc src/hb-ot-font.h
|
||||
src/hb-ot-kern-table.hh
|
||||
src/hb-ot-layout.cc src/hb-ot-layout.h
|
||||
src/hb-ot-layout-common-private.hh
|
||||
src/hb-ot-layout-gdef-table.hh
|
||||
src/hb-ot-layout-gpos-table.hh
|
||||
src/hb-ot-layout-gsub-table.hh
|
||||
src/hb-ot-layout-gsubgpos-private.hh
|
||||
src/hb-ot-layout-jstf-table.hh
|
||||
src/hb-ot-layout-math-table.hh
|
||||
src/hb-ot-layout-private.hh
|
||||
src/hb-ot-map.cc
|
||||
src/hb-ot-map-private.hh
|
||||
src/hb-ot-math.cc src/hb-ot-math.h
|
||||
src/hb-ot-math-table.hh
|
||||
src/hb-ot-post-macroman.hh
|
||||
src/hb-ot-shape.cc src/hb-ot-shape.h
|
||||
src/hb-ot-shape-complex-arabic.cc
|
||||
src/hb-ot-shape-complex-arabic-fallback.hh
|
||||
src/hb-ot-shape-complex-arabic-private.hh
|
||||
src/hb-ot-shape-complex-arabic-table.hh
|
||||
src/hb-ot-shape-complex-default.cc
|
||||
src/hb-ot-shape-complex-hangul.cc
|
||||
src/hb-ot-shape-complex-hebrew.cc
|
||||
src/hb-ot-shape-complex-indic.cc
|
||||
src/hb-ot-shape-complex-indic-machine.hh
|
||||
src/hb-ot-shape-complex-indic-private.hh
|
||||
src/hb-ot-shape-complex-indic-table.cc
|
||||
src/hb-ot-shape-complex-myanmar.cc
|
||||
src/hb-ot-shape-complex-myanmar-machine.hh
|
||||
src/hb-ot-shape-complex-private.hh
|
||||
src/hb-ot-shape-complex-thai.cc
|
||||
src/hb-ot-shape-complex-tibetan.cc
|
||||
src/hb-ot-shape-complex-use.cc
|
||||
src/hb-ot-shape-complex-use-machine.hh
|
||||
src/hb-ot-shape-complex-use-private.hh
|
||||
src/hb-ot-shape-complex-use-table.cc
|
||||
src/hb-ot-shape-fallback.cc
|
||||
src/hb-ot-shape-fallback-private.hh
|
||||
src/hb-ot-shape-normalize.cc
|
||||
src/hb-ot-shape-normalize-private.hh
|
||||
src/hb-ot-shape-private.hh
|
||||
src/hb-ot-tag.h
|
||||
src/hb-ot-var.cc src/hb-ot-var.h
|
||||
src/hb-ot-var-avar-table.hh
|
||||
src/hb-ot-var-fvar-table.hh
|
||||
src/hb-ot-var-hvar-table.hh
|
||||
src/hb-ot-var-mvar-table.hh
|
||||
DEFINES
|
||||
HAVE_OT
|
||||
)
|
||||
|
||||
qt_extend_target(BundledHarfbuzz CONDITION APPLE_UIKIT
|
||||
LIBRARIES
|
||||
${FWCoreGraphics}
|
||||
${FWCoreText}
|
||||
)
|
||||
|
||||
qt_extend_target(BundledHarfbuzz CONDITION APPLE AND NOT APPLE_UIKIT
|
||||
LIBRARIES
|
||||
${FWApplicationServices}
|
||||
)
|
||||
|
||||
qt_extend_target(BundledHarfbuzz CONDITION SHAPERS_ISEMPTY OR SHAPERS___contains___fallback
|
||||
SOURCES
|
||||
src/hb-fallback-shape.cc
|
||||
DEFINES
|
||||
HAVE_FALLBACK
|
||||
)
|
180
src/3rdparty/harfbuzz-ng/CMakeLists.txt
vendored
Normal file
180
src/3rdparty/harfbuzz-ng/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,180 @@
|
||||
# Generated from harfbuzz-ng.pro.
|
||||
|
||||
#####################################################################
|
||||
## BundledHarfbuzz Generic Library:
|
||||
#####################################################################
|
||||
|
||||
qt_add_3rdparty_library(BundledHarfbuzz
|
||||
STATIC
|
||||
SOURCES
|
||||
src/hb.h
|
||||
src/hb-atomic-private.hh
|
||||
src/hb-blob.cc src/hb-blob.h
|
||||
src/hb-buffer.cc src/hb-buffer.h
|
||||
src/hb-buffer-deserialize-json.hh
|
||||
src/hb-buffer-deserialize-text.hh
|
||||
src/hb-buffer-private.hh
|
||||
src/hb-buffer-serialize.cc
|
||||
src/hb-cache-private.hh
|
||||
src/hb-common.cc src/hb-common.h
|
||||
src/hb-debug.hh
|
||||
src/hb-deprecated.h
|
||||
src/hb-dsalgs.hh
|
||||
src/hb-face.cc src/hb-face.h
|
||||
src/hb-face-private.hh
|
||||
src/hb-font.cc src/hb-font.h
|
||||
src/hb-font-private.hh
|
||||
src/hb-mutex-private.hh
|
||||
src/hb-object-private.hh
|
||||
src/hb-open-file-private.hh
|
||||
src/hb-open-type-private.hh
|
||||
src/hb-ot-cbdt-table.hh
|
||||
src/hb-ot-cmap-table.hh
|
||||
src/hb-ot-glyf-table.hh
|
||||
src/hb-ot-head-table.hh
|
||||
src/hb-ot-hhea-table.hh
|
||||
src/hb-ot-hmtx-table.hh
|
||||
src/hb-ot-maxp-table.hh
|
||||
src/hb-ot-name-table.hh
|
||||
src/hb-ot-os2-table.hh
|
||||
src/hb-ot-post-table.hh
|
||||
src/hb-ot-tag.cc
|
||||
src/hb-private.hh
|
||||
src/hb-set.cc src/hb-set.h
|
||||
src/hb-set-digest-private.hh
|
||||
src/hb-set-private.hh
|
||||
src/hb-shape.cc src/hb-shape.h
|
||||
src/hb-shape-plan.cc src/hb-shape-plan.h
|
||||
src/hb-shape-plan-private.hh
|
||||
src/hb-shaper.cc
|
||||
src/hb-shaper-impl-private.hh
|
||||
src/hb-shaper-list.hh
|
||||
src/hb-shaper-private.hh
|
||||
src/hb-string-array.hh
|
||||
src/hb-unicode.cc src/hb-unicode.h
|
||||
src/hb-unicode-private.hh
|
||||
src/hb-utf-private.hh
|
||||
src/hb-version.h
|
||||
src/hb-warning.cc
|
||||
DEFINES
|
||||
HAVE_ATEXIT
|
||||
HAVE_CONFIG_H
|
||||
HB_DISABLE_DEPRECATED
|
||||
HB_EXTERN=
|
||||
HB_NDEBUG
|
||||
HB_NO_UNICODE_FUNCS
|
||||
QT_NO_VERSION_TAGGING
|
||||
INCLUDE_DIRECTORIES
|
||||
$<TARGET_PROPERTY:Core,INCLUDE_DIRECTORIES> # special case
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}" # special case
|
||||
PUBLIC_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
)
|
||||
qt_disable_warnings(BundledHarfbuzz)
|
||||
qt_set_symbol_visibility_hidden(BundledHarfbuzz)
|
||||
|
||||
#### Keys ignored in scope 1:.:.:harfbuzz-ng.pro:<TRUE>:
|
||||
# SHAPERS = "opentype"
|
||||
|
||||
## Scopes:
|
||||
#####################################################################
|
||||
|
||||
qt_extend_target(BundledHarfbuzz CONDITION APPLE
|
||||
SOURCES
|
||||
src/hb-coretext.cc src/hb-coretext.h
|
||||
DEFINES
|
||||
HAVE_CORETEXT
|
||||
)
|
||||
|
||||
#### Keys ignored in scope 2:.:.:harfbuzz-ng.pro:APPLE:
|
||||
# SHAPERS = "coretext"
|
||||
|
||||
qt_extend_target(BundledHarfbuzz CONDITION UNIX
|
||||
DEFINES
|
||||
HAVE_PTHREAD
|
||||
HAVE_SCHED_H
|
||||
HAVE_SCHED_YIELD
|
||||
)
|
||||
|
||||
qt_extend_target(BundledHarfbuzz CONDITION WIN32
|
||||
DEFINES
|
||||
HB_NO_WIN1256
|
||||
)
|
||||
|
||||
qt_extend_target(BundledHarfbuzz CONDITION ANDROID
|
||||
DEFINES
|
||||
_POSIX_C_SOURCE=200112L
|
||||
)
|
||||
|
||||
qt_extend_target(BundledHarfbuzz CONDITION TRUE # special case
|
||||
SOURCES
|
||||
src/hb-ot.h
|
||||
src/hb-ot-font.cc src/hb-ot-font.h
|
||||
src/hb-ot-kern-table.hh
|
||||
src/hb-ot-layout.cc src/hb-ot-layout.h
|
||||
src/hb-ot-layout-common-private.hh
|
||||
src/hb-ot-layout-gdef-table.hh
|
||||
src/hb-ot-layout-gpos-table.hh
|
||||
src/hb-ot-layout-gsub-table.hh
|
||||
src/hb-ot-layout-gsubgpos-private.hh
|
||||
src/hb-ot-layout-jstf-table.hh
|
||||
src/hb-ot-layout-math-table.hh
|
||||
src/hb-ot-layout-private.hh
|
||||
src/hb-ot-map.cc
|
||||
src/hb-ot-map-private.hh
|
||||
src/hb-ot-math.cc src/hb-ot-math.h
|
||||
src/hb-ot-math-table.hh
|
||||
src/hb-ot-post-macroman.hh
|
||||
src/hb-ot-shape.cc src/hb-ot-shape.h
|
||||
src/hb-ot-shape-complex-arabic.cc
|
||||
src/hb-ot-shape-complex-arabic-fallback.hh
|
||||
src/hb-ot-shape-complex-arabic-private.hh
|
||||
src/hb-ot-shape-complex-arabic-table.hh
|
||||
src/hb-ot-shape-complex-default.cc
|
||||
src/hb-ot-shape-complex-hangul.cc
|
||||
src/hb-ot-shape-complex-hebrew.cc
|
||||
src/hb-ot-shape-complex-indic.cc
|
||||
src/hb-ot-shape-complex-indic-machine.hh
|
||||
src/hb-ot-shape-complex-indic-private.hh
|
||||
src/hb-ot-shape-complex-indic-table.cc
|
||||
src/hb-ot-shape-complex-myanmar.cc
|
||||
src/hb-ot-shape-complex-myanmar-machine.hh
|
||||
src/hb-ot-shape-complex-private.hh
|
||||
src/hb-ot-shape-complex-thai.cc
|
||||
src/hb-ot-shape-complex-tibetan.cc
|
||||
src/hb-ot-shape-complex-use.cc
|
||||
src/hb-ot-shape-complex-use-machine.hh
|
||||
src/hb-ot-shape-complex-use-private.hh
|
||||
src/hb-ot-shape-complex-use-table.cc
|
||||
src/hb-ot-shape-fallback.cc
|
||||
src/hb-ot-shape-fallback-private.hh
|
||||
src/hb-ot-shape-normalize.cc
|
||||
src/hb-ot-shape-normalize-private.hh
|
||||
src/hb-ot-shape-private.hh
|
||||
src/hb-ot-tag.h
|
||||
src/hb-ot-var.cc src/hb-ot-var.h
|
||||
src/hb-ot-var-avar-table.hh
|
||||
src/hb-ot-var-fvar-table.hh
|
||||
src/hb-ot-var-hvar-table.hh
|
||||
src/hb-ot-var-mvar-table.hh
|
||||
DEFINES
|
||||
HAVE_OT
|
||||
)
|
||||
|
||||
qt_extend_target(BundledHarfbuzz CONDITION APPLE_UIKIT
|
||||
LIBRARIES
|
||||
${FWCoreGraphics}
|
||||
${FWCoreText}
|
||||
)
|
||||
|
||||
qt_extend_target(BundledHarfbuzz CONDITION APPLE AND NOT APPLE_UIKIT
|
||||
LIBRARIES
|
||||
${FWApplicationServices}
|
||||
)
|
||||
|
||||
qt_extend_target(BundledHarfbuzz CONDITION SHAPERS_ISEMPTY OR SHAPERS___contains___fallback
|
||||
SOURCES
|
||||
src/hb-fallback-shape.cc
|
||||
DEFINES
|
||||
HAVE_FALLBACK
|
||||
)
|
7
src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro
vendored
7
src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro
vendored
@ -164,7 +164,7 @@ contains(SHAPERS, opentype) {
|
||||
$$PWD/src/hb-ot-var.h
|
||||
}
|
||||
|
||||
contains(SHAPERS, coretext) {
|
||||
darwin {
|
||||
DEFINES += HAVE_CORETEXT
|
||||
|
||||
SOURCES += \
|
||||
@ -173,13 +173,14 @@ contains(SHAPERS, coretext) {
|
||||
HEADERS += \
|
||||
$$PWD/src/hb-coretext.h
|
||||
|
||||
uikit: \
|
||||
uikit {
|
||||
# On iOS/tvOS/watchOS CoreText and CoreGraphics are stand-alone frameworks
|
||||
LIBS_PRIVATE += -framework CoreText -framework CoreGraphics
|
||||
else: \
|
||||
} else {
|
||||
# On Mac OS they are part of the ApplicationServices umbrella framework,
|
||||
# even in 10.8 where they were also made available stand-alone.
|
||||
LIBS_PRIVATE += -framework ApplicationServices
|
||||
}
|
||||
|
||||
CONFIG += watchos_coretext
|
||||
}
|
||||
|
54
src/3rdparty/libpng/CMakeLists.txt
vendored
Normal file
54
src/3rdparty/libpng/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
# Generated from libpng.pro.
|
||||
|
||||
#####################################################################
|
||||
## BundledLibpng Generic Library:
|
||||
#####################################################################
|
||||
|
||||
qt_add_3rdparty_library(BundledLibpng
|
||||
STATIC
|
||||
INSTALL
|
||||
SOURCES
|
||||
png.c
|
||||
pngerror.c
|
||||
pngget.c
|
||||
pngmem.c
|
||||
pngpread.c
|
||||
pngread.c
|
||||
pngrio.c
|
||||
pngrtran.c
|
||||
pngrutil.c
|
||||
pngset.c
|
||||
pngtrans.c
|
||||
pngwio.c
|
||||
pngwrite.c
|
||||
pngwtran.c
|
||||
pngwutil.c
|
||||
DEFINES
|
||||
PNG_ARM_NEON_OPT=0
|
||||
PNG_POWERPC_VSX_OPT=0
|
||||
PUBLIC_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
)
|
||||
qt_disable_warnings(BundledLibpng)
|
||||
qt_set_symbol_visibility_hidden(BundledLibpng)
|
||||
|
||||
#### Keys ignored in scope 1:.:.:libpng.pro:<TRUE>:
|
||||
# TR_EXCLUDE = "$$PWD/*"
|
||||
|
||||
## Scopes:
|
||||
#####################################################################
|
||||
|
||||
qt_extend_target(BundledLibpng CONDITION QT_FEATURE_system_zlib
|
||||
LIBRARIES
|
||||
ZLIB::ZLIB
|
||||
)
|
||||
|
||||
qt_extend_target(BundledLibpng CONDITION NOT QT_FEATURE_system_zlib
|
||||
INCLUDE_DIRECTORIES
|
||||
../zlib/src
|
||||
)
|
||||
|
||||
qt_extend_target(BundledLibpng CONDITION NOT QT_FEATURE_system_zlib AND NOT no_core_dep
|
||||
LIBRARIES
|
||||
Qt::Core
|
||||
)
|
72
src/3rdparty/pcre2/CMakeLists.txt
vendored
Normal file
72
src/3rdparty/pcre2/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
# Generated from pcre2.pro.
|
||||
|
||||
#####################################################################
|
||||
## BundledPcre2 Generic Library:
|
||||
#####################################################################
|
||||
|
||||
qt_add_3rdparty_library(BundledPcre2
|
||||
STATIC
|
||||
SOURCES
|
||||
src/config.h
|
||||
src/pcre2.h
|
||||
src/pcre2_auto_possess.c
|
||||
src/pcre2_chartables.c
|
||||
src/pcre2_compile.c
|
||||
src/pcre2_config.c
|
||||
src/pcre2_context.c
|
||||
src/pcre2_dfa_match.c
|
||||
src/pcre2_error.c
|
||||
src/pcre2_extuni.c
|
||||
src/pcre2_find_bracket.c
|
||||
src/pcre2_internal.h
|
||||
src/pcre2_intmodedep.h
|
||||
src/pcre2_jit_compile.c
|
||||
src/pcre2_maketables.c
|
||||
src/pcre2_match.c
|
||||
src/pcre2_match_data.c
|
||||
src/pcre2_newline.c
|
||||
src/pcre2_ord2utf.c
|
||||
src/pcre2_pattern_info.c
|
||||
src/pcre2_script_run.c
|
||||
src/pcre2_serialize.c
|
||||
src/pcre2_string_utils.c
|
||||
src/pcre2_study.c
|
||||
src/pcre2_substitute.c
|
||||
src/pcre2_substring.c
|
||||
src/pcre2_tables.c
|
||||
src/pcre2_ucd.c
|
||||
src/pcre2_ucp.h
|
||||
src/pcre2_valid_utf.c
|
||||
src/pcre2_xclass.c
|
||||
DEFINES
|
||||
HAVE_CONFIG_H
|
||||
PUBLIC_DEFINES
|
||||
PCRE2_CODE_UNIT_WIDTH=16
|
||||
PUBLIC_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
|
||||
)
|
||||
qt_disable_warnings(BundledPcre2)
|
||||
qt_set_symbol_visibility_hidden(BundledPcre2)
|
||||
|
||||
## Scopes:
|
||||
#####################################################################
|
||||
|
||||
qt_extend_target(BundledPcre2 CONDITION WIN32
|
||||
PUBLIC_DEFINES
|
||||
PCRE2_STATIC
|
||||
)
|
||||
|
||||
qt_extend_target(BundledPcre2 CONDITION APPLE_UIKIT OR QNX OR WINRT
|
||||
DEFINES
|
||||
PCRE2_DISABLE_JIT
|
||||
)
|
||||
|
||||
qt_extend_target(BundledPcre2 CONDITION (TEST_architecture_arch STREQUAL "arm") AND WIN32
|
||||
DEFINES
|
||||
PCRE2_DISABLE_JIT
|
||||
)
|
||||
|
||||
qt_extend_target(BundledPcre2 CONDITION (TEST_architecture_arch STREQUAL "arm64") AND WIN32
|
||||
DEFINES
|
||||
PCRE2_DISABLE_JIT
|
||||
)
|
@ -1,4 +1,24 @@
|
||||
# special case skip regeneration
|
||||
|
||||
# Temporary fix for OpenSSL feature detection until we can provide a
|
||||
# proper implementation of additional compile tests for library dependencies
|
||||
# in configure.json
|
||||
|
||||
find_package(OpenSSL)
|
||||
if (NOT OPENSSL_FOUND OR NOT OPENSSL_VERSION VERSION_GREATER_EQUAL "1.1.0")
|
||||
set(QT_FEATURE_openssl_runtime OFF CACHE BOOL "" FORCE)
|
||||
set(QT_FEATURE_openssl_linked OFF CACHE BOOL "" FORCE)
|
||||
set(QT_FEATURE_openssl OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
|
||||
# We need to include the features of a few modules before they are actually declared.
|
||||
# The feature values are used as conditions for deciding whether bundled 3rd party libraries
|
||||
# should be built.
|
||||
# The order of evaluation matters.
|
||||
qt_feature_evaluate_features("${CMAKE_CURRENT_SOURCE_DIR}/corelib/configure.cmake")
|
||||
qt_feature_evaluate_features("${CMAKE_CURRENT_SOURCE_DIR}/network/configure.cmake")
|
||||
qt_feature_evaluate_features("${CMAKE_CURRENT_SOURCE_DIR}/gui/configure.cmake")
|
||||
|
||||
add_subdirectory(3rdparty)
|
||||
|
||||
function(find_or_build_bootstrap_names)
|
||||
|
@ -236,7 +236,6 @@ qt_add_module(Core
|
||||
../3rdparty/sha3
|
||||
../3rdparty/tinycbor/src
|
||||
LIBRARIES
|
||||
ZLIB::ZLIB
|
||||
doubleconversion
|
||||
PRECOMPILED_HEADER
|
||||
"global/qt_pch.h"
|
||||
@ -306,8 +305,10 @@ endif()
|
||||
#### Keys ignored in scope 2:.:.:corelib.pro:QT_FEATURE_gc_binaries:
|
||||
# MODULE_CONFIG = "gc_binaries"
|
||||
|
||||
#### Keys ignored in scope 3:.:.:corelib.pro:NOT QT_NAMESPACE_ISEMPTY:
|
||||
# MODULE_DEFINES = "QT_NAMESPACE=$$QT_NAMESPACE"
|
||||
qt_extend_target(Core CONDITION NOT QT_NAMESPACE_ISEMPTY
|
||||
PUBLIC_DEFINES
|
||||
QT_NAMESPACE=
|
||||
)
|
||||
|
||||
qt_extend_target(Core CONDITION ANDROID
|
||||
SOURCES
|
||||
@ -594,6 +595,32 @@ qt_extend_target(Core CONDITION MSVC
|
||||
"tools/qvector_msvc.cpp"
|
||||
)
|
||||
|
||||
qt_extend_target(Core CONDITION QT_FEATURE_system_zlib
|
||||
LIBRARIES
|
||||
ZLIB::ZLIB
|
||||
)
|
||||
|
||||
qt_extend_target(Core CONDITION NOT QT_FEATURE_system_zlib
|
||||
SOURCES
|
||||
../3rdparty/zlib/src/adler32.c
|
||||
../3rdparty/zlib/src/compress.c
|
||||
../3rdparty/zlib/src/crc32.c
|
||||
../3rdparty/zlib/src/deflate.c
|
||||
../3rdparty/zlib/src/gzclose.c
|
||||
../3rdparty/zlib/src/gzlib.c
|
||||
../3rdparty/zlib/src/gzread.c
|
||||
../3rdparty/zlib/src/gzwrite.c
|
||||
../3rdparty/zlib/src/infback.c
|
||||
../3rdparty/zlib/src/inffast.c
|
||||
../3rdparty/zlib/src/inflate.c
|
||||
../3rdparty/zlib/src/inftrees.c
|
||||
../3rdparty/zlib/src/trees.c
|
||||
../3rdparty/zlib/src/uncompr.c
|
||||
../3rdparty/zlib/src/zutil.c
|
||||
INCLUDE_DIRECTORIES
|
||||
../3rdparty/zlib/src
|
||||
)
|
||||
|
||||
qt_extend_target(Core CONDITION QT_FEATURE_commandlineparser
|
||||
SOURCES
|
||||
tools/qcommandlineoption.cpp tools/qcommandlineoption.h
|
||||
|
@ -4,6 +4,7 @@
|
||||
qt_find_package(Threads PROVIDED_TARGETS Threads::Threads)
|
||||
qt_find_package(WrapDoubleConversion REQUIRED
|
||||
PROVIDED_TARGETS WrapDoubleConversion::WrapDoubleConversion)
|
||||
qt_find_package(WrapPCRE2 PROVIDED_TARGETS WrapPCRE2::WrapPCRE2)
|
||||
|
||||
if (NOT WrapDoubleConversion_FOUND)
|
||||
message(FATAL_ERROR "Your C library does not provide \
|
||||
@ -249,14 +250,12 @@ qt_add_module(Core
|
||||
INCLUDE_DIRECTORIES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/global" # special case
|
||||
../3rdparty/tinycbor/src
|
||||
# special case: remove ../3rdparty/...
|
||||
PRECOMPILED_HEADER
|
||||
global/qt_pch.h
|
||||
NO_PCH_SOURCES
|
||||
"text/qstring_compat.cpp"
|
||||
LIBRARIES
|
||||
ZLIB::ZLIB
|
||||
# double-conversion # special case
|
||||
# double-conversion # special case remove
|
||||
Qt::GlobalConfigPrivate # special case
|
||||
QtHarfBuzz # special case
|
||||
Threads::Threads # special case
|
||||
@ -414,8 +413,13 @@ endif()
|
||||
#### Keys ignored in scope 2:.:.:corelib.pro:QT_FEATURE_gc_binaries:
|
||||
# MODULE_CONFIG = "gc_binaries"
|
||||
|
||||
#### Keys ignored in scope 3:.:.:corelib.pro:NOT QT_NAMESPACE_ISEMPTY:
|
||||
# MODULE_DEFINES = "QT_NAMESPACE=$$QT_NAMESPACE"
|
||||
# special case begin
|
||||
# remove because it's handled manually
|
||||
#qt_extend_target(Core CONDITION NOT QT_NAMESPACE_ISEMPTY
|
||||
# PUBLIC_DEFINES
|
||||
# QT_NAMESPACE=
|
||||
#)
|
||||
# special case end
|
||||
|
||||
qt_extend_target(Core CONDITION ANDROID
|
||||
SOURCES
|
||||
@ -694,6 +698,32 @@ qt_extend_target(Core CONDITION MSVC
|
||||
"tools/qvector_msvc.cpp"
|
||||
)
|
||||
|
||||
qt_extend_target(Core CONDITION QT_FEATURE_system_zlib
|
||||
LIBRARIES
|
||||
ZLIB::ZLIB
|
||||
)
|
||||
|
||||
qt_extend_target(Core CONDITION NOT QT_FEATURE_system_zlib
|
||||
SOURCES
|
||||
../3rdparty/zlib/src/adler32.c
|
||||
../3rdparty/zlib/src/compress.c
|
||||
../3rdparty/zlib/src/crc32.c
|
||||
../3rdparty/zlib/src/deflate.c
|
||||
../3rdparty/zlib/src/gzclose.c
|
||||
../3rdparty/zlib/src/gzlib.c
|
||||
../3rdparty/zlib/src/gzread.c
|
||||
../3rdparty/zlib/src/gzwrite.c
|
||||
../3rdparty/zlib/src/infback.c
|
||||
../3rdparty/zlib/src/inffast.c
|
||||
../3rdparty/zlib/src/inflate.c
|
||||
../3rdparty/zlib/src/inftrees.c
|
||||
../3rdparty/zlib/src/trees.c
|
||||
../3rdparty/zlib/src/uncompr.c
|
||||
../3rdparty/zlib/src/zutil.c
|
||||
INCLUDE_DIRECTORIES
|
||||
../3rdparty/zlib/src
|
||||
)
|
||||
|
||||
qt_extend_target(Core CONDITION QT_FEATURE_commandlineparser
|
||||
SOURCES
|
||||
tools/qcommandlineoption.cpp tools/qcommandlineoption.h
|
||||
@ -1258,3 +1288,14 @@ qt_add_docs(Core
|
||||
doc/qtcore.qdocconf
|
||||
)
|
||||
|
||||
# special case begin
|
||||
# Handle qtzlib.pro to create headers for the
|
||||
# QtZlibPrivate target, equivalent to Qt += zlib-private
|
||||
if(NOT QT_FEATURE_system_zlib)
|
||||
qt_add_module(Zlib
|
||||
INTERNAL_MODULE
|
||||
HEADER_MODULE
|
||||
NO_CONFIG_HEADER_FILE
|
||||
)
|
||||
endif()
|
||||
# special case end
|
||||
|
@ -16,7 +16,7 @@ qt_find_package(Libsystemd PROVIDED_TARGETS PkgConfig::Libsystemd)
|
||||
qt_find_package(Atomic PROVIDED_TARGETS Atomic)
|
||||
qt_find_package(WrapRt PROVIDED_TARGETS WrapRt)
|
||||
qt_find_package(LTTngUST PROVIDED_TARGETS LTTng::UST)
|
||||
qt_find_package(WrapPCRE2 PROVIDED_TARGETS WrapPCRE2::WrapPCRE2)
|
||||
qt_find_package(WrapSystemPCRE2 PROVIDED_TARGETS WrapSystemPCRE2::WrapSystemPCRE2)
|
||||
set_package_properties(WrapPCRE2 PROPERTIES TYPE REQUIRED)
|
||||
if((QNX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(PPS PROVIDED_TARGETS PPS::PPS)
|
||||
@ -642,6 +642,12 @@ qt_feature("pcre2"
|
||||
DISABLE INPUT_pcre STREQUAL 'no' OR INPUT_pcre STREQUAL 'system'
|
||||
)
|
||||
qt_feature_config("pcre2" QMAKE_PRIVATE_CONFIG)
|
||||
qt_feature("system-pcre2" PRIVATE
|
||||
LABEL " Using system PCRE2"
|
||||
CONDITION WrapSystemPCRE2_FOUND
|
||||
ENABLE INPUT_pcre STREQUAL 'system'
|
||||
DISABLE INPUT_pcre STREQUAL 'no' OR INPUT_pcre STREQUAL 'qt'
|
||||
)
|
||||
qt_feature("poll_ppoll" PRIVATE
|
||||
LABEL "Native ppoll()"
|
||||
CONDITION NOT WASM AND TEST_ppoll
|
||||
@ -701,7 +707,7 @@ qt_feature("regularexpression" PUBLIC
|
||||
SECTION "Kernel"
|
||||
LABEL "QRegularExpression"
|
||||
PURPOSE "Provides an API to Perl-compatible regular expressions."
|
||||
CONDITION ON OR QT_FEATURE_pcre2
|
||||
CONDITION QT_FEATURE_system_pcre2 OR QT_FEATURE_pcre2
|
||||
)
|
||||
qt_feature_definition("regularexpression" "QT_NO_REGULAREXPRESSION" NEGATE VALUE "1")
|
||||
qt_feature("sharedmemory" PUBLIC
|
||||
|
@ -215,7 +215,6 @@ qt_add_module(Gui
|
||||
../3rdparty/VulkanMemoryAllocator
|
||||
LIBRARIES
|
||||
Qt::CorePrivate
|
||||
ZLIB::ZLIB
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::Core
|
||||
PRIVATE_MODULE_INTERFACE
|
||||
@ -397,7 +396,7 @@ qt_extend_target(Gui CONDITION QT_FEATURE_png
|
||||
SOURCES
|
||||
image/qpnghandler.cpp image/qpnghandler_p.h
|
||||
LIBRARIES
|
||||
PNG::PNG
|
||||
WrapPNG::WrapPNG
|
||||
)
|
||||
|
||||
#### Keys ignored in scope 38:.:image:image/image.pri:WIN32 AND mingw:
|
||||
@ -538,6 +537,21 @@ qt_extend_target(Gui CONDITION ANDROID AND TEST_architecture_arch STREQUAL x86_6
|
||||
QT_COMPILER_SUPPORTS_SSE4_2
|
||||
)
|
||||
|
||||
qt_extend_target(Gui CONDITION QT_FEATURE_system_zlib
|
||||
LIBRARIES
|
||||
ZLIB::ZLIB
|
||||
)
|
||||
|
||||
qt_extend_target(Gui CONDITION NOT QT_FEATURE_system_zlib
|
||||
INCLUDE_DIRECTORIES
|
||||
../3rdparty/zlib/src
|
||||
)
|
||||
|
||||
qt_extend_target(Gui CONDITION NOT QT_FEATURE_system_zlib AND NOT no_core_dep
|
||||
LIBRARIES
|
||||
Qt::Core
|
||||
)
|
||||
|
||||
qt_extend_target(Gui CONDITION QT_FEATURE_regularexpression
|
||||
SOURCES
|
||||
util/qshadergenerator.cpp util/qshadergenerator_p.h
|
||||
|
@ -8,6 +8,8 @@ set(OpenGL_GL_PREFERENCE GLVND) # special case:
|
||||
|
||||
# special case begin
|
||||
qt_find_package(X11_XCB)
|
||||
qt_find_package(WrapHarfbuzz PROVIDED_TARGETS WrapHarfbuzz::WrapHarfbuzz)
|
||||
qt_find_package(WrapPNG PROVIDED_TARGETS WrapPNG::WrapPNG)
|
||||
|
||||
if (QT_FEATURE_gui)
|
||||
if (WINRT)
|
||||
@ -259,7 +261,6 @@ qt_add_module(Gui
|
||||
../3rdparty/VulkanMemoryAllocator
|
||||
LIBRARIES
|
||||
Qt::CorePrivate
|
||||
ZLIB::ZLIB
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::Core
|
||||
PRIVATE_MODULE_INTERFACE
|
||||
@ -479,7 +480,7 @@ qt_extend_target(Gui CONDITION QT_FEATURE_png
|
||||
SOURCES
|
||||
image/qpnghandler.cpp image/qpnghandler_p.h
|
||||
LIBRARIES
|
||||
PNG::PNG
|
||||
WrapPNG::WrapPNG
|
||||
)
|
||||
|
||||
#### Keys ignored in scope 38:.:image:image/image.pri:WIN32 AND mingw:
|
||||
@ -639,6 +640,21 @@ qt_extend_target(Gui CONDITION ANDROID AND TEST_architecture_arch STREQUAL x86_6
|
||||
QT_COMPILER_SUPPORTS_SSE4_2
|
||||
)
|
||||
|
||||
qt_extend_target(Gui CONDITION QT_FEATURE_system_zlib
|
||||
LIBRARIES
|
||||
ZLIB::ZLIB
|
||||
)
|
||||
|
||||
qt_extend_target(Gui CONDITION NOT QT_FEATURE_system_zlib
|
||||
INCLUDE_DIRECTORIES
|
||||
../3rdparty/zlib/src
|
||||
)
|
||||
|
||||
qt_extend_target(Gui CONDITION NOT QT_FEATURE_system_zlib AND NOT no_core_dep
|
||||
LIBRARIES
|
||||
Qt::Core
|
||||
)
|
||||
|
||||
qt_extend_target(Gui CONDITION QT_FEATURE_regularexpression
|
||||
SOURCES
|
||||
util/qshadergenerator.cpp util/qshadergenerator_p.h
|
||||
@ -679,14 +695,6 @@ qt_extend_target(Gui CONDITION QT_FEATURE_opengl AND QT_FEATURE_opengles2
|
||||
opengl/qopenglfunctions_es2.cpp opengl/qopenglfunctions_es2.h
|
||||
)
|
||||
|
||||
# special case begin
|
||||
# Make Vulkan a global imported target, so that generator expressions involving Vulkan
|
||||
# can be correctly evaluated in any sub project directory.
|
||||
if(TARGET Vulkan::Vulkan)
|
||||
set_property(TARGET Vulkan::Vulkan PROPERTY IMPORTED_GLOBAL TRUE)
|
||||
endif()
|
||||
# special case end
|
||||
|
||||
qt_extend_target(Gui CONDITION QT_FEATURE_vulkan
|
||||
SOURCES
|
||||
rhi/qrhivulkan.cpp rhi/qrhivulkan_p.h
|
||||
|
@ -26,14 +26,14 @@ qt_find_package(ATSPI2 PROVIDED_TARGETS PkgConfig::ATSPI2)
|
||||
qt_find_package(DirectFB PROVIDED_TARGETS PkgConfig::DirectFB)
|
||||
qt_find_package(Libdrm PROVIDED_TARGETS Libdrm::Libdrm)
|
||||
qt_find_package(EGL PROVIDED_TARGETS EGL::EGL)
|
||||
qt_find_package(WrapFreetype PROVIDED_TARGETS WrapFreetype::WrapFreetype)
|
||||
qt_find_package(WrapSystemFreetype PROVIDED_TARGETS WrapSystemFreetype::WrapSystemFreetype)
|
||||
set_package_properties(WrapFreetype PROPERTIES TYPE REQUIRED)
|
||||
qt_find_package(Fontconfig PROVIDED_TARGETS Fontconfig::Fontconfig)
|
||||
qt_find_package(gbm PROVIDED_TARGETS gbm::gbm)
|
||||
qt_find_package(WrapHarfbuzz PROVIDED_TARGETS WrapHarfbuzz::WrapHarfbuzz)
|
||||
qt_find_package(WrapSystemHarfbuzz PROVIDED_TARGETS WrapSystemHarfbuzz::WrapSystemHarfbuzz)
|
||||
qt_find_package(Libinput PROVIDED_TARGETS Libinput::Libinput)
|
||||
qt_find_package(JPEG PROVIDED_TARGETS JPEG::JPEG)
|
||||
qt_find_package(PNG PROVIDED_TARGETS PNG::PNG)
|
||||
qt_find_package(WrapSystemPNG PROVIDED_TARGETS WrapSystemPNG::WrapSystemPNG)
|
||||
qt_find_package(Mtdev PROVIDED_TARGETS PkgConfig::Mtdev)
|
||||
qt_find_package(OpenGL PROVIDED_TARGETS OpenGL::GL)
|
||||
qt_find_package(GLESv2 PROVIDED_TARGETS GLESv2::GLESv2)
|
||||
@ -43,7 +43,7 @@ if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(Wayland PROVIDED_TARGETS Wayland::Server)
|
||||
endif()
|
||||
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(X11 PROVIDED_TARGETS X11::XCB)
|
||||
qt_find_package(X11 PROVIDED_TARGETS X11::X11)
|
||||
endif()
|
||||
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(X11 PROVIDED_TARGETS ${X11_SM_LIB} ${X11_ICE_LIB})
|
||||
@ -81,6 +81,9 @@ endif()
|
||||
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(XCB COMPONENTS XINERAMA PROVIDED_TARGETS XCB::XINERAMA)
|
||||
endif()
|
||||
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(X11_XCB PROVIDED_TARGETS X11::XCB)
|
||||
endif()
|
||||
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(XCB COMPONENTS XKB PROVIDED_TARGETS XCB::XKB)
|
||||
endif()
|
||||
@ -96,6 +99,9 @@ endif()
|
||||
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(XKB 0.4.1 PROVIDED_TARGETS XKB::XKB)
|
||||
endif()
|
||||
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(XKB_COMMON_X11 0.4.1 PROVIDED_TARGETS PkgConfig::XKB_COMMON_X11)
|
||||
endif()
|
||||
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(XRender PROVIDED_TARGETS PkgConfig::XRender)
|
||||
endif()
|
||||
@ -148,7 +154,7 @@ qt_config_compile_test(egl_x11
|
||||
LABEL "EGL on X11"
|
||||
LIBRARIES
|
||||
EGL::EGL
|
||||
X11::XCB
|
||||
X11::X11
|
||||
CODE
|
||||
"// Check if EGL is compatible with X. Some EGL implementations, typically on
|
||||
// embedded devices, are not intended to be used together with X. EGL support
|
||||
@ -609,10 +615,17 @@ qt_feature("freetype" PUBLIC PRIVATE
|
||||
PURPOSE "Supports the FreeType 2 font engine (and its supported font formats)."
|
||||
)
|
||||
qt_feature_definition("freetype" "QT_NO_FREETYPE" NEGATE VALUE "1")
|
||||
qt_feature("system-freetype" PRIVATE
|
||||
LABEL " Using system FreeType"
|
||||
AUTODETECT NOT MSVC
|
||||
CONDITION QT_FEATURE_freetype AND WrapSystemFreetype_FOUND
|
||||
ENABLE INPUT_freetype STREQUAL 'system'
|
||||
DISABLE INPUT_freetype STREQUAL 'qt'
|
||||
)
|
||||
qt_feature("fontconfig" PUBLIC PRIVATE
|
||||
LABEL "Fontconfig"
|
||||
AUTODETECT NOT APPLE
|
||||
CONDITION NOT MSVC AND ON AND FONTCONFIG_FOUND
|
||||
CONDITION NOT MSVC AND QT_FEATURE_system_freetype AND FONTCONFIG_FOUND
|
||||
)
|
||||
qt_feature_definition("fontconfig" "QT_NO_FONTCONFIG" NEGATE VALUE "1")
|
||||
qt_feature("gbm"
|
||||
@ -625,6 +638,13 @@ qt_feature("harfbuzz" PUBLIC PRIVATE
|
||||
CONDITION harfbuzz_FOUND
|
||||
)
|
||||
qt_feature_definition("harfbuzz" "QT_NO_HARFBUZZ" NEGATE VALUE "1")
|
||||
qt_feature("system-harfbuzz" PRIVATE
|
||||
LABEL " Using system HarfBuzz"
|
||||
AUTODETECT NOT APPLE AND NOT WIN32
|
||||
CONDITION QT_FEATURE_harfbuzz AND WrapSystemHarfbuzz_FOUND
|
||||
ENABLE INPUT_harfbuzz STREQUAL 'system'
|
||||
DISABLE INPUT_harfbuzz STREQUAL 'qt'
|
||||
)
|
||||
qt_feature("qqnx_imf" PRIVATE
|
||||
LABEL "IMF"
|
||||
CONDITION libs.imf OR FIXME
|
||||
@ -810,11 +830,24 @@ qt_feature("jpeg" PRIVATE
|
||||
DISABLE INPUT_libjpeg STREQUAL 'no'
|
||||
)
|
||||
qt_feature_definition("jpeg" "QT_NO_IMAGEFORMAT_JPEG" NEGATE)
|
||||
qt_feature("system-jpeg" PRIVATE
|
||||
LABEL " Using system libjpeg"
|
||||
CONDITION QT_FEATURE_jpeg AND JPEG_FOUND
|
||||
ENABLE INPUT_libjpeg STREQUAL 'system'
|
||||
DISABLE INPUT_libjpeg STREQUAL 'qt'
|
||||
)
|
||||
qt_feature("png" PRIVATE
|
||||
LABEL "PNG"
|
||||
DISABLE INPUT_libpng STREQUAL 'no'
|
||||
)
|
||||
qt_feature_definition("png" "QT_NO_IMAGEFORMAT_PNG" NEGATE)
|
||||
qt_feature("system-png" PRIVATE
|
||||
LABEL " Using system libpng"
|
||||
AUTODETECT QT_FEATURE_system_zlib
|
||||
CONDITION QT_FEATURE_png AND WrapSystemPNG_FOUND
|
||||
ENABLE INPUT_libpng STREQUAL 'system'
|
||||
DISABLE INPUT_libpng STREQUAL 'qt'
|
||||
)
|
||||
qt_feature("sessionmanager" PUBLIC
|
||||
SECTION "Kernel"
|
||||
LABEL "Session Management"
|
||||
@ -884,7 +917,7 @@ qt_feature("xkbcommon" PRIVATE
|
||||
)
|
||||
qt_feature("xkbcommon-x11" PRIVATE
|
||||
LABEL "xkbcommon-x11"
|
||||
CONDITION QT_FEATURE_xkbcommon AND XKB_FOUND
|
||||
CONDITION QT_FEATURE_xkbcommon AND XKB_COMMON_X11_FOUND
|
||||
)
|
||||
qt_feature("xlib" PRIVATE
|
||||
LABEL "XLib"
|
||||
|
@ -50,7 +50,6 @@ qt_add_module(Network
|
||||
kernel
|
||||
LIBRARIES
|
||||
Qt::CorePrivate
|
||||
ZLIB::ZLIB
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::Core
|
||||
PRIVATE_MODULE_INTERFACE
|
||||
@ -147,6 +146,21 @@ qt_extend_target(Network CONDITION QT_FEATURE_http
|
||||
socket/qhttpsocketengine.cpp socket/qhttpsocketengine_p.h
|
||||
)
|
||||
|
||||
qt_extend_target(Network CONDITION QT_FEATURE_system_zlib
|
||||
LIBRARIES
|
||||
ZLIB::ZLIB
|
||||
)
|
||||
|
||||
qt_extend_target(Network CONDITION NOT QT_FEATURE_system_zlib
|
||||
INCLUDE_DIRECTORIES
|
||||
../3rdparty/zlib/src
|
||||
)
|
||||
|
||||
qt_extend_target(Network CONDITION NOT QT_FEATURE_system_zlib AND NOT no_core_dep
|
||||
LIBRARIES
|
||||
Qt::Core
|
||||
)
|
||||
|
||||
qt_extend_target(Network CONDITION QT_FEATURE_topleveldomain
|
||||
SOURCES
|
||||
kernel/qtldurl.cpp kernel/qtldurl_p.h
|
||||
|
@ -63,7 +63,6 @@ qt_add_module(Network
|
||||
kernel
|
||||
LIBRARIES
|
||||
Qt::CorePrivate
|
||||
ZLIB::ZLIB
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::Core
|
||||
PRIVATE_MODULE_INTERFACE
|
||||
@ -160,6 +159,21 @@ qt_extend_target(Network CONDITION QT_FEATURE_http
|
||||
socket/qhttpsocketengine.cpp socket/qhttpsocketengine_p.h
|
||||
)
|
||||
|
||||
qt_extend_target(Network CONDITION QT_FEATURE_system_zlib
|
||||
LIBRARIES
|
||||
ZLIB::ZLIB
|
||||
)
|
||||
|
||||
qt_extend_target(Network CONDITION NOT QT_FEATURE_system_zlib
|
||||
INCLUDE_DIRECTORIES
|
||||
../3rdparty/zlib/src
|
||||
)
|
||||
|
||||
qt_extend_target(Network CONDITION NOT QT_FEATURE_system_zlib AND NOT no_core_dep
|
||||
LIBRARIES
|
||||
Qt::Core
|
||||
)
|
||||
|
||||
qt_extend_target(Network CONDITION QT_FEATURE_topleveldomain
|
||||
SOURCES
|
||||
kernel/qtldurl.cpp kernel/qtldurl_p.h
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Generated from fontdatabases.pro.
|
||||
|
||||
qt_find_package(WrapFreetype) # special case
|
||||
qt_find_package(WrapFreetype PROVIDED_TARGETS WrapFreetype::WrapFreetype) # special case
|
||||
qt_find_package(Fontconfig) # special case
|
||||
|
||||
#####################################################################
|
||||
|
@ -11,7 +11,6 @@ qt_add_plugin(QJpegPlugin
|
||||
main.cpp main.h
|
||||
qjpeghandler.cpp qjpeghandler_p.h
|
||||
PUBLIC_LIBRARIES
|
||||
JPEG::JPEG
|
||||
Qt::Core
|
||||
Qt::CorePrivate
|
||||
Qt::Gui
|
||||
@ -20,3 +19,76 @@ qt_add_plugin(QJpegPlugin
|
||||
|
||||
#### Keys ignored in scope 1:.:.:jpeg.pro:<TRUE>:
|
||||
# OTHER_FILES = "jpeg.json"
|
||||
|
||||
## Scopes:
|
||||
#####################################################################
|
||||
|
||||
qt_extend_target(QJpegPlugin CONDITION QT_FEATURE_system_jpeg
|
||||
PUBLIC_LIBRARIES
|
||||
JPEG::JPEG
|
||||
)
|
||||
|
||||
qt_extend_target(QJpegPlugin CONDITION NOT QT_FEATURE_system_jpeg
|
||||
SOURCES
|
||||
../../../3rdparty/libjpeg/src/jaricom.c
|
||||
../../../3rdparty/libjpeg/src/jcapimin.c
|
||||
../../../3rdparty/libjpeg/src/jcapistd.c
|
||||
../../../3rdparty/libjpeg/src/jcarith.c
|
||||
../../../3rdparty/libjpeg/src/jccoefct.c
|
||||
../../../3rdparty/libjpeg/src/jccolor.c
|
||||
../../../3rdparty/libjpeg/src/jcdctmgr.c
|
||||
../../../3rdparty/libjpeg/src/jchuff.c
|
||||
../../../3rdparty/libjpeg/src/jcinit.c
|
||||
../../../3rdparty/libjpeg/src/jcmainct.c
|
||||
../../../3rdparty/libjpeg/src/jcmarker.c
|
||||
../../../3rdparty/libjpeg/src/jcmaster.c
|
||||
../../../3rdparty/libjpeg/src/jcomapi.c
|
||||
../../../3rdparty/libjpeg/src/jcparam.c
|
||||
../../../3rdparty/libjpeg/src/jcphuff.c
|
||||
../../../3rdparty/libjpeg/src/jcprepct.c
|
||||
../../../3rdparty/libjpeg/src/jcsample.c
|
||||
../../../3rdparty/libjpeg/src/jctrans.c
|
||||
../../../3rdparty/libjpeg/src/jdapimin.c
|
||||
../../../3rdparty/libjpeg/src/jdapistd.c
|
||||
../../../3rdparty/libjpeg/src/jdarith.c
|
||||
../../../3rdparty/libjpeg/src/jdatadst.c
|
||||
../../../3rdparty/libjpeg/src/jdatasrc.c
|
||||
../../../3rdparty/libjpeg/src/jdcoefct.c
|
||||
../../../3rdparty/libjpeg/src/jdcolor.c
|
||||
../../../3rdparty/libjpeg/src/jddctmgr.c
|
||||
../../../3rdparty/libjpeg/src/jdhuff.c
|
||||
../../../3rdparty/libjpeg/src/jdinput.c
|
||||
../../../3rdparty/libjpeg/src/jdmainct.c
|
||||
../../../3rdparty/libjpeg/src/jdmarker.c
|
||||
../../../3rdparty/libjpeg/src/jdmaster.c
|
||||
../../../3rdparty/libjpeg/src/jdmerge.c
|
||||
../../../3rdparty/libjpeg/src/jdphuff.c
|
||||
../../../3rdparty/libjpeg/src/jdpostct.c
|
||||
../../../3rdparty/libjpeg/src/jdsample.c
|
||||
../../../3rdparty/libjpeg/src/jdtrans.c
|
||||
../../../3rdparty/libjpeg/src/jerror.c
|
||||
../../../3rdparty/libjpeg/src/jfdctflt.c
|
||||
../../../3rdparty/libjpeg/src/jfdctfst.c
|
||||
../../../3rdparty/libjpeg/src/jfdctint.c
|
||||
../../../3rdparty/libjpeg/src/jidctflt.c
|
||||
../../../3rdparty/libjpeg/src/jidctfst.c
|
||||
../../../3rdparty/libjpeg/src/jidctint.c
|
||||
../../../3rdparty/libjpeg/src/jidctred.c
|
||||
../../../3rdparty/libjpeg/src/jmemmgr.c
|
||||
../../../3rdparty/libjpeg/src/jmemnobs.c
|
||||
../../../3rdparty/libjpeg/src/jquant1.c
|
||||
../../../3rdparty/libjpeg/src/jquant2.c
|
||||
../../../3rdparty/libjpeg/src/jsimd_none.c
|
||||
../../../3rdparty/libjpeg/src/jutils.c
|
||||
INCLUDE_DIRECTORIES
|
||||
../../../3rdparty/libjpeg
|
||||
../../../3rdparty/libjpeg/src
|
||||
)
|
||||
|
||||
qt_extend_target(QJpegPlugin CONDITION WINRT AND NOT QT_FEATURE_system_jpeg
|
||||
DEFINES
|
||||
NO_GETENV
|
||||
)
|
||||
|
||||
#### Keys ignored in scope 6:.:../../../3rdparty:../../../3rdparty/libjpeg.pri:GCC:
|
||||
# QMAKE_CFLAGS_WARN_ON = "-Wno-unused-parameter" "-Wno-main"
|
||||
|
@ -13,7 +13,6 @@ qt_add_plugin(QJpegPlugin
|
||||
main.cpp main.h
|
||||
qjpeghandler.cpp qjpeghandler_p.h
|
||||
PUBLIC_LIBRARIES
|
||||
JPEG::JPEG
|
||||
Qt::Core
|
||||
Qt::CorePrivate
|
||||
Qt::Gui
|
||||
@ -22,3 +21,76 @@ qt_add_plugin(QJpegPlugin
|
||||
|
||||
#### Keys ignored in scope 1:.:.:jpeg.pro:<TRUE>:
|
||||
# OTHER_FILES = "jpeg.json"
|
||||
|
||||
## Scopes:
|
||||
#####################################################################
|
||||
|
||||
qt_extend_target(QJpegPlugin CONDITION QT_FEATURE_system_jpeg
|
||||
PUBLIC_LIBRARIES
|
||||
JPEG::JPEG
|
||||
)
|
||||
|
||||
qt_extend_target(QJpegPlugin CONDITION NOT QT_FEATURE_system_jpeg
|
||||
SOURCES
|
||||
../../../3rdparty/libjpeg/src/jaricom.c
|
||||
../../../3rdparty/libjpeg/src/jcapimin.c
|
||||
../../../3rdparty/libjpeg/src/jcapistd.c
|
||||
../../../3rdparty/libjpeg/src/jcarith.c
|
||||
../../../3rdparty/libjpeg/src/jccoefct.c
|
||||
../../../3rdparty/libjpeg/src/jccolor.c
|
||||
../../../3rdparty/libjpeg/src/jcdctmgr.c
|
||||
../../../3rdparty/libjpeg/src/jchuff.c
|
||||
../../../3rdparty/libjpeg/src/jcinit.c
|
||||
../../../3rdparty/libjpeg/src/jcmainct.c
|
||||
../../../3rdparty/libjpeg/src/jcmarker.c
|
||||
../../../3rdparty/libjpeg/src/jcmaster.c
|
||||
../../../3rdparty/libjpeg/src/jcomapi.c
|
||||
../../../3rdparty/libjpeg/src/jcparam.c
|
||||
../../../3rdparty/libjpeg/src/jcphuff.c
|
||||
../../../3rdparty/libjpeg/src/jcprepct.c
|
||||
../../../3rdparty/libjpeg/src/jcsample.c
|
||||
../../../3rdparty/libjpeg/src/jctrans.c
|
||||
../../../3rdparty/libjpeg/src/jdapimin.c
|
||||
../../../3rdparty/libjpeg/src/jdapistd.c
|
||||
../../../3rdparty/libjpeg/src/jdarith.c
|
||||
../../../3rdparty/libjpeg/src/jdatadst.c
|
||||
../../../3rdparty/libjpeg/src/jdatasrc.c
|
||||
../../../3rdparty/libjpeg/src/jdcoefct.c
|
||||
../../../3rdparty/libjpeg/src/jdcolor.c
|
||||
../../../3rdparty/libjpeg/src/jddctmgr.c
|
||||
../../../3rdparty/libjpeg/src/jdhuff.c
|
||||
../../../3rdparty/libjpeg/src/jdinput.c
|
||||
../../../3rdparty/libjpeg/src/jdmainct.c
|
||||
../../../3rdparty/libjpeg/src/jdmarker.c
|
||||
../../../3rdparty/libjpeg/src/jdmaster.c
|
||||
../../../3rdparty/libjpeg/src/jdmerge.c
|
||||
../../../3rdparty/libjpeg/src/jdphuff.c
|
||||
../../../3rdparty/libjpeg/src/jdpostct.c
|
||||
../../../3rdparty/libjpeg/src/jdsample.c
|
||||
../../../3rdparty/libjpeg/src/jdtrans.c
|
||||
../../../3rdparty/libjpeg/src/jerror.c
|
||||
../../../3rdparty/libjpeg/src/jfdctflt.c
|
||||
../../../3rdparty/libjpeg/src/jfdctfst.c
|
||||
../../../3rdparty/libjpeg/src/jfdctint.c
|
||||
../../../3rdparty/libjpeg/src/jidctflt.c
|
||||
../../../3rdparty/libjpeg/src/jidctfst.c
|
||||
../../../3rdparty/libjpeg/src/jidctint.c
|
||||
../../../3rdparty/libjpeg/src/jidctred.c
|
||||
../../../3rdparty/libjpeg/src/jmemmgr.c
|
||||
../../../3rdparty/libjpeg/src/jmemnobs.c
|
||||
../../../3rdparty/libjpeg/src/jquant1.c
|
||||
../../../3rdparty/libjpeg/src/jquant2.c
|
||||
../../../3rdparty/libjpeg/src/jsimd_none.c
|
||||
../../../3rdparty/libjpeg/src/jutils.c
|
||||
INCLUDE_DIRECTORIES
|
||||
../../../3rdparty/libjpeg
|
||||
../../../3rdparty/libjpeg/src
|
||||
)
|
||||
|
||||
qt_extend_target(QJpegPlugin CONDITION WINRT AND NOT QT_FEATURE_system_jpeg
|
||||
DEFINES
|
||||
NO_GETENV
|
||||
)
|
||||
|
||||
#### Keys ignored in scope 6:.:../../../3rdparty:../../../3rdparty/libjpeg.pri:GCC:
|
||||
# QMAKE_CFLAGS_WARN_ON = "-Wno-unused-parameter" "-Wno-main"
|
||||
|
@ -4,6 +4,8 @@
|
||||
## QMinimalIntegrationPlugin Plugin:
|
||||
#####################################################################
|
||||
|
||||
qt_find_package(WrapFreetype PROVIDED_TARGETS WrapFreetype::WrapFreetype) # special case
|
||||
|
||||
qt_add_plugin(QMinimalIntegrationPlugin
|
||||
OUTPUT_NAME qminimal
|
||||
TYPE platforms
|
||||
|
@ -107,6 +107,13 @@ qt_add_module(Bootstrap
|
||||
QT_VERSION_MINOR=
|
||||
QT_VERSION_PATCH=
|
||||
QT_VERSION_STR=\"\"
|
||||
PUBLIC_DEFINES
|
||||
QT_BOOTSTRAPPED
|
||||
QT_NO_CAST_TO_ASCII
|
||||
QT_VERSION_MAJOR=
|
||||
QT_VERSION_MINOR=
|
||||
QT_VERSION_PATCH=
|
||||
QT_VERSION_STR=\"\"
|
||||
INCLUDE_DIRECTORIES
|
||||
..
|
||||
../../3rdparty/tinycbor/src
|
||||
@ -184,7 +191,7 @@ qt_extend_target(Bootstrap CONDITION UNIX AND NOT APPLE_OSX
|
||||
../../corelib/io/qstandardpaths_unix.cpp
|
||||
)
|
||||
|
||||
qt_extend_target(Bootstrap CONDITION CMAKE_CROSSCOMPILING
|
||||
qt_extend_target(Bootstrap CONDITION CMAKE_CROSSCOMPILING OR NOT QT_FEATURE_system_zlib
|
||||
SOURCES
|
||||
../../3rdparty/zlib/src/adler32.c
|
||||
../../3rdparty/zlib/src/compress.c
|
||||
@ -205,7 +212,7 @@ qt_extend_target(Bootstrap CONDITION CMAKE_CROSSCOMPILING
|
||||
../../3rdparty/zlib/src
|
||||
)
|
||||
|
||||
qt_extend_target(Bootstrap CONDITION NOT CMAKE_CROSSCOMPILING
|
||||
qt_extend_target(Bootstrap CONDITION QT_FEATURE_system_zlib AND NOT CMAKE_CROSSCOMPILING
|
||||
LIBRARIES
|
||||
ZLIB::ZLIB
|
||||
)
|
||||
|
@ -4,8 +4,11 @@
|
||||
## Bootstrap Module:
|
||||
#####################################################################
|
||||
|
||||
# special case:
|
||||
# special case begin
|
||||
# The bootstrap library has a few manual tweaks compared to other
|
||||
# libraries.
|
||||
add_library(Bootstrap STATIC)
|
||||
# special case end
|
||||
qt_extend_target(Bootstrap
|
||||
SOURCES
|
||||
../../corelib/codecs/qlatincodec.cpp
|
||||
@ -110,11 +113,10 @@ qt_extend_target(Bootstrap
|
||||
..
|
||||
../../3rdparty/tinycbor/src
|
||||
PUBLIC_INCLUDE_DIRECTORIES # special case
|
||||
$<TARGET_PROPERTY:Core,INCLUDE_DIRECTORIES>
|
||||
$<TARGET_PROPERTY:Xml,INCLUDE_DIRECTORIES>
|
||||
$<TARGET_PROPERTY:Core,INCLUDE_DIRECTORIES> # special case
|
||||
$<TARGET_PROPERTY:Xml,INCLUDE_DIRECTORIES> # special case
|
||||
PUBLIC_LIBRARIES # special case
|
||||
ZLIB::ZLIB
|
||||
Qt::Platform
|
||||
Qt::Platform # special case
|
||||
)
|
||||
|
||||
#### Keys ignored in scope 1:.:.:bootstrap.pro:<TRUE>:
|
||||
@ -189,34 +191,31 @@ qt_extend_target(Bootstrap CONDITION UNIX AND NOT APPLE_OSX
|
||||
../../corelib/io/qstandardpaths_unix.cpp
|
||||
)
|
||||
|
||||
# special case begin
|
||||
# These lines need to commented out. This will never get cross_compiled!
|
||||
#qt_extend_target(Bootstrap CONDITION CMAKE_CROSSCOMPILING
|
||||
# SOURCES
|
||||
# ../../3rdparty/zlib/src/adler32.c
|
||||
# ../../3rdparty/zlib/src/compress.c
|
||||
# ../../3rdparty/zlib/src/crc32.c
|
||||
# ../../3rdparty/zlib/src/deflate.c
|
||||
# ../../3rdparty/zlib/src/gzclose.c
|
||||
# ../../3rdparty/zlib/src/gzlib.c
|
||||
# ../../3rdparty/zlib/src/gzread.c
|
||||
# ../../3rdparty/zlib/src/gzwrite.c
|
||||
# ../../3rdparty/zlib/src/infback.c
|
||||
# ../../3rdparty/zlib/src/inffast.c
|
||||
# ../../3rdparty/zlib/src/inflate.c
|
||||
# ../../3rdparty/zlib/src/inftrees.c
|
||||
# ../../3rdparty/zlib/src/trees.c
|
||||
# ../../3rdparty/zlib/src/uncompr.c
|
||||
# ../../3rdparty/zlib/src/zutil.c
|
||||
# INCLUDE_DIRECTORIES
|
||||
# ../../3rdparty/zlib/src
|
||||
#)
|
||||
#
|
||||
#qt_extend_target(Bootstrap CONDITION NOT CMAKE_CROSSCOMPILING
|
||||
# LIBRARIES
|
||||
# ZLIB::ZLIB
|
||||
#)
|
||||
# special case end
|
||||
qt_extend_target(Bootstrap CONDITION CMAKE_CROSSCOMPILING OR NOT QT_FEATURE_system_zlib
|
||||
SOURCES
|
||||
../../3rdparty/zlib/src/adler32.c
|
||||
../../3rdparty/zlib/src/compress.c
|
||||
../../3rdparty/zlib/src/crc32.c
|
||||
../../3rdparty/zlib/src/deflate.c
|
||||
../../3rdparty/zlib/src/gzclose.c
|
||||
../../3rdparty/zlib/src/gzlib.c
|
||||
../../3rdparty/zlib/src/gzread.c
|
||||
../../3rdparty/zlib/src/gzwrite.c
|
||||
../../3rdparty/zlib/src/infback.c
|
||||
../../3rdparty/zlib/src/inffast.c
|
||||
../../3rdparty/zlib/src/inflate.c
|
||||
../../3rdparty/zlib/src/inftrees.c
|
||||
../../3rdparty/zlib/src/trees.c
|
||||
../../3rdparty/zlib/src/uncompr.c
|
||||
../../3rdparty/zlib/src/zutil.c
|
||||
INCLUDE_DIRECTORIES
|
||||
../../3rdparty/zlib/src
|
||||
)
|
||||
|
||||
qt_extend_target(Bootstrap CONDITION QT_FEATURE_system_zlib AND NOT CMAKE_CROSSCOMPILING
|
||||
LIBRARIES
|
||||
ZLIB::ZLIB
|
||||
)
|
||||
|
||||
qt_extend_target(Bootstrap CONDITION WIN32 AND mingw
|
||||
PUBLIC_LIBRARIES
|
||||
|
@ -202,7 +202,25 @@ def parseLib(ctx, lib, data, cm_fh, cmake_find_packages_set):
|
||||
|
||||
cmake_find_packages_set.add(newlib.targetName)
|
||||
|
||||
cm_fh.write(generate_find_package_info(newlib, emit_if=emit_if))
|
||||
find_package_kwargs = {"emit_if": emit_if}
|
||||
if newlib.is_bundled_with_qt:
|
||||
# If a library is bundled with Qt, it has 2 FindFoo.cmake
|
||||
# modules: WrapFoo and WrapSystemFoo.
|
||||
# FindWrapSystemFoo.cmake will try to find the 'Foo' library in
|
||||
# the usual CMake locations, and will create a
|
||||
# WrapSystemFoo::WrapSystemFoo target pointing to the library.
|
||||
#
|
||||
# FindWrapFoo.cmake will create a WrapFoo::WrapFoo target which
|
||||
# will link either against the WrapSystemFoo or QtBundledFoo
|
||||
# target depending on certain feature values.
|
||||
#
|
||||
# Because the following qt_find_package call is for
|
||||
# configure.cmake consumption, we make the assumption that
|
||||
# configure.cmake is interested in finding the system library
|
||||
# for the purpose of enabling or disabling a system_foo feature.
|
||||
find_package_kwargs["use_system_package_name"] = True
|
||||
|
||||
cm_fh.write(generate_find_package_info(newlib, **find_package_kwargs))
|
||||
|
||||
|
||||
def lineify(label, value, quote=True):
|
||||
@ -225,12 +243,7 @@ def map_condition(condition):
|
||||
return "OFF"
|
||||
assert isinstance(condition, str)
|
||||
|
||||
mapped_features = {
|
||||
"gbm": "gbm_FOUND",
|
||||
"system-xcb": "ON",
|
||||
"system-freetype": "ON",
|
||||
"system-pcre2": "ON",
|
||||
}
|
||||
mapped_features = {"gbm": "gbm_FOUND", "system-xcb": "ON"}
|
||||
|
||||
# Turn foo != "bar" into (NOT foo STREQUAL 'bar')
|
||||
condition = re.sub(r"(.+)\s*!=\s*('.+')", "(! \\1 == \\2)", condition)
|
||||
@ -259,6 +272,12 @@ def map_condition(condition):
|
||||
if libmapping.appendFoundSuffix:
|
||||
substitution += "_FOUND"
|
||||
|
||||
# Assume that feature conditions are interested whether
|
||||
# a system library is found, rather than the bundled one
|
||||
# which we always know we can build.
|
||||
if libmapping.is_bundled_with_qt:
|
||||
substitution = substitution.replace("Wrap", "WrapSystem")
|
||||
|
||||
elif match.group(1) == "features":
|
||||
feature = match.group(2)
|
||||
if feature in mapped_features:
|
||||
@ -748,14 +767,8 @@ def parseFeature(ctx, feature, data, cm_fh):
|
||||
"disable": "NOT TEST_sun_iconv",
|
||||
},
|
||||
"system-doubleconversion": None, # No system libraries anymore!
|
||||
"system-freetype": None,
|
||||
"system-harfbuzz": None,
|
||||
"system-jpeg": None,
|
||||
"system-pcre2": None,
|
||||
"system-png": None,
|
||||
"system-sqlite": None,
|
||||
"system-xcb": None,
|
||||
"system-zlib": None,
|
||||
"tiff": {"condition": "QT_FEATURE_imageformatplugin AND TIFF_FOUND"},
|
||||
"use_gold_linker": None,
|
||||
"verifyspec": None, # qmake specific...
|
||||
|
@ -41,6 +41,7 @@ class LibraryMapping:
|
||||
extra: typing.List[str] = [],
|
||||
appendFoundSuffix: bool = True,
|
||||
emit_if: str = "",
|
||||
is_bundled_with_qt: bool = False,
|
||||
) -> None:
|
||||
self.soName = soName
|
||||
self.packageName = packageName
|
||||
@ -49,6 +50,9 @@ class LibraryMapping:
|
||||
self.extra = extra
|
||||
self.targetName = targetName
|
||||
|
||||
# True if qt bundles the library sources as part of Qt.
|
||||
self.is_bundled_with_qt = is_bundled_with_qt
|
||||
|
||||
# if emit_if is non-empty, the generated find_package call
|
||||
# for a library will be surrounded by this condition.
|
||||
self.emit_if = emit_if
|
||||
@ -369,8 +373,10 @@ _qt_library_map = [
|
||||
LibraryMapping("axcontainer", "Qt6", "Qt::AxContainer", extra=["COMPONENTS", "AxContainer"]),
|
||||
LibraryMapping(
|
||||
"webkitwidgets", "Qt6", "Qt::WebKitWidgets", extra=["COMPONENTS", "WebKitWidgets"]
|
||||
),
|
||||
LibraryMapping(
|
||||
"zlib", "Qt6", "Qt::Zlib", extra=["COMPONENTS", "Zlib"]
|
||||
)
|
||||
# qtzlib: No longer supported.
|
||||
]
|
||||
|
||||
# Note that the library map is adjusted dynamically further down.
|
||||
@ -391,13 +397,21 @@ _library_map = [
|
||||
LibraryMapping(
|
||||
"fontconfig", "Fontconfig", "Fontconfig::Fontconfig", resultVariable="FONTCONFIG"
|
||||
),
|
||||
LibraryMapping("freetype", "WrapFreetype", "WrapFreetype::WrapFreetype", extra=["REQUIRED"]),
|
||||
LibraryMapping(
|
||||
"freetype",
|
||||
"WrapFreetype",
|
||||
"WrapFreetype::WrapFreetype",
|
||||
extra=["REQUIRED"],
|
||||
is_bundled_with_qt=True,
|
||||
),
|
||||
LibraryMapping("gbm", "gbm", "gbm::gbm"),
|
||||
LibraryMapping("glib", "GLIB2", "GLIB2::GLIB2"),
|
||||
LibraryMapping("gnu_iconv", None, None),
|
||||
LibraryMapping("gtk3", "GTK3", "PkgConfig::GTK3"),
|
||||
LibraryMapping("gssapi", "GSSAPI", "GSSAPI::GSSAPI"),
|
||||
LibraryMapping("harfbuzz", "WrapHarfbuzz", "WrapHarfbuzz::WrapHarfbuzz"),
|
||||
LibraryMapping(
|
||||
"harfbuzz", "WrapHarfbuzz", "WrapHarfbuzz::WrapHarfbuzz", is_bundled_with_qt=True
|
||||
),
|
||||
LibraryMapping("host_dbus", None, None),
|
||||
LibraryMapping(
|
||||
"icu", "ICU", "ICU::i18n ICU::uc ICU::data", extra=["COMPONENTS", "i18n", "uc", "data"]
|
||||
@ -409,7 +423,7 @@ _library_map = [
|
||||
LibraryMapping("libdl", None, "${CMAKE_DL_LIBS}"),
|
||||
LibraryMapping("libinput", "Libinput", "Libinput::Libinput"),
|
||||
LibraryMapping("libjpeg", "JPEG", "JPEG::JPEG"), # see also jpeg
|
||||
LibraryMapping("libpng", "PNG", "PNG::PNG"),
|
||||
LibraryMapping("libpng", "WrapPNG", "WrapPNG::WrapPNG", is_bundled_with_qt=True),
|
||||
LibraryMapping("libproxy", "Libproxy", "PkgConfig::Libproxy"),
|
||||
LibraryMapping("librt", "WrapRt", "WrapRt"),
|
||||
LibraryMapping("libudev", "Libudev", "PkgConfig::Libudev"),
|
||||
@ -428,7 +442,9 @@ _library_map = [
|
||||
),
|
||||
LibraryMapping("openssl", "OpenSSL", "OpenSSL::SSL"),
|
||||
LibraryMapping("oci", "Oracle", "Oracle::OCI"),
|
||||
LibraryMapping("pcre2", "WrapPCRE2", "WrapPCRE2::WrapPCRE2", extra=["REQUIRED"]),
|
||||
LibraryMapping(
|
||||
"pcre2", "WrapPCRE2", "WrapPCRE2::WrapPCRE2", extra=["REQUIRED"], is_bundled_with_qt=True
|
||||
),
|
||||
LibraryMapping("posix_iconv", None, None),
|
||||
LibraryMapping("pps", "PPS", "PPS::PPS"),
|
||||
LibraryMapping("psql", "PostgreSQL", "PostgreSQL::PostgreSQL"),
|
||||
@ -532,7 +548,7 @@ _library_map = [
|
||||
LibraryMapping("xkbcommon", "XKB", "XKB::XKB", extra=["0.4.1"]),
|
||||
LibraryMapping("xlib", "X11", "X11::X11"),
|
||||
LibraryMapping("xrender", "XRender", "PkgConfig::XRender"),
|
||||
LibraryMapping("zlib", "ZLIB", "ZLIB::ZLIB", extra=["REQUIRED"]),
|
||||
LibraryMapping("zlib", "ZLIB", "ZLIB::ZLIB"),
|
||||
LibraryMapping("zstd", "ZSTD", "ZSTD::ZSTD"),
|
||||
LibraryMapping("tiff", "TIFF", "TIFF::TIFF"),
|
||||
LibraryMapping("webp", "WrapWebP", "WrapWebP::WrapWebP"),
|
||||
@ -671,7 +687,12 @@ def map_3rd_party_library(lib: str) -> str:
|
||||
|
||||
|
||||
def generate_find_package_info(
|
||||
lib: LibraryMapping, use_qt_find_package: bool = True, *, indent: int = 0, emit_if: str = ""
|
||||
lib: LibraryMapping,
|
||||
use_qt_find_package: bool = True,
|
||||
*,
|
||||
indent: int = 0,
|
||||
emit_if: str = "",
|
||||
use_system_package_name: bool = False,
|
||||
) -> str:
|
||||
isRequired = False
|
||||
|
||||
@ -688,6 +709,13 @@ def generate_find_package_info(
|
||||
if cmake_target_name.endswith("_nolink") or cmake_target_name.endswith("/nolink"):
|
||||
cmake_target_name = cmake_target_name[:-7]
|
||||
|
||||
initial_package_name = lib.packageName
|
||||
package_name = initial_package_name
|
||||
if use_system_package_name:
|
||||
replace_args = ["Wrap", "WrapSystem"]
|
||||
package_name = package_name.replace(*replace_args)
|
||||
cmake_target_name = cmake_target_name.replace(*replace_args)
|
||||
|
||||
if cmake_target_name and use_qt_find_package:
|
||||
extra += ["PROVIDED_TARGETS", cmake_target_name]
|
||||
|
||||
@ -697,17 +725,19 @@ def generate_find_package_info(
|
||||
|
||||
if use_qt_find_package:
|
||||
if extra:
|
||||
result = f"{ind}qt_find_package({lib.packageName} {' '.join(extra)})\n"
|
||||
result = f"{ind}qt_find_package({package_name} {' '.join(extra)})\n"
|
||||
else:
|
||||
result = f"{ind}qt_find_package({lib.packageName})\n"
|
||||
result = f"{ind}qt_find_package({package_name})\n"
|
||||
|
||||
if isRequired:
|
||||
result += f"{ind}set_package_properties({lib.packageName} PROPERTIES TYPE REQUIRED)\n"
|
||||
result += (
|
||||
f"{ind}set_package_properties({initial_package_name} PROPERTIES TYPE REQUIRED)\n"
|
||||
)
|
||||
else:
|
||||
if extra:
|
||||
result = f"{ind}find_package({lib.packageName} {' '.join(extra)})\n"
|
||||
result = f"{ind}find_package({package_name} {' '.join(extra)})\n"
|
||||
else:
|
||||
result = f"{ind}find_package({lib.packageName})\n"
|
||||
result = f"{ind}find_package({package_name})\n"
|
||||
|
||||
# If a package should be found only in certain conditions, wrap
|
||||
# the find_package call within that condition.
|
||||
|
@ -1556,8 +1556,11 @@ def map_condition(condition: str) -> str:
|
||||
part = f"TARGET {map_qt_library(feature.group(2))}"
|
||||
else:
|
||||
feature_name = featureName(feature.group(2))
|
||||
if feature_name.startswith("system_") and is_known_3rd_party_library(
|
||||
feature_name[7:]
|
||||
if (
|
||||
feature_name.startswith("system_")
|
||||
and is_known_3rd_party_library(feature_name[7:])
|
||||
and not feature_name.startswith("system_jpeg")
|
||||
and not feature_name.startswith("system_zlib")
|
||||
):
|
||||
part = "ON"
|
||||
elif feature == "dlopen":
|
||||
@ -1955,14 +1958,46 @@ def write_defines(
|
||||
write_list(cm_fh, defines, cmake_parameter, indent, footer=footer)
|
||||
|
||||
|
||||
def write_3rd_party_defines(
|
||||
cm_fh: IO[str], scope: Scope, cmake_parameter: str, *, indent: int = 0, footer: str = ""
|
||||
):
|
||||
defines = scope.expand("MODULE_DEFINES")
|
||||
write_list(cm_fh, defines, cmake_parameter, indent, footer=footer)
|
||||
|
||||
|
||||
def get_include_paths_helper(scope: Scope, include_var_name: str) -> List[str]:
|
||||
includes = [i.rstrip("/") or ("/") for i in scope.get_files(include_var_name)]
|
||||
return includes
|
||||
|
||||
|
||||
def write_include_paths(
|
||||
cm_fh: IO[str], scope: Scope, cmake_parameter: str, *, indent: int = 0, footer: str = ""
|
||||
):
|
||||
includes = [i.rstrip("/") or ("/") for i in scope.get_files("INCLUDEPATH")]
|
||||
|
||||
includes = get_include_paths_helper(scope, "INCLUDEPATH")
|
||||
write_list(cm_fh, includes, cmake_parameter, indent, footer=footer)
|
||||
|
||||
|
||||
def write_3rd_party_include_paths(
|
||||
cm_fh: IO[str], scope: Scope, cmake_parameter: str, *, indent: int = 0, footer: str = ""
|
||||
):
|
||||
# Used in qt_helper_lib.prf.
|
||||
includes = get_include_paths_helper(scope, "MODULE_INCLUDEPATH")
|
||||
|
||||
# Wrap the includes in BUILD_INTERFACE generator expression, because
|
||||
# the include paths point to a source dir, and CMake will error out
|
||||
# when trying to create consumable exported targets.
|
||||
processed_includes = []
|
||||
for i in includes:
|
||||
# CMake generator expressions don't seem to like relative paths.
|
||||
# Make them absolute relative to the source dir.
|
||||
if not os.path.isabs(i) and not i.startswith("$"):
|
||||
i = f"${{CMAKE_CURRENT_SOURCE_DIR}}/{i}"
|
||||
i = f"$<BUILD_INTERFACE:{i}>"
|
||||
processed_includes.append(i)
|
||||
|
||||
write_list(cm_fh, processed_includes, cmake_parameter, indent, footer=footer)
|
||||
|
||||
|
||||
def write_compile_options(
|
||||
cm_fh: IO[str], scope: Scope, cmake_parameter: str, *, indent: int = 0, footer: str = ""
|
||||
):
|
||||
@ -2051,8 +2086,12 @@ def write_sources_section(
|
||||
|
||||
write_defines(cm_fh, scope, "DEFINES", indent=indent + 1)
|
||||
|
||||
write_3rd_party_defines(cm_fh, scope, "PUBLIC_DEFINES", indent=indent + 1)
|
||||
|
||||
write_include_paths(cm_fh, scope, "INCLUDE_DIRECTORIES", indent=indent + 1)
|
||||
|
||||
write_3rd_party_include_paths(cm_fh, scope, "PUBLIC_INCLUDE_DIRECTORIES", indent=indent + 1)
|
||||
|
||||
write_library_section(cm_fh, scope, indent=indent, known_libraries=known_libraries)
|
||||
|
||||
write_compile_options(cm_fh, scope, "COMPILE_OPTIONS", indent=indent + 1)
|
||||
@ -2332,6 +2371,11 @@ def write_repc_files(cm_fh: IO[str], target: str, scope: Scope, indent: int = 0)
|
||||
cm_fh.write(")\n")
|
||||
|
||||
|
||||
def write_generic_cmake_command(cm_fh: IO[str], command_name: str, arguments: List[str]):
|
||||
arguments_str = " ".join(arguments)
|
||||
cm_fh.write(f"{command_name}({arguments_str})\n")
|
||||
|
||||
|
||||
def expand_project_requirements(scope: Scope, skip_message: bool = False) -> str:
|
||||
requirements = ""
|
||||
for requirement in scope.get("_REQUIREMENTS"):
|
||||
@ -2785,6 +2829,12 @@ def write_main_part(
|
||||
|
||||
write_wayland_part(cm_fh, name, scopes[0], indent)
|
||||
|
||||
if "warn_off" in scope.get("CONFIG"):
|
||||
write_generic_cmake_command(cm_fh, "qt_disable_warnings", [name])
|
||||
|
||||
if "hide_symbols" in scope.get("CONFIG"):
|
||||
write_generic_cmake_command(cm_fh, "qt_set_symbol_visibility_hidden", [name])
|
||||
|
||||
ignored_keys_report = write_ignored_keys(scopes[0], spaces(indent))
|
||||
if ignored_keys_report:
|
||||
cm_fh.write(ignored_keys_report)
|
||||
@ -2808,14 +2858,18 @@ def write_main_part(
|
||||
|
||||
|
||||
def write_3rdparty_library(cm_fh: IO[str], scope: Scope, *, indent: int = 0) -> str:
|
||||
|
||||
# Remove default QT libs.
|
||||
scope._append_operation("QT", RemoveOperation(["core", "gui"]))
|
||||
|
||||
target_name = re.sub(r"^qt", "", scope.TARGET)
|
||||
target_name = target_name.replace("-", "_")
|
||||
|
||||
library_type = ""
|
||||
# Capitalize the first letter for a nicer name.
|
||||
target_name = target_name.title()
|
||||
|
||||
# Prefix with Bundled, to avoid possible duplicate target names
|
||||
# e.g. "BundledFreetype" instead of "freetype".
|
||||
target_name = f"Bundled{target_name}"
|
||||
|
||||
if "dll" in scope.get("CONFIG"):
|
||||
library_type = "SHARED"
|
||||
@ -2827,6 +2881,9 @@ def write_3rdparty_library(cm_fh: IO[str], scope: Scope, *, indent: int = 0) ->
|
||||
if library_type:
|
||||
extra_lines.append(library_type)
|
||||
|
||||
if "installed" in scope.get("CONFIG"):
|
||||
extra_lines.append("INSTALL")
|
||||
|
||||
write_main_part(
|
||||
cm_fh,
|
||||
target_name,
|
||||
|
Loading…
x
Reference in New Issue
Block a user