Add windows batch file for convenient cmake invocation with Qt toolchain file

Similar to the shell script, this makes it easier to invoke cmake by
just extending your PATH.

Change-Id: I1f83e93c507032f6ecf4838c11d62f49f4d93ed6
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Simon Hausmann 2019-06-25 09:54:09 +02:00
parent e5b62e9607
commit ffec6c7180
2 changed files with 4 additions and 0 deletions

1
bin/qt-cmake.bat.in Normal file
View File

@ -0,0 +1 @@
@CMAKE_COMMAND@ -DCMAKE_TOOLCHAIN_FILE=@CMAKE_INSTALL_PREFIX@/@__GlobalConfig_install_dir@/qt.toolchain.cmake %*

View File

@ -86,6 +86,9 @@ qt_install(FILES "${__GlobalConfig_build_dir}/qt.toolchain.cmake" DESTINATION "$
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}")
else()
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/bin/qt-cmake.bat.in" "${QT_BUILD_DIR}/${INSTALL_BINDIR}/qt-cmake.bat" @ONLY)
qt_install(PROGRAMS "${QT_BUILD_DIR}/bin/qt-cmake.bat" DESTINATION "${INSTALL_BINDIR}")
endif()
## Library to hold global features: