4f7cc72298
Previously the FindWrap modules checked for hardcoded features when deciding whether to use a bundled library or not. This proved not to work correctly because features were not available when the find modules were processed. Introduce a new CMake API call that needs to be manually called after an add_subdirectory call which declares a bundled library. The call will check for the existence of the bundled target, and will then set a cache variable QT_USE_BUNDLED_Bundled<TargetName>. The same variable is written into a FindWrapFooConfigExtra.cmake file which will be loaded by the appropriate FindWrap module. The module can that use that variable to decided whether to link against the bundled library or the system library. Change-Id: I75e9a4f4e14d88d4490916a79ad12f1ce57891e0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
12 lines
436 B
CMake
12 lines
436 B
CMake
include(QtFindWrapHelper NO_POLICY_SCOPE)
|
|
|
|
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 "BundledFreetype"
|
|
BUNDLED_PACKAGE_TARGET "BundledFreetype"
|
|
SYSTEM_PACKAGE_NAME "WrapSystemFreetype"
|
|
SYSTEM_PACKAGE_TARGET "WrapSystemFreetype::WrapSystemFreetype"
|
|
)
|