Fix for misplacement of the qt-cmake-standalone-test in -developer-build
Amend d77ce33082
Change-Id: Idab13c45b15b07e10bee47fff20481581d22dfac
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
bb10
parent
f3c998510d
commit
8aae821b5a
|
|
@ -95,9 +95,15 @@ function(qt_internal_create_wrapper_scripts)
|
|||
# find_package(Qt...) to get all dependencies like examples do.
|
||||
# Instead a template CMakeLists.txt project is used which sets up all the necessary private bits
|
||||
# and then calls add_subdirectory on the provided project path.
|
||||
set(__qt_cmake_standalone_test_bin_name "qt-cmake-standalone-test")
|
||||
set(__qt_cmake_standalone_test_bin_path
|
||||
"${INSTALL_BINDIR}/${__qt_cmake_standalone_test_bin_name}")
|
||||
set(__qt_cmake_standalone_test_name "qt-cmake-standalone-test")
|
||||
if(generate_unix)
|
||||
set(__qt_cmake_standalone_test_libexec_path
|
||||
"${INSTALL_LIBEXECDIR}/${__qt_cmake_standalone_test_name}")
|
||||
endif()
|
||||
if(generate_non_unix)
|
||||
set(__qt_cmake_standalone_test_bin_path
|
||||
"${INSTALL_BINDIR}/${__qt_cmake_standalone_test_name}")
|
||||
endif()
|
||||
|
||||
# Configuring a standalone test on iOS should use the Xcode generator, but qt-cmake-private uses
|
||||
# the generator that was used to build Qt itself (e.g. Ninja).
|
||||
|
|
@ -106,16 +112,19 @@ function(qt_internal_create_wrapper_scripts)
|
|||
set(__qt_cmake_private_path
|
||||
"${QT_STAGING_PREFIX}/${INSTALL_BINDIR}/qt-cmake")
|
||||
else()
|
||||
set(__qt_cmake_private_path
|
||||
"${QT_STAGING_PREFIX}/${INSTALL_BINDIR}/qt-cmake-private")
|
||||
if(generate_unix)
|
||||
set(__qt_cmake_private_path
|
||||
"${QT_STAGING_PREFIX}/${INSTALL_LIBEXECDIR}/qt-cmake-private")
|
||||
endif()
|
||||
if(generate_non_unix)
|
||||
set(__qt_cmake_private_path
|
||||
"${QT_STAGING_PREFIX}/${INSTALL_BINDIR}/qt-cmake-private.bat")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(__qt_cmake_standalone_test_path
|
||||
"${__build_internals_install_dir}/${__build_internals_standalone_test_template_dir}")
|
||||
|
||||
get_filename_component(rel_base_path
|
||||
"${QT_STAGING_PREFIX}/${__qt_cmake_standalone_test_bin_path}"
|
||||
DIRECTORY)
|
||||
if(QT_WILL_INSTALL)
|
||||
# Need to prepend the staging prefix when doing prefix builds, because the build internals
|
||||
# install dir is relative in that case..
|
||||
|
|
@ -124,12 +133,16 @@ function(qt_internal_create_wrapper_scripts)
|
|||
"${__qt_cmake_standalone_test_path}")
|
||||
endif()
|
||||
|
||||
file(RELATIVE_PATH __qt_cmake_private_relpath "${rel_base_path}"
|
||||
"${__qt_cmake_private_path}")
|
||||
file(RELATIVE_PATH __qt_cmake_standalone_test_relpath "${rel_base_path}"
|
||||
"${__qt_cmake_standalone_test_path}")
|
||||
|
||||
if(generate_unix)
|
||||
get_filename_component(rel_base_path
|
||||
"${QT_STAGING_PREFIX}/${__qt_cmake_standalone_test_libexec_path}"
|
||||
DIRECTORY)
|
||||
|
||||
file(RELATIVE_PATH __qt_cmake_private_relpath "${rel_base_path}"
|
||||
"${__qt_cmake_private_path}")
|
||||
file(RELATIVE_PATH __qt_cmake_standalone_test_relpath "${rel_base_path}"
|
||||
"${__qt_cmake_standalone_test_path}")
|
||||
|
||||
set(__qt_cmake_standalone_test_os_prelude "#!/bin/sh")
|
||||
set(__qt_cmake_standalone_test_script_relpath "SCRIPT_DIR=`dirname $0`")
|
||||
string(PREPEND __qt_cmake_private_relpath "exec $SCRIPT_DIR/")
|
||||
|
|
@ -137,12 +150,21 @@ function(qt_internal_create_wrapper_scripts)
|
|||
set(__qt_cmake_standalone_passed_args "\"$@\" -DPWD=\"$PWD\"")
|
||||
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/bin/qt-cmake-standalone-test.in"
|
||||
"${QT_BUILD_DIR}/${__qt_cmake_standalone_test_bin_path}"
|
||||
"${QT_BUILD_DIR}/${__qt_cmake_standalone_test_libexec_path}"
|
||||
NEWLINE_STYLE LF)
|
||||
qt_install(PROGRAMS "${QT_BUILD_DIR}/${__qt_cmake_standalone_test_bin_path}"
|
||||
qt_install(PROGRAMS "${QT_BUILD_DIR}/${__qt_cmake_standalone_test_libexec_path}"
|
||||
DESTINATION "${INSTALL_LIBEXECDIR}")
|
||||
endif()
|
||||
if(generate_non_unix)
|
||||
get_filename_component(rel_base_path
|
||||
"${QT_STAGING_PREFIX}/${__qt_cmake_standalone_test_bin_path}"
|
||||
DIRECTORY)
|
||||
|
||||
file(RELATIVE_PATH __qt_cmake_private_relpath "${rel_base_path}"
|
||||
"${__qt_cmake_private_path}")
|
||||
file(RELATIVE_PATH __qt_cmake_standalone_test_relpath "${rel_base_path}"
|
||||
"${__qt_cmake_standalone_test_path}")
|
||||
|
||||
set(__qt_cmake_standalone_test_os_prelude "@echo off")
|
||||
set(__qt_cmake_standalone_test_script_relpath "set SCRIPT_DIR=%~dp0")
|
||||
string(APPEND __qt_cmake_standalone_test_bin_path ".bat")
|
||||
|
|
|
|||
Loading…
Reference in New Issue