-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.9.2, 6.10.0 RC
-
None
Due to the way the qt-cmake script injects its CMAKE_TOOLCHAIN_FILE argument into the cmake command line, the script is only usable to configure a CMake build system. It cannot be used to run subsequent commands like:
qt-cmake --build _builddir_ qt-cmake --install _builddir_
...because the -DCMAKE_TOOLCHAIN_FILE=... argument is not valid in those modes.
I brought this up with the CMake team, and they suggested using the CMAKE_TOOLCHAIN_FILE environment variable to set the toolchain file, rather than the -D argument, since the environment variable is safe in any mode. (It'll simply be ignored, during --build or --install runs.)
IOW,
# Instead of ending qt-cmake with... exec "$cmake_path" -DCMAKE_TOOLCHAIN_FILE="$toolchain_path" "$@" # use... CMAKE_TOOLCHAIN_FILE="$toolchain_path" exec "$cmake_path" "$@"
...and qt-cmake will become a complete cmake command alternative for Qt users.