Save and set the CMAKE_INSTALL_PREFIX in BuildInternal's Config file
Once qtbase is built and installed, save the CMAKE_INSTALL_PREFIX that was used during the build, and set it when a consumer calls find_package(Qt5BuildInternals). This fixes a bug where syncqt can not be found when building qtsvg, while the developer specifies CMAKE_PREFIX_PATH to find the Qt packages, but does not set the CMAKE_INSTALL_PREFIX. Task-number: QTBUG-75544 Change-Id: I03fd23ba418af5115105610f3f9ed92664562945 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
parent
9542e78525
commit
4dacc09921
@ -176,6 +176,12 @@ set(QT_CMAKE_EXPORT_NAMESPACE ${QT_CMAKE_EXPORT_NAMESPACE})")
|
|||||||
string(APPEND QT_BUILD_INTERNALS_EXTRA_CMAKE_CODE "
|
string(APPEND QT_BUILD_INTERNALS_EXTRA_CMAKE_CODE "
|
||||||
set(QT_BUILD_INTERNALS_PATH \"\${CMAKE_CURRENT_LIST_DIR}\")")
|
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.
|
||||||
|
string(APPEND QT_BUILD_INTERNALS_EXTRA_CMAKE_CODE "
|
||||||
|
set(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH
|
||||||
|
\"Install path prefix, prepended onto install directories.\" FORCE)")
|
||||||
|
|
||||||
# Propagate developer builds to other modules via BuildInternals package.
|
# Propagate developer builds to other modules via BuildInternals package.
|
||||||
if(FEATURE_developer_build)
|
if(FEATURE_developer_build)
|
||||||
string(APPEND QT_BUILD_INTERNALS_EXTRA_CMAKE_CODE "
|
string(APPEND QT_BUILD_INTERNALS_EXTRA_CMAKE_CODE "
|
||||||
|
@ -41,8 +41,8 @@ if(FEATURE_developer_build)
|
|||||||
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR} CACHE PATH
|
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR} CACHE PATH
|
||||||
"Install path prefix, prepended onto install directories." FORCE)
|
"Install path prefix, prepended onto install directories." FORCE)
|
||||||
else()
|
else()
|
||||||
# No-op. While building another module, the CMAKE_INSTALL_PREFIX should be set on the
|
# No-op. While building another module, the CMAKE_INSTALL_PREFIX or CMAKE_PREFIX_PATH
|
||||||
# command line to point to the qtbase build dir.
|
# (either work) should be set on the command line to point to the qtbase build dir.
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
set(QT_WILL_INSTALL ON)
|
set(QT_WILL_INSTALL ON)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user