a876ff1283
Due to the install prefix being changed for standalone tests,
the correct $qt_prefix/bin folder was not added to the PATH
environment variable when running tests.
Make sure to always include the the original qt install prefix,
even if a different install prefix is specified when configuring
standalone tests.
Amends 39090ea15c
Change-Id: I22aab732bb2bb679074a811d28d8209e1d535df3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
46 lines
2.2 KiB
CMake
46 lines
2.2 KiB
CMake
# Propagate common variables via BuildInternals package.
|
|
set(QT_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
|
|
option(BUILD_SHARED_LIBS "Build Qt statically or dynamically" @BUILD_SHARED_LIBS@)
|
|
set(QT_CMAKE_EXPORT_NAMESPACE @QT_CMAKE_EXPORT_NAMESPACE@)
|
|
set(INSTALL_CMAKE_NAMESPACE @INSTALL_CMAKE_NAMESPACE@)
|
|
set(QT_BUILD_INTERNALS_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
|
|
|
# Propagate the original install prefix, so that a developer building a child module can
|
|
# specify CMAKE_PREFIX_PATH for finding the Qt modules instead of CMAKE_INSTALL_PREFIX.
|
|
set(CMAKE_INSTALL_PREFIX @CMAKE_INSTALL_PREFIX@ CACHE PATH
|
|
"Install path prefix, prepended onto install directories." FORCE)
|
|
|
|
# Save the original install prefix in an additional variable.
|
|
# While CMAKE_INSTALL_PREFIX may be overridden in certain cases (like for standalone tests building
|
|
# or for singular qt-cmake-standalone-test usage), we still need the original qtbase install prefix
|
|
# to know where the shared libraries are located to inject them into PATH when running tests via
|
|
# ctest.
|
|
set(QT_BUILD_INTERNALS_ORIGINAL_INSTALL_PREFIX @CMAKE_INSTALL_PREFIX@ CACHE PATH
|
|
"Original install prefix specified when building qtbase." FORCE)
|
|
|
|
# Propagate developer builds to other modules via BuildInternals package.
|
|
if(@FEATURE_developer_build@)
|
|
set(FEATURE_developer_build ON CACHE BOOL "Developer build." FORCE)
|
|
endif()
|
|
|
|
# Propagate non-prefix builds.
|
|
set(QT_WILL_INSTALL @QT_WILL_INSTALL@ CACHE BOOL
|
|
"Boolean indicating if doing a Qt prefix build (vs non-prefix build)." FORCE)
|
|
|
|
set(QT_SOURCE_TREE "@QT_SOURCE_TREE@" CACHE PATH
|
|
"A path to the source tree of the previously configured QtBase project." FORCE)
|
|
|
|
# Propagate decision of building tests and examples to other repositories.
|
|
set(BUILD_TESTING @BUILD_TESTING@ CACHE BOOL "Build the testing tree.")
|
|
set(BUILD_EXAMPLES @BUILD_EXAMPLES@ CACHE BOOL "Build Qt examples")
|
|
set(QT_NO_MAKE_TESTS @QT_NO_MAKE_TESTS@ CACHE BOOL
|
|
"Should tests be built as part of the default 'all' target.")
|
|
set(QT_NO_MAKE_EXAMPLES @QT_NO_MAKE_EXAMPLES@ CACHE BOOL
|
|
"Should examples be built as part of the default 'all' target.")
|
|
|
|
# Propagate usage of ccache.
|
|
set(QT_USE_CCACHE @QT_USE_CCACHE@ CACHE BOOL "Enable the use of ccache")
|
|
|
|
# Extra set of exported variables
|
|
@QT_EXTRA_BUILD_INTERNALS_VARS@
|