[vtkusers] VTK compilation with QT

Michka Popoff michkapopoff at gmail.com
Mon Mar 24 17:34:04 EDT 2014


I added an entry in the VTK wiki for this (under the list of changes done in VTK 6.1 http://www.vtk.org/Wiki/VTK)
This seems to be a recurring question, so now it’s documented somewhere :)

On 24 mars 2014, at 22:27, Michka Popoff <michkapopoff at gmail.com> wrote:

> Hi
> 
> that’s because QT5 support is only available since VTK 6.1. So the option is not present in VTK 6.0.
> (See http://www.vtk.org/pipermail/vtkusers/2013-June/080169.html)
> 
> Michka
> 
> On 24 mars 2014, at 22:22, Sam Raby <rabysam28 at gmail.com> wrote:
> 
>> Hi Andrew, 
>> 
>> I was about to send email and say that the error still persists. So, changing the CMakeLists.txt did not resolve the issue. So I am now back to the original CMakeLists.txt.
>> 
>> However, the thing is even after pressing "t", I did not see VTK_QT_VERSION listed there, and hence I was not able to change the VTK_QT_VERSION to 5. What I did not try was adding -DVTK_QT_VERSION:STRING="5" to ccmake command line, which I should have. 
>> 
>> However, later, I thought to use the latest version of VTK in hope the problem gets resolved (I was using VTK6.0.0). In this regard, I checked out the VTK using "git clone git://vtk.org/VTK.git VTK", and then when I ran ccmake in the command line, I saw the VTK_QT_VERSION listed, and I set it to 5. After setting the rest of ccmake parameters, it worked and I complied VTK with Qt-enabled.
>> 
>> I am not sure why I had trouble compiling the 6.0.0 version of VTK with Qt-enabled.
>> 
>> -S
>> 
>> On Mon, Mar 24, 2014 at 4:05 PM, Andrew Maclean <andrew.amaclean at gmail.com> wrote:
>> Never modify the VTK CMake files.These files have been carefully designed to build VTK from scratch by inspecting the system and then creating the necessary generators for your specific platform that are used to build VTK. 
>> 
>> If you modify these files and subsequently download a newer version of VTK then your modifications are lost. Additionally you may inadvertently modify something you shouldn't, making it very difficult to get assistance should the build fail. 
>> 
>> CMake provides a mechanism to modify the the cmake cache entries either through the GUI (ccmake or cmake-gui) or by setting parameters via -D on the command line to create/change a cmake cache entry.
>> Run: "cmake --help" for more information.
>>   
>> If you are using ccmake, press "t" to toggle advanced mode and scroll down to find VTK_QT_VERSION.
>> Alternatively run ccmake with -DVTK_QT_VERSION:STRING="5"
>> 
>> Andrew
>> 
>> 
>> On Tue, Mar 25, 2014 at 3:35 AM, Sam Raby <rabysam28 at gmail.com> wrote:
>> Thank you Andrew for the directions. 
>> Since I am not using GUI version of cmake, what I did was to go to the source directory of VTK and then I added two following lines to the CMakeLists.txt file:
>> 
>> set(VTK_QT_VERSION "5" CACHE STRING "Expected Qt version")
>> mark_as_advanced(VTK_QT_VERSION)
>> 
>> and then when I ran ccmake, I was able to configure VTK successfully, as the version of Qt is now set to 5.
>> 
>> FYI, the two above lines are from the link below:
>> 
>> https://github.com/Kitware/VTK/blob/master/CMake/vtkQt.cmake
>> 
>> 
>> -S
>> 
>> 
>> On Thu, Mar 20, 2014 at 3:46 PM, Andrew Maclean <andrew.amaclean at gmail.com> wrote:
>> 
>> Set Grouped and Advanced in the Cmake GUI and look ook in the VTK section of the cmake-gui and you will see it about half-way down:
>> 
>> 
>> <VTK_QT_VERSION.PNG>
>> 
>> 
>> 
>> On Fri, Mar 21, 2014 at 3:13 AM, Sam Raby <rabysam28 at gmail.com> wrote:
>> Thanks Andrew. Would you let me know how I can set VTK_QT_VERSION to 5? I do not see this option in the advanced mode. 
>> 
>> 
>> On Wed, Mar 19, 2014 at 6:05 PM, Andrew Maclean <andrew.amaclean at gmail.com> wrote:
>> You need to set  VTK_QT_VERSION to 5 as VTK uses QT4 by default.
>> 
>> Andrew
>> 
>> 
>> ---------- Forwarded message ----------
>> From: Sam Raby <rabysam28 at gmail.com>
>> To: "vtkusers at vtk.org" <vtkusers at vtk.org>
>> Cc: 
>> Date: Tue, 18 Mar 2014 15:28:32 -0500
>> Subject: [vtkusers] Fwd: VTK compilation with QT
>> I appreciate any idea how I can fix this compilation error?
>> thanks
>> -S
>> 
>> ---------- Forwarded message ----------
>> From: Sam Raby <rabysam28 at gmail.com>
>> Date: Mon, Mar 17, 2014 at 10:06 AM
>> Subject: VTK compilation with QT
>> To: "vtkusers at vtk.org" <vtkusers at vtk.org>
>> 
>> 
>> Hello,
>> 
>> I am compiling VTK with QT enabled. While I think Qt is properly installed, I am getting the following error:
>> 
>> /home/mycomputer/myLibs/QT/Qt5.2.0/5.2.0/gcc_64/bin/qmake reported
>>    QT_INSTALL_LIBS as "/home/mycomputer/myLibs/QT/Qt5.2.0/5.2.0/gcc_64/lib"
>>    but QtCore could not be found there.  Qt is NOT installed correctly for the
>>    target build environment. 
>> 
>> Would you advise how I can get this fixed?
>> 
>> thanks
>> -S
>> 
>> 
>> 
>> 
>> -- 
>> ___________________________________________
>> Andrew J. P. Maclean
>> 
>> ___________________________________________
>> 
>> 
>> 
>> 
>> -- 
>> ___________________________________________
>> Andrew J. P. Maclean
>> 
>> ___________________________________________
>> 
>> 
>> 
>> 
>> -- 
>> ___________________________________________
>> Andrew J. P. Maclean
>> 
>> ___________________________________________
>> 
>> _______________________________________________
>> Powered by www.kitware.com
>> 
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>> 
>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>> 
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140324/a2963ca3/attachment.html>


More information about the vtkusers mailing list