Advertisement
lloydc99

CMakeLists.txt

Jun 28th, 2011
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CMake 0.84 KB | None | 0 0
  1. cmake_minimum_required(VERSION 2.6)
  2.  
  3. FIND_PACKAGE(Qt4 REQUIRED)
  4. INCLUDE(${QT_USE_FILE})
  5.  
  6. FIND_PACKAGE(VTK REQUIRED)
  7. IF (USE_VTK_FILE)
  8.   INCLUDE(${USE_VTK_FILE})
  9. ENDIF (USE_VTK_FILE)
  10.  
  11. SET(SOURCES_CPP main.cpp mainwindow.cpp )
  12. SET(SOURCES_H mainwindow.h )
  13. SET(MOC_SOURCES_H mainwindow.h )
  14.  
  15. SET(SOURCES_UI mainwindow.ui )
  16.  
  17. QT4_WRAP_UI( UIS_H ${SOURCES_UI} )
  18.  
  19. # After this call, foo_MOC_SRCS = moc_Class1.cxx moc_Class2.cxx moc_Class3.cxx.
  20. QT4_WRAP_CPP( MOC_SRCS ${MOC_SOURCES_H} )
  21.  
  22. # Don't forget to include output directory, otherwise
  23. # the UI file won't be wrapped!
  24. include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
  25.  
  26. ADD_EXECUTABLE( ResizeBug ${SOURCES_CPP} ${SOURCES_H} ${MOC_SRCS} ${UIS_H} )
  27.  
  28. TARGET_LINK_LIBRARIES( ResizeBug
  29.                     ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTMAIN_LIBRARY}  
  30.                     vtkRendering QVTK )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement