[CMake] FindQt4 doesn't provide plugin variables

Mike McQuaid mike at mikemcquaid.com
Tue Dec 21 12:11:31 EST 2010


On 21 December 2010 16:54, Michael Jackson <mike.jackson at bluequartz.net> wrote:
> I would like to have variables to the DLLs also (actually ALL the DLLs, not
> just the plugins) because under certain use cases those are needed. Here is
> my use case.
>
> Setup: Windows 7 x64 with Qt 4.6.x built as BOTH 32 and 64 bit and installed
> into separate directories so that I can NOT put the Qt dirs on the normal
> PATH variable which means when I go to debug in Visual Studio I get
> complaints from VS that it can not find QtCore4.dll. So I have CMake copy
> rules to copy the correct Qt libraries into the build directory. Having the
> CMAKE variables to where the DLLs are located would alleviate me from having
> to maintain that code. Just my 2 cents. Oh, and if someone else has a
> "better" way of setting this up I am open to all comments (off list if
> needed.)

Yeh, I think there is/should be a better way of setting this up:
http://public.kitware.com/Bug/view.php?id=7694

I created a module that I used at a previous company (don't need to
use Visual Studio much now) which worked well for this but I was told
that I should use PATH instead. Your use-case sounds like a perfect
argument for this module existing in some form.

This is definitely something non-intuitive about using CMake with
Visual Studio. It would be good if these sort of rough edges could be
sorted out with modules.

-- 
Mike McQuaid
http://mikemcquaid.com


More information about the CMake mailing list