[vtkusers] VTK compilation with QT
Sam Raby
rabysam28 at gmail.com
Mon Mar 24 17:22:28 EDT 2014
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:
>>>
>>>
>>> [image: Inline image 2]
>>>
>>>
>>>
>>> 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
>
> ___________________________________________
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140324/8b17be6d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: VTK_QT_VERSION.PNG
Type: image/png
Size: 26973 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140324/8b17be6d/attachment.png>
More information about the vtkusers
mailing list