[CMake] cmake-gui on windows and qt5 dlls

Clément Gregoire lectem at gmail.com
Thu Aug 17 14:55:17 EDT 2017


So the following worked for me:


move cmake-gui.exe, all dlls and qt.conf to a "cmkae/bin/gui" subfolder

create a batch file named

cmake-gui.bat

with the following content

@echo off
start "" /B "%~dp0\gui\cmake-gui.exe" %*

And modify qt.conf so that the plugin directory is correct :

from      Plugins = ../plugins     to    Plugins = ../../plugins


I'm not (yet) on the dev mailing list, so feel free to transfer the
solution there.


2017-08-14 15:33 GMT+02:00 Lectem <lectem at gmail.com>:

> Right, as mentionned by Craig Scott, a script might do the trick ? Just a
> cmake-gui.bat that calls cmake-gui.exe should work.
>
>
>
> *De : *Robert Maynard <robert.maynard at kitware.com>
> *Envoyé le :*lundi 14 août 2017 15:24
> *À : *Craig Scott <craig.scott at crascit.com>
> *Cc : *Clément Gregoire <lectem at gmail.com>; CMake <cmake at cmake.org>
> *Objet :*Re: [CMake] cmake-gui on windows and qt5 dlls
>
>
>
> More importantly symlinks are restricted to administrator accounts
>
> only in Windows Vista/7/8. Windows 10 with Developer Mode activated
>
> allows none-elevated accounts to create symlinks.
>
>
>
> This is important as CMake does ship non-installer windows binaries.
>
>
>
> On Mon, Aug 14, 2017 at 9:00 AM, Craig Scott <craig.scott at crascit.com>
> wrote:
>
> >
>
> >
>
> > On Mon, Aug 14, 2017 at 9:05 PM, Clément Gregoire <lectem at gmail.com>
> wrote:
>
> >>
>
> >> Wouldn't it be possible to move it to a subfolder with the DLLs and put
> a
>
> >> link next to cmake and ccmake? Executables look for DLLs in their
> directory
>
> >> and it wouldn't pollute the PATH
>
> >
>
> >
>
> > Symlinks are available on NTFS filesystems from Vista onwards. If the
> user
>
> > installed CMake on, say, a FAT filesystem instead or on an old XP box
> (CMake
>
> > appears to still try to support that), then symlinks wouldn't be
> available
>
> > from what I can make out. One could potentially use a forwarding script
> of
>
> > some kind though to achieve essentially the same thing.
>
> >
>
> >
>
> >> I personally like to be able to launch it through the command line, it
> is
>
> >> faster than looking for it and then browse for the folder.
>
> >>
>
> >>
>
> >> Le lun. 14 août 2017 à 11:48, Craig Scott <craig.scott at crascit.com> a
>
> >> écrit :
>
> >>>
>
> >>> This is a common problem, not just with CMake. I'm wondering if there's
>
> >>> any real need for cmake-gui to be on the PATH at all, since it will
> usually
>
> >>> be invoked by a desktop or menu icon. At the moment though, it is in
> the
>
> >>> same directory as the cmake and ccmake executables which have a much
>
> >>> stronger case for being on the PATH. There's a reasonable argument that
>
> >>> cmake-gui should be in a different directory, then it wouldn't be an
> issue
>
> >>> if shared Qt libs were used rather than static. I'll bring this up on
> the
>
> >>> developer mailing list and see what discussions yield.
>
> >>>
>
> >>>
>
> >>> On Mon, Aug 14, 2017 at 6:22 PM, Christian Ehrlicher
>
> >>> <Ch.Ehrlicher at gmx.de> wrote:
>
> >>>>
>
> >>>> Hi,
>
> >>>>
>
> >>>> I recently upgraded from cmake 3.3 to 3.9 on windows and got some
>
> >>>> problems during my build because it looks like the pre-compile
> binaries for
>
> >>>> windows are now shipping Qt5 - dlls instead static compile libs
> (since 3.5
>
> >>>> afaics).
>
> >>>> The problem is, that I had the path to cmake *before* the path to my
> own
>
> >>>> Qt5 libaries. So during the build / run of my application, the wrong
>
> >>>> libraries were loaded and I got a symbol lookup error.
>
> >>>> Would it be possible to use the static Qt5 libs instead or maybe
> prefix
>
> >>>> the Qt5 libs shipped with cmake-gui somehow?
>
> >>>>
>
> >>>> Thx,
>
> >>>> Christian
>
> >>>>
>
> >>>> --
>
> >>>>
>
> >>>> Powered by www.kitware.com
>
> >>>>
>
> >>>> Please keep messages on-topic and check the CMake FAQ at:
>
> >>>> http://www.cmake.org/Wiki/CMake_FAQ
>
> >>>>
>
> >>>> Kitware offers various services to support the CMake community. For
> more
>
> >>>> information on each offering, please visit:
>
> >>>>
>
> >>>> CMake Support: http://cmake.org/cmake/help/support.html
>
> >>>> CMake Consulting: http://cmake.org/cmake/help/consulting.html
>
> >>>> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> >>>>
>
> >>>> Visit other Kitware open-source projects at
>
> >>>> http://www.kitware.com/opensource/opensource.html
>
> >>>>
>
> >>>> Follow this link to subscribe/unsubscribe:
>
> >>>> http://public.kitware.com/mailman/listinfo/cmake
>
> >>>
>
> >>>
>
> >>>
>
> >>>
>
> >>> --
>
> >>> Craig Scott
>
> >>> Melbourne, Australia
>
> >>> https://crascit.com
>
> >>> --
>
> >>>
>
> >>> Powered by www.kitware.com
>
> >>>
>
> >>> Please keep messages on-topic and check the CMake FAQ at:
>
> >>> http://www.cmake.org/Wiki/CMake_FAQ
>
> >>>
>
> >>> Kitware offers various services to support the CMake community. For
> more
>
> >>> information on each offering, please visit:
>
> >>>
>
> >>> CMake Support: http://cmake.org/cmake/help/support.html
>
> >>> CMake Consulting: http://cmake.org/cmake/help/consulting.html
>
> >>> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> >>>
>
> >>> Visit other Kitware open-source projects at
>
> >>> http://www.kitware.com/opensource/opensource.html
>
> >>>
>
> >>> Follow this link to subscribe/unsubscribe:
>
> >>> http://public.kitware.com/mailman/listinfo/cmake
>
> >
>
> >
>
> >
>
> >
>
> > --
>
> > Craig Scott
>
> > Melbourne, Australia
>
> > https://crascit.com
>
> >
>
> > --
>
> >
>
> > Powered by www.kitware.com
>
> >
>
> > Please keep messages on-topic and check the CMake FAQ at:
>
> > http://www.cmake.org/Wiki/CMake_FAQ
>
> >
>
> > Kitware offers various services to support the CMake community. For more
>
> > information on each offering, please visit:
>
> >
>
> > CMake Support: http://cmake.org/cmake/help/support.html
>
> > CMake Consulting: http://cmake.org/cmake/help/consulting.html
>
> > CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> >
>
> > Visit other Kitware open-source projects at
>
> > http://www.kitware.com/opensource/opensource.html
>
> >
>
> > Follow this link to subscribe/unsubscribe:
>
> > http://public.kitware.com/mailman/listinfo/cmake
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170817/67860afa/attachment.html>


More information about the CMake mailing list