MantisBT - CMake
View Issue Details
0015685CMakeCMakepublic2015-08-05 13:212016-02-01 09:10
Mourad 
Clinton Stimpson 
normalminoralways
closedfixed 
Windows7 64bit
CMake 3.3 
 
0015685: When packaging cmake-gui Qt dlls are resolved from the PATH and not from the Qt installation directory used to build CMake
Hi,

I have two Qt versions installed on my system. The main one (64 bit build) is used for my other projects, and the second one (32bit build) is only used to build CMake.

When packaging/installing CMake-gui , the Qt dlls are resolved from my main Qt installation (because its bin folder is in my PATH, I guess), and not from the Qt installation folder that is used to build CMake.

IMHO, there is a typo in Source/QtDialog/CMakeLists.txt (see attached patch), which when solved, solves the problem.

Please note that there might also be a problem with the QT_LIBRARY_DIR variable (it's not used on Windows, maybe it is on other platforms)

Cheers,
Mourad
No tags attached.
patch cmake.patch (603) 2015-08-05 13:21
https://public.kitware.com/Bug/file/5504/cmake.patch
Issue History
2015-08-05 13:21MouradNew Issue
2015-08-05 13:21MouradFile Added: cmake.patch
2015-08-05 13:32Brad KingAssigned To => Clinton Stimpson
2015-08-05 13:32Brad KingStatusnew => assigned
2015-08-05 13:32Brad KingTarget Version => CMake 3.4
2015-08-07 17:25Clinton StimpsonNote Added: 0039253
2015-08-12 04:50MouradNote Added: 0039268
2015-08-12 10:26Clinton StimpsonNote Added: 0039270
2015-09-16 16:32Brad KingTarget VersionCMake 3.4 =>
2015-09-17 10:35Clinton StimpsonNote Added: 0039439
2015-09-18 12:16Clinton StimpsonStatusassigned => resolved
2015-09-18 12:16Clinton StimpsonResolutionopen => fixed
2016-02-01 09:10Robert MaynardNote Added: 0040410
2016-02-01 09:10Robert MaynardStatusresolved => closed

Notes
(0039253)
Clinton Stimpson   
2015-08-07 17:25   
That is not a typo.
QT_LIBRARY_DIR and QT_BINARY_DIR variables come from FindQt4.cmake.
On Windows, dlls reside in the Qt/bin directory, while on other platforms under the Qt/lib directory. Both are given to fixup_bundle().

cmake-gui is still compiled with Qt4 by many users. The attached patch will break it for some of those users.

For Qt5, it seems we should also remove QT_LIBRARY_DIR.
(0039268)
Mourad   
2015-08-12 04:50   
I'm using Qt5 (forgot to mention it), and for Qt5 both QT_BINARY_DIR and QT_LIBRARY_DIR are empty.
(0039270)
Clinton Stimpson   
2015-08-12 10:26   
Yes, I was able to guess you were using Qt5. And yes, I do understand that QT_BINARY_DIR and QT_LIBRARY_DIR will be empty if using Qt5.

For Qt4, we still need to use QT_BINARY_DIR and QT_LIBRARY_DIR (from FindQt4.cmake)
For Qt5, we need to use Qt_BIN_DIR (from QtDialog/CMakeLists.txt)

I'll let you fix up your patch if you'd like.
(0039439)
Clinton Stimpson   
2015-09-17 10:35   
Fixed here:

http://www.cmake.org/gitweb?p=cmake.git;a=commit;h=851915a5 [^]
(0040410)
Robert Maynard   
2016-02-01 09:10   
Closing resolved issues that have not been updated in more than 4 months.