Revert "cmake: Make CMake superbuilds work"

Builds fail on Windows, due to splitting on ':' on absolute file paths,
when handling syncqt injections.

Revert for now to get qt6 merge in faster.

This reverts commit 7559d508d1993dd90a4939441eaf353d55462ae5.

Change-Id: If139a8a1eb4ae7ccc8d7b835b12e83b03176e28b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Qt CMake Build Bot
This commit is contained in:
Alexandru Croitor 2019-06-14 15:29:21 +02:00 committed by Simon Hausmann
parent 7559d508d1
commit 72066a3a58
3 changed files with 15 additions and 22 deletions

View File

@ -4,7 +4,7 @@ add_library(Qt::Platform ALIAS Platform)
target_include_directories(Platform
INTERFACE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${QT_PLATFORM_DEFINITION_DIR}>
$<BUILD_INTERFACE:${QT_BUILD_DIR}/include>
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
$<INSTALL_INTERFACE:${INSTALL_DATADIR}/${QT_PLATFORM_DEFINITION_DIR}>
$<INSTALL_INTERFACE:${INSTALL_INCLUDEDIR}>
)
@ -65,8 +65,8 @@ qt_install(FILES
## files always lived in Qt::Core, so we keep it that way
add_library(GlobalConfig INTERFACE)
target_include_directories(GlobalConfig INTERFACE
$<BUILD_INTERFACE:${QT_BUILD_DIR}/include>
$<BUILD_INTERFACE:${QT_BUILD_DIR}/include/QtCore>
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include/QtCore>
$<INSTALL_INTERFACE:include>
$<INSTALL_INTERFACE:include/QtCore>
)
@ -84,8 +84,8 @@ add_library(Qt::GlobalConfig ALIAS GlobalConfig)
add_library(GlobalConfigPrivate INTERFACE)
target_link_libraries(GlobalConfigPrivate INTERFACE GlobalConfig)
target_include_directories(GlobalConfigPrivate INTERFACE
$<BUILD_INTERFACE:${QT_BUILD_DIR}/include/QtCore/${PROJECT_VERSION}>
$<BUILD_INTERFACE:${QT_BUILD_DIR}/include/QtCore/${PROJECT_VERSION}/QtCore>
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include/QtCore/${PROJECT_VERSION}>
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include/QtCore/${PROJECT_VERSION}/QtCore>
$<INSTALL_INTERFACE:include/QtCore/${PROJECT_VERSION}>
$<INSTALL_INTERFACE:include/QtCore/${PROJECT_VERSION}/QtCore>
)

View File

@ -272,10 +272,6 @@ endfunction()
# cmake_install.cmake file with an empty one. This means we will always replace the file on
# every reconfiguration, but not when doing null builds.
function(remove_install_target)
if (TARGET remove_cmake_install)
return() # target was already created
endif()
set(file_in "${CMAKE_BINARY_DIR}/.remove_cmake_install_in.txt")
set(file_generated "${CMAKE_BINARY_DIR}/.remove_cmake_install_generated.txt")
set(cmake_install_file "${CMAKE_BINARY_DIR}/cmake_install.cmake")
@ -947,24 +943,20 @@ function(qt_install_injections module build_dir install_dir)
#
# ${some_prefix}'s value depends on the build type.
# If doing a prefix build, it should point to
# the current repo's build dir which is ${qtdeclarative_build_dir}.
# ${current_repo_build_dir} which is ${qtdeclarative_build_dir}.
# If doing a non-prefix build, it should point to
# qtbase's build dir.
# ${qtbase_build_dir}.
#
# In the code below, ${some_prefix} == ${build_dir}.
set(lower_case_forwarding_header_path "${build_dir}/${INSTALL_INCLUDEDIR}/${module}")
if(destinationdir)
string(APPEND lower_case_forwarding_header_path "/${destinationdir}")
endif()
if (IS_ABSOLUTE "${file}")
set(file_path "${file}")
else()
set(file_path "${PROJECT_BINARY_DIR}/${file}")
endif()
set(current_repo_build_dir "${PROJECT_BINARY_DIR}")
file(RELATIVE_PATH relpath
"${lower_case_forwarding_header_path}"
"${file_path}")
"${current_repo_build_dir}/${file}")
set(main_contents "#include \"${relpath}\"")
file(GENERATE OUTPUT "${lower_case_forwarding_header_path}/${original_file_name}"
CONTENT "${main_contents}")
@ -974,7 +966,7 @@ function(qt_install_injections module build_dir install_dir)
# will be a no-op.
qt_path_join(install_destination
${install_dir} ${INSTALL_INCLUDEDIR} ${module} ${destinationdir})
qt_install(FILES ${file_path}
qt_install(FILES ${current_repo_build_dir}/${file}
DESTINATION ${install_destination}
RENAME ${destinationname} OPTIONAL)
@ -1145,7 +1137,7 @@ function(add_qt_module target)
qt_autogen_tools_initial_setup(${target})
set(_public_includes
$<BUILD_INTERFACE:${QT_BUILD_DIR}/include>
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
$<BUILD_INTERFACE:${module_include_dir}>
)
if(NOT arg_NO_MODULE_HEADERS)
@ -1497,7 +1489,7 @@ function(add_qt_plugin target)
"${CMAKE_CURRENT_SOURCE_DIR}"
"${CMAKE_CURRENT_BINARY_DIR}"
# For the syncqt headers
$<BUILD_INTERFACE:${QT_BUILD_DIR}/include>
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
${arg_INCLUDE_DIRECTORIES}
PUBLIC_INCLUDE_DIRECTORIES ${arg_PUBLIC_INCLUDE_DIRECTORIES}
LIBRARIES ${arg_LIBRARIES} Qt::PlatformPluginInternal
@ -2063,6 +2055,7 @@ function(qt_compute_injection_forwarding_header target)
get_filename_component(file_name "${arg_SOURCE}" NAME)
set(source_absolute_path "${CMAKE_CURRENT_BINARY_DIR}/${arg_SOURCE}")
file(RELATIVE_PATH relpath "${CMAKE_BINARY_DIR}" "${source_absolute_path}")
if (arg_PRIVATE)
set(fwd "${PROJECT_VERSION}/${module}/private/${file_name}")
@ -2070,7 +2063,7 @@ function(qt_compute_injection_forwarding_header target)
set(fwd "${file_name}")
endif()
string(APPEND ${arg_OUT_VAR} " ${source_absolute_path}:${fwd}")
string(APPEND ${arg_OUT_VAR} " ${relpath}:${fwd}")
set(${arg_OUT_VAR} ${${arg_OUT_VAR}} PARENT_SCOPE)
endfunction()

View File

@ -124,7 +124,7 @@ add_qt_tool(qmake # special case
generators/win32
library
$<TARGET_PROPERTY:Qt::CorePrivate,INTERFACE_INCLUDE_DIRECTORIES> # special case
${CMAKE_CURRENT_BINARY_DIR}/../src/corelib/global # special case: for qconfig.cpp
${CMAKE_BINARY_DIR}/src/corelib/global # special case: for qconfig.cpp
)
qt_internal_add_target_aliases(Bootstrap) # special case