[vtk-developers] Building VTK with QT5.4 Windows 8

Sankhesh Jhaveri sankhesh.jhaveri at kitware.com
Thu Jul 9 16:09:13 EDT 2015


Hello Lonni,

It seems the VTK_DIR that you are pointing to is not compiled with Qt
support.

You can verify this by adding the following lines, right after
include(VTK_USE_FILE)

message (FATAL_ERROR "VTK_DIR: ${VTK_DIR}, VTK_QT_VERSION:
${VTK_QT_VERSION})

This above line should print the VTK build tree that you are pointing to
and the Qt version it was compiled with. That should give you some clues.


Warm Regards,

Sankhesh Jhaveri
Research & Development Engineer
Kitware, Inc.
*Phone*: (518) 881 4417
*Fax*: (518) 371 4573



On Wed, Jun 24, 2015 at 6:58 AM, Lonni Besançon <lonni.besancon at gmail.com>
wrote:

> To be more precise about my previous post (sorry I did not have the windows
> computer nearby when I answered), when trying to use the example from the
> Wiki: RenderWindowNoUiFile I get the error in /Cmake:
> CMake Error at C:/Program Files
> (x86)/CMake/share/cmake-3.2/Modules/FindQt4.cmake:1326 (message):
>   Found unsuitable Qt version "" from NOTFOUND, this code requires Qt 4.x
> Call Stack (most recent call first):
>   CMakeLists.txt:18 (find_package)
> /
> Which is completely logical since I don't have QT4 installed.
>
> Yet if I take a look at the CMakeList.txt it doesn't make sense as the
> CMakeList contains:
> /
> cmake_minimum_required(VERSION 2.8)
>
> if(POLICY CMP0020)
>   cmake_policy(SET CMP0020 NEW)
> endif()
>
> PROJECT(RenderWindowNoUiFile)
>
> find_package(VTK REQUIRED)
> include(${VTK_USE_FILE})
>
> if(${VTK_VERSION} VERSION_GREATER "6" AND VTK_QT_VERSION VERSION_GREATER
> "4")
>   # Instruct CMake to run moc automatically when needed.
>   set(CMAKE_AUTOMOC ON)
>   find_package(Qt5Widgets REQUIRED QUIET)
> else()
>   find_package(Qt4 REQUIRED)
>   include(${QT_USE_FILE})
> endif()
>
> include_directories(${CMAKE_CURRENT_SOURCE_DIR}
> ${CMAKE_CURRENT_BINARY_DIR})
>
> file(GLOB UI_FILES *.ui)
> file(GLOB QT_WRAP *.h)
> file(GLOB CXX_FILES *.cxx)
>
> if(${VTK_VERSION} VERSION_GREATER "6" AND VTK_QT_VERSION VERSION_GREATER
> "4")
>   qt5_wrap_ui(UISrcs ${UI_FILES} )
>   # CMAKE_AUTOMOC in ON so the MocHdrs will be automatically wrapped.
>   add_executable(RenderWindowNoUiFile MACOSX_BUNDLE
>     ${CXX_FILES} ${UISrcs} ${QT_WRAP})
>   qt5_use_modules(RenderWindowNoUiFile Core Gui)
>   target_link_libraries(RenderWindowNoUiFile ${VTK_LIBRARIES})
> else()
>   QT4_WRAP_UI(UISrcs ${UI_FILES})
>   QT4_WRAP_CPP(MOCSrcs ${QT_WRAP})
>   add_executable(RenderWindowNoUiFile MACOSX_BUNDLE ${CXX_FILES} ${UISrcs}
> ${MOCSrcs})
>
>   if(VTK_LIBRARIES)
>     if(${VTK_VERSION} VERSION_LESS "6")
>       target_link_libraries(RenderWindowNoUiFile ${VTK_LIBRARIES} QVTK)
>     else()
>       target_link_libraries(RenderWindowNoUiFile ${VTK_LIBRARIES})
>     endif()
>   else()
>     target_link_libraries(RenderWindowNoUiFile vtkHybrid QVTK vtkViews
> ${QT_LIBRARIES})
>   endif()
> endif()
>
> /
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/Building-VTK-with-QT5-4-Windows-8-tp5732403p5732515.html
> Sent from the VTK - Dev mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtk-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20150709/37a258ed/attachment.html>


More information about the vtk-developers mailing list