From 6fa9394c8180ca1fe14d7594f4eefd1ca0ba40c7 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 20 Jun 2013 15:59:43 +0200 Subject: Generate the directory for the mkspec include in a helper file. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The cmake variable for the mkspec dir must specify the source location if used in the build dir, and must specify the install location if used in the install dir. Change-Id: I2fee8cd0c7198e9fc5cbb63972e20c75636672d1 Reviewed-by: Thorbjørn Lund Martsum Reviewed-by: Stephen Kelly --- src/corelib/corelib.pro | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'src/corelib/corelib.pro') diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro index 44a3f06f50..766529c587 100644 --- a/src/corelib/corelib.pro +++ b/src/corelib/corelib.pro @@ -77,12 +77,32 @@ cmake_umbrella_config_file.output = $$DESTDIR/cmake/Qt5/Qt5Config.cmake cmake_umbrella_config_version_file.input = $$PWD/../../mkspecs/features/data/cmake/Qt5ConfigVersion.cmake.in cmake_umbrella_config_version_file.output = $$DESTDIR/cmake/Qt5/Qt5ConfigVersion.cmake +load(cmake_functions) + +CMAKE_HOST_DATA_DIR = $$cmakeRelativePath($$[QT_HOST_DATA/src], $$[QT_INSTALL_PREFIX]) +contains(CMAKE_HOST_DATA_DIR, "^\\.\\./.*"):!isEmpty(CMAKE_HOST_DATA_DIR) { + CMAKE_HOST_DATA_DIR = $$[QT_HOST_DATA/src]/ + CMAKE_HOST_DATA_DIR_IS_ABSOLUTE = True +} + +cmake_extras_mkspec_dir.input = $$PWD/Qt5CoreConfigExtrasMkspecDir.cmake.in +cmake_extras_mkspec_dir.output = $$DESTDIR/cmake/Qt5Core/Qt5CoreConfigExtrasMkspecDir.cmake + +CMAKE_INSTALL_DATA_DIR = $$cmakeRelativePath($$[QT_HOST_DATA], $$[QT_INSTALL_PREFIX]) +contains(CMAKE_INSTALL_DATA_DIR, "^\\.\\./.*"):!isEmpty(CMAKE_INSTALL_DATA_DIR) { + CMAKE_INSTALL_DATA_DIR = $$[QT_HOST_DATA]/ + CMAKE_INSTALL_DATA_DIR_IS_ABSOLUTE = True +} + +cmake_extras_mkspec_dir_for_install.input = $$PWD/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in +cmake_extras_mkspec_dir_for_install.output = $$DESTDIR/cmake/install/Qt5Core/Qt5CoreConfigExtrasMkspecDir.cmake + cmake_qt5_umbrella_module_files.files = $$cmake_umbrella_config_file.output $$cmake_umbrella_config_version_file.output cmake_qt5_umbrella_module_files.path = $$[QT_INSTALL_LIBS]/cmake/Qt5 -QMAKE_SUBSTITUTES += ctest_macros_file cmake_umbrella_config_file cmake_umbrella_config_version_file +QMAKE_SUBSTITUTES += ctest_macros_file cmake_umbrella_config_file cmake_umbrella_config_version_file cmake_extras_mkspec_dir cmake_extras_mkspec_dir_for_install -ctest_qt5_module_files.files += $$ctest_macros_file.output +ctest_qt5_module_files.files += $$ctest_macros_file.output $$cmake_extras_mkspec_dir_for_install.output ctest_qt5_module_files.path = $$[QT_INSTALL_LIBS]/cmake/Qt5Core -- cgit v1.2.3