Fix warnings about existing directories during cmake file creation.

Use the new QMAKE_SUBSTITUTES.config = vebatim feature.

Change-Id: I4c08bd4694c11d48434eb225fc6902e69a4cdec2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
Stephen Kelly 2012-02-11 11:45:32 +01:00 committed by Qt by Nokia
parent 7a7d82ffd9
commit 46a4a0e8c9

View File

@ -102,19 +102,16 @@ exists($$cmake_extras_file.input) {
$$cmake_extras_file.output
}
cmake_macros_file = $$_PRO_FILE_PWD_/Qt5$${CMAKE_MODULE_NAME}Macros.cmake
exists($$cmake_macros_file) {
cmake_macros_file.input = $$_PRO_FILE_PWD_/Qt5$${CMAKE_MODULE_NAME}Macros.cmake
exists($$cmake_macros_file.input) {
CMAKE_MODULE_MACROS = "true"
cmake_qt5_module_files.files += $$cmake_macros_file
CMAKE_MACROS_FILE_SOURCE = $$_PRO_FILE_PWD_/Qt5$${CMAKE_MODULE_NAME}Macros.cmake
CMAKE_MACROS_FILE_DESTINATION = $$eval(QT.$${MODULE}.libs)/cmake/Qt5$${CMAKE_MODULE_NAME}
cmake_macros_file.output = $$eval(QT.$${MODULE}.libs)/cmake/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}Macros.cmake
cmake_macros_file.config = verbatim
CMAKE_MACROS_FILE_SOURCE ~= s,[/\\\\],$$QMAKE_DIR_SEP,
CMAKE_MACROS_FILE_DESTINATION ~= s,[/\\\\],$$QMAKE_DIR_SEP,
QMAKE_SUBSTITUTES += cmake_macros_file
system($$QMAKE_MKDIR \"$$CMAKE_MACROS_FILE_DESTINATION\")
system($$QMAKE_COPY \"$$CMAKE_MACROS_FILE_SOURCE\" \"$$CMAKE_MACROS_FILE_DESTINATION\")
cmake_qt5_module_files.files += $$cmake_macros_file.output
}
cmake_qt5_module_files.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME}