Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
Qt Creator 15.0.0
-
None
-
-
58e1873c7 (16.0)
Description
When you open a project for the first time, you can select a build directory but not an install directory.
In the project system you can select a 'deployment' method, which is an ill fitting concept as deployment is in developers brains going to be about deploying on some test server or device.
A lot of not trivial software needs to be installed to work, for instance to open data files.
But a more apt example is one where you have one git repo with C++ libraries. You need to compile and install those (anywhere, really) so you can develop on another git repo that uses those shared libraries.
Today you really don't have much choice than to do most of this from the command line, it would be nice if Creator would become useful for such usecases.
What I do on the command line today:
git clone https://codeberg.org/Flowee/thehub.git
mkdir -p thehub/build
cd thehub/build
cmake -DCMAKE_INSTALL_PREFIX=`pwd` -G Ninja ..
ninja install
cd ../..
export CMAKE_PREFIX_PATH=`pwd`/thehub/build
git clone https://codeberg.org/Flowee/pay.git
mkdir pay/build
cd pay/build
cmake -DCMAKE_INSTALL_PREFIX=`pwd` -G Ninja ..
ninja install
(as an aside, notice that if you just install both projects to the same dir it works without the export cmake_prefix_path)
While I guess this is possible to do manually on creator, it is far more difficult to explain how than to just tell people to do this from the command line.
What I expect:
when you first open a cmake based project and select a dir (build/proj-desktop) that that implies that cmake gets an argument -DCMAKE_INSTALL_PREFIX= pointing to that same build directory.
Additionally, by default the "run" of a cmake target should end up installing it first and then actually running the installed executable (which is just a different location in the build dir) instead of the currently selected not installed executable.
What happens:
Building doesn't install. Adding deployment 'cmake install' fails because it installs where a user can't write.