lloydc99

CMakeLists.txt

Jun 28th, 2011
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CMake 0.97 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. # execute uic sur les fichier .ui -> generation des .h associes
  18. # ne pas oublier de rajouter les .h generes a add_exectuable
  19. QT4_WRAP_UI( UIS_H ${SOURCES_UI} )
  20.  
  21. # After this call, foo_MOC_SRCS = moc_Class1.cxx moc_Class2.cxx moc_Class3.cxx.
  22. QT4_WRAP_CPP( MOC_SRCS ${MOC_SOURCES_H} )
  23.  
  24. # Don't forget to include output directory, otherwise
  25. # the UI file won't be wrapped!
  26. include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
  27.  
  28. ADD_EXECUTABLE( ResizeBug ${SOURCES_CPP} ${SOURCES_H} ${MOC_SRCS} ${UIS_H} )
  29.  
  30. TARGET_LINK_LIBRARIES( ResizeBug
  31.                     ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTMAIN_LIBRARY}  
  32.                     vtkRendering QVTK )
Advertisement
Add Comment
Please, Sign In to add comment