[cmake-developers] Fwd: [CMake] cmake-gui on windows and qt5 dlls

Ben Boeckel ben.boeckel at kitware.com
Mon Aug 14 09:18:35 EDT 2017


On Mon, Aug 14, 2017 at 20:09:17 +1000, Craig Scott wrote:
> It shouldn't be an issue having non-static Qt libs linked to cmake-gui, but
> as reported on the CMake users mailing list, it can be a problem when the
> directory cmake-gui is in is on the PATH. If CMake's bin directory appears
> on the PATH, the Qt DLL's bundled with it can take precedence over other
> applications' own Qt DLLs. The cmake and ccmake executables have a
> reasonable case for being on the PATH, but cmake-gui is typically going to
> be started via a desktop or menu icon and doesn't really need to be on the
> PATH.
> 
> Rather than forcing static Qt libs to be used (I'm not aware of the reason
> for the change from static to dynamic Qt libs), we could instead move
> cmake-gui out of the bin directory so that it isn't in the same directory
> as the cmake and ccmake executables. This top level directory should never
> be added to the PATH, so it would resolve problems like the above. It is
> not unusual for the main executable to be in the top level directory of an
> installation rather than in a bin subdirectory. What do people think of
> moving cmake-gui and the Qt DLL's up to the top level? This may just be for
> Windows, other platforms could stay as they are now. Would obviously have
> to adjust not just the install location but also any internal code that
> tries to work out where other files are located relative to the cmake-gui
> executable. Things like the qt.conf file would also probably need some
> adjustment.
> 
> Thoughts?

Git splits it between bin/ and cmd/ where cmd/ is meant to be in PATH.
Then the structure doesn't need to change either.

--Ben


More information about the cmake-developers mailing list