[Insight-users] vtk and qt integration problem
David Doria
daviddoria at gmail.com
Sat Jan 19 07:39:25 EST 2013
On Sat, Jan 19, 2013 at 4:59 AM, Kaka85 <hitimeric06 at yahoo.fr> wrote:
> Hi there!
> I would like to share with you the warning I am getting so that you can
> advise me:
> My concern is to integrate VTK and QT,
> I am having an sample Program of the following CMAKELIST file:
>
> #................................................................................
> cmake_minimum_required(VERSION 2.8)
>
> PROJECT(EventQtSlotConnect)
>
> find_package(VTK REQUIRED)
> include(${VTK_USE_FILE})
> find_package(Qt REQUIRED)
> INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR})
> 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)
> QT_WRAP_UI(UISrcs ${UI_FILES})
> QT_WRAP_CPP(MOCSrcs ${QT_WRAP})
> add_executable(EventQtSlotConnect MACOSX_BUNDLE ${CXX_FILES} ${UISrcs}
> ${MOCSrcs})
>
> if(VTK_LIBRARIES)
> if(${VTK_VERSION} VERSION_LESS "6")
> target_link_libraries(EventQtSlotConnect ${VTK_LIBRARIES} QVTK)
> else()
> target_link_libraries(EventQtSlotConnect ${VTK_LIBRARIES})
> endif()
> else()
> target_link_libraries(EventQtSlotConnect vtkHybrid QVTK vtkViews
> ${QT_LIBRARIES})
> endif()
> ...........................................................
>
> So when I configure the source code with CMake, I get warning message like:
>
> CMake Error at CMakeLists.txt:17 (QT_WRAP_UI):
> qt_wrap_ui called with incorrect number of arguments
> CMake Error at CMakeLists.txt:18 (QT_WRAP_CPP):
>
> qt_wrap_cpp called with incorrect number of arguments
> Configuring incomplete, errors occurred!
>
> The issue is I don't know the correct number of arguments of qt_wrap_ui,
> and
> qt_wr_cpp.
>
> I have been stucked for a long time.
> Any help can be appreciated!!
>
It sounds to be like the GLOB CMake commands are not returning any matches.
Do you have .ui and .cxx files in the same directory as your CMakeLists.txt?
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20130119/2c0c7cac/attachment.htm>
More information about the Insight-users
mailing list