Salome HOME
missing French translations
[modules/gui.git] / src / SVTK / CMakeLists.txt
index f276fceb5148e29191ca3830272ab20ee196012c..2c37a3806cfbbe3c216d91cab80e4ad76dffe996 100755 (executable)
 INCLUDE(UseQt4Ext)
 INCLUDE(${VTK_USE_FILE})
 
+# --- options ---
+
+# additional include directories
 INCLUDE_DIRECTORIES(
   ${CAS_INCLUDE_DIRS}
   ${QT_INCLUDES}
-  ${PTHREAD_INCLUDE_DIRS}
   ${Boost_INCLUDE_DIRS}
-  ${KERNEL_INCLUDE_DIRS}
-  ${PROJECT_BINARY_DIR}
-  ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx
-  ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT
-  ${CMAKE_CURRENT_SOURCE_DIR}/../ViewerTools
-  ${CMAKE_CURRENT_SOURCE_DIR}/../OBJECT
-  ${CMAKE_CURRENT_SOURCE_DIR}/../Prs
-  ${CMAKE_CURRENT_SOURCE_DIR}/../VTKViewer
-  ${CMAKE_CURRENT_SOURCE_DIR}/../OpenGLUtils
+  ${PTHREAD_INCLUDE_DIR}
+  ${PROJECT_SOURCE_DIR}/src/Qtx
+  ${PROJECT_SOURCE_DIR}/src/SUIT
+  ${PROJECT_SOURCE_DIR}/src/ViewerTools
+  ${PROJECT_SOURCE_DIR}/src/OBJECT
+  ${PROJECT_SOURCE_DIR}/src/Prs
+  ${PROJECT_SOURCE_DIR}/src/VTKViewer
+  ${PROJECT_SOURCE_DIR}/src/OpenGLUtils
 )
 
+# additional preprocessor / compiler flags
 ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS})
 
-SET(COMMON_LIBS
-  qtx
-  suit
-  ViewerTools
-  SalomeObject
-  SalomePrs
-  VTKViewer
-  OpenGLUtils
-  ${KERNEL_SALOMELocalTrace}
-  ${KERNEL_OpUtil}
-  ${VTK_LIBRARIES}
+# libraries to link to
+SET(_link_LIBRARIES 
+  ${QT_LIBRARIES} 
   ${OPENGL_LIBRARIES}
-  ${QT_LIBRARIES}
-  ${CAS_KERNEL}
-  ${CAS_VIEWER}
+  ${VTK_LIBRARIES} 
+  ${CAS_KERNEL} ${CAS_VIEWER}
+  ${KERNEL_OpUtil}
+  qtx suit ViewerTools SalomeObject SalomePrs VTKViewer OpenGLUtils
 )
 
-SET(GUI_HEADERS SVTK_GenericRenderWindowInteractor.h SVTK_RenderWindowInteractor.h SVTK_NonIsometricDlg.h 
-  SVTK_UpdateRateDlg.h SVTK_CubeAxesDlg.h SVTK_FontWidget.h SVTK_ViewModelBase.h SVTK_ViewManager.h 
-  SVTK_ViewWindow.h SVTK_ViewModel.h SVTK_View.h SVTK_SetRotationPointDlg.h SVTK_ViewParameterDlg.h
-  SVTK_ComboAction.h SVTK_RecorderDlg.h)
-QT4_WRAP_CPP(GUI_HEADERS ${GUI_HEADERS})
+# --- headers ---
 
-SET(SVTK_SOURCES
-  SVTK_Prs.cxx
-  SVTK_Actor.cxx
+# header files / to be processed by moc
+SET(_moc_HEADERS
+   SVTK_ComboAction.h
+   SVTK_FontWidget.h
+   SVTK_GenericRenderWindowInteractor.h
+   SVTK_RecorderDlg.h
+   SVTK_RenderWindowInteractor.h
+   SVTK_SetRotationPointDlg.h
+   SVTK_View.h
+   SVTK_ViewManager.h
+   SVTK_ViewModelBase.h
+   SVTK_ViewModel.h
+   SVTK_ViewParameterDlg.h
+   SVTK_ViewWindow.h
+)
+
+# header files / to be processed by moc / internal
+# TODO: check for MSVS project
+SET(_moc_internal_HEADERS
+  SVTK_CubeAxesDlg.h
+  SVTK_NonIsometricDlg.h
+  SVTK_UpdateRateDlg.h
+)
+
+# header files / no moc processing
+SET(_other_HEADERS
+   SALOME_Actor.h
+   SVTK.h
+   SVTK_Actor.h
+   SVTK_AreaPicker.h
+   SVTK_CubeAxesActor2D.h
+   SVTK_DeviceActor.h
+   SVTK_Event.h
+   SVTK_Functor.h
+   SVTK_ImageWriter.h
+   SVTK_ImageWriterMgr.h
+   SVTK_InteractorStyle.h
+   SVTK_KeyFreeInteractorStyle.h
+   SVTK_Prs.h
+   SVTK_Recorder.h
+   SVTK_Renderer.h
+   SVTK_Selection.h
+   SVTK_SelectionEvent.h
+   SVTK_Selector.h
+   SVTK_SpaceMouse.h
+   SVTK_Utils.h
+)
+
+# header files / no moc processing / internal
+# no processing currently: TODO: check for MSVS project
+SET(_internal_HEADERS
+  SVTK_SelectorDef.h
+  SVTK_Trihedron.h
+  vtkPVAxesActor.h
+  vtkPVAxesWidget.h
+)
+
+# header files / to install
+SET(SVTK_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
+
+# --- resources ---
+
+# resource files / to be processed by lrelease
+SET(_ts_RESOURCES
+  resources/SVTK_msg_en.ts
+  resources/SVTK_msg_fr.ts
+  resources/SVTK_msg_ja.ts
+  resources/SVTK_images.ts
+)
+
+# resource files / static
+SET(_other_RESOURCES
+  resources/vtk_view_graduated_axes.png
+  resources/vtk_view_highlight.png
+  resources/vtk_view_highlight_dyn.png
+  resources/vtk_view_highlight_off.png
+  resources/vtk_view_highlight_std.png
+  resources/vtk_view_parallel.png
+  resources/vtk_view_parameters.png
+  resources/vtk_view_perspective.png
+  resources/vtk_view_recording_pause.png
+  resources/vtk_view_recording_play.png
+  resources/vtk_view_recording_start.png
+  resources/vtk_view_recording_stop.png
+  resources/vtk_view_rotation_point.png
+  resources/vtk_view_scaling.png
+  resources/vtk_view_selection.png
+  resources/vtk_view_style_switch.png
+  resources/vtk_view_update_rate.png
+  resources/vtk_view_zooming_style_switch.png
+)
+
+# --- sources ---
+
+# sources / moc wrappings
+QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS} ${_moc_internal_HEADERS})
+
+# sources / static
+SET(_other_SOURCES
   SALOME_Actor.cxx
+  SVTK_Actor.cxx
   SVTK_AreaPicker.cxx
-  SVTK_DeviceActor.cxx
+  SVTK_ComboAction.cxx
   SVTK_CubeAxesActor2D.cxx
-  SVTK_NonIsometricDlg.cxx
-  SVTK_UpdateRateDlg.cxx
   SVTK_CubeAxesDlg.cxx
+  SVTK_DeviceActor.cxx
   SVTK_FontWidget.cxx
-  SVTK_Trihedron.cxx
-  SVTK_View.cxx
-  SVTK_ViewManager.cxx
-  SVTK_ViewModel.cxx
-  SVTK_Renderer.cxx
-  SVTK_ViewWindow.cxx
+  SVTK_GenericRenderWindowInteractor.cxx
+  SVTK_ImageWriter.cxx
+  SVTK_ImageWriterMgr.cxx
   SVTK_InteractorStyle.cxx
   SVTK_KeyFreeInteractorStyle.cxx
+  SVTK_NonIsometricDlg.cxx
+  SVTK_Prs.cxx
+  SVTK_Recorder.cxx
+  SVTK_RecorderDlg.cxx
   SVTK_RenderWindowInteractor.cxx
-  SVTK_GenericRenderWindowInteractor.cxx
-  SVTK_SpaceMouse.cxx
+  SVTK_Renderer.cxx
   SVTK_Selector.cxx
   SVTK_SetRotationPointDlg.cxx
-  SVTK_ViewParameterDlg.cxx
-  SVTK_ComboAction.cxx
-  SVTK_Recorder.cxx
-  SVTK_RecorderDlg.cxx
-  SVTK_ImageWriter.cxx
-  SVTK_ImageWriterMgr.cxx
+  SVTK_SpaceMouse.cxx
+  SVTK_Trihedron.cxx
+  SVTK_UpdateRateDlg.cxx
   SVTK_Utils.cxx
-  vtkPVAxesActor.h
+  SVTK_View.cxx
+  SVTK_ViewManager.cxx
+  SVTK_ViewModel.cxx
+  SVTK_ViewParameterDlg.cxx
+  SVTK_ViewWindow.cxx
   vtkPVAxesActor.cxx
-  vtkPVAxesWidget.h
   vtkPVAxesWidget.cxx
 )
 
-SET(GUITS_SOURCES
-  resources/SVTK_msg_en.ts
-  resources/SVTK_msg_fr.ts
-  resources/SVTK_images.ts
-)
+# sources / to compile
+SET(SVTK_SOURCES ${_other_SOURCES} ${_moc_SOURCES})
 
-ADD_LIBRARY(SVTK ${SVTK_SOURCES} ${GUI_HEADERS})
-TARGET_LINK_LIBRARIES(SVTK ${COMMON_LIBS})
+# --- rules ---
+
+ADD_LIBRARY(SVTK ${SVTK_SOURCES})
+TARGET_LINK_LIBRARIES(SVTK ${_link_LIBRARIES})
 INSTALL(TARGETS SVTK EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
 
-#ADD_EXECUTABLE(TestSVTK SVTK.cxx)
-#SET_TARGET_PROPERTIES(TestSVTK PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}" OUTPUT_NAME "SVTK")
-#TARGET_LINK_LIBRARIES(TestSVTK SVTK ${COMMON_LIBS})
-#INSTALL(TARGETS TestSVTK DESTINATION ${SALOME_INSTALL_BINS})
-
-SET(COMMON_HEADERS_H 
-  SVTK.h
-  SVTK_Prs.h
-  SVTK_Actor.h
-  SALOME_Actor.h
-  SVTK_AreaPicker.h
-  SVTK_DeviceActor.h
-  SVTK_FontWidget.h
-  SVTK_CubeAxesActor2D.h
-  SVTK_Functor.h
-  SVTK_View.h
-  SVTK_ViewManager.h
-  SVTK_ViewModel.h
-  SVTK_ViewWindow.h
-  SVTK_Renderer.h
-  SVTK_InteractorStyle.h
-  SVTK_KeyFreeInteractorStyle.h
-  SVTK_RenderWindowInteractor.h
-  SVTK_GenericRenderWindowInteractor.h
-  SVTK_Selector.h
-  SVTK_Selection.h
-  SVTK_SelectionEvent.h
-  SVTK_SpaceMouse.h
-  SVTK_Event.h
-  SVTK_ViewModelBase.h
-  SVTK_SetRotationPointDlg.h
-  SVTK_ViewParameterDlg.h
-  SVTK_ComboAction.h
-  SVTK_Recorder.h
-  SVTK_RecorderDlg.h
-  SVTK_ImageWriter.h
-  SVTK_ImageWriterMgr.h
-  SVTK_Utils.h
-)
-INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS})
-QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}")
+INSTALL(FILES ${SVTK_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}")
 
-FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png")
-INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA})
+INSTALL(FILES ${_other_RESOURCES} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA})