Fix CMAKE_BUILD_TYPE to be a cache variable in QtBuildInternalsExtra
Rather than pass the build type in the wrapper, make sure the build
type is a cache var, so it gets picked up when building other repos.
This reverts commit f72ca4cf85
.
Change-Id: I5d91ab66249b6c40c5e548b0eec0e467ba0f2ebc
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
parent
3ad5d7aa55
commit
34a112e383
@ -129,11 +129,6 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/qt.toolchain.cmake.in" "${__Gl
|
||||
qt_install(FILES "${__GlobalConfig_build_dir}/qt.toolchain.cmake" DESTINATION "${__GlobalConfig_install_dir}" COMPONENT Devel)
|
||||
|
||||
# Also provide a convenience cmake wrapper
|
||||
if (CMAKE_BUILD_TYPE)
|
||||
set(__qt_cmake_extra "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
|
||||
else()
|
||||
set(__qt_cmake_extra)
|
||||
endif()
|
||||
if(UNIX)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/bin/qt-cmake.in" "${QT_BUILD_DIR}/${INSTALL_BINDIR}/qt-cmake" @ONLY)
|
||||
qt_install(PROGRAMS "${QT_BUILD_DIR}/bin/qt-cmake" DESTINATION "${INSTALL_BINDIR}")
|
||||
@ -150,8 +145,7 @@ endif()
|
||||
# generator.
|
||||
# The private wrapper is more conveient for building Qt itself, because a developer doesn't need
|
||||
# to specify the same options for each qt module built.
|
||||
|
||||
list(APPEND __qt_cmake_extra "-G\"${CMAKE_GENERATOR}\"")
|
||||
set(__qt_cmake_extra "-G\"${CMAKE_GENERATOR}\"")
|
||||
if(UNIX)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/bin/qt-cmake.in"
|
||||
"${QT_BUILD_DIR}/${INSTALL_BINDIR}/qt-cmake-private" @ONLY)
|
||||
|
@ -309,7 +309,7 @@ function(qt_generate_build_internals_extra_cmake_code)
|
||||
|
||||
if(CMAKE_BUILD_TYPE)
|
||||
string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS
|
||||
"set(CMAKE_BUILD_TYPE \"${CMAKE_BUILD_TYPE}\")\n")
|
||||
"set(CMAKE_BUILD_TYPE \"${CMAKE_BUILD_TYPE}\" CACHE STRING \"Choose the type of build.\")\n")
|
||||
endif()
|
||||
if(CMAKE_CONFIGURATION_TYPES)
|
||||
string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS
|
||||
|
Loading…
Reference in New Issue
Block a user