X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPVGUI%2FCMakeLists.txt;h=db0d0c480893c316b3d21de3fcf577aba28b996f;hb=849328b50313161b117532514a943d9321802fe4;hp=26b900bfa8435b0ecf3bc4dfdcf9e0ebe5e9823c;hpb=71e226017e82285fdb81ab04ed32703cff1ba7f3;p=modules%2Fparavis.git diff --git a/src/PVGUI/CMakeLists.txt b/src/PVGUI/CMakeLists.txt index 26b900bf..db0d0c48 100644 --- a/src/PVGUI/CMakeLists.txt +++ b/src/PVGUI/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2010-2014 CEA/DEN, EDF R&D +# Copyright (C) 2010-2015 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -17,25 +17,24 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(UseQt4Ext) +INCLUDE(UseQtExt) # --- options --- -INCLUDE_DIRECTORIES(${OMNIORB_INCLUDE_DIR} +INCLUDE_DIRECTORIES( ${KERNEL_INCLUDE_DIRS} - ${GUI_INCLUDE_DIRS} - ${PROJECT_BINARY_DIR}/idl + ${GUI_INCLUDE_DIRS} ${PROJECT_BINARY_DIR} ${CAS_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${QT_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} ) # additional preprocessor / compiler flags ADD_DEFINITIONS(${CAS_DEFINITIONS}) ADD_DEFINITIONS(${KERNEL_DEFINITIONS}) -ADD_DEFINITIONS(${OMNIORB_DEFINITIONS}) # libraries to link to SET(_PARAVIEW_APP_COMPO_LIB @@ -43,43 +42,32 @@ SET(_PARAVIEW_APP_COMPO_LIB ) SET(_link_LIBRARIES - ${OMNIORB_LIBRARIES} ${QT_LIBRARIES} - ${CAS_KERNEL} ${PYTHON_LIBS} - ${KERNEL_LDFLAGS} ${KERNEL_SalomeDS} ${KERNEL_SALOMELocalTrace} ${KERNEL_SalomeIDLKernel} - ${KERNEL_SalomeNS} ${KERNEL_SalomeLifeCycleCORBA} ${KERNEL_SalomeContainer} ${KERNEL_TOOLSDS} - ${GUI_LDFLAGS} ${GUI_SalomeApp} ${GUI_LightApp} ${GUI_CAM} ${GUI_qtx} ${GUI_suit} ${GUI_Event} ${GUI_PyInterp} - ${GUI_SalomeObject} ${GUI_vtkTools} - ${MED_SalomeIDLMED} + ${KERNEL_LDFLAGS} + ${GUI_LDFLAGS} ${GUI_LightApp} ${GUI_CAM} ${GUI_qtx} ${GUI_suit} + ${GUI_SalomeObject} ${_PARAVIEW_APP_COMPO_LIB} - SalomeIDLPARAVIS + ${GUI_PVViewer} ) # --- headers --- +SET(_ui_files + resources/pqCustomSettingsWidget.ui + ) + +QT_WRAP_UIC(_ui_FORMS_HEADERS ${_ui_files}) + # header files / to be processed by moc SET(_moc_HEADERS PVGUI_Module.h - PVGUI_ViewManager.h - PVGUI_ViewModel.h - PVGUI_ViewWindow.h - # PVGUI_ParaViewSettingsPane.h -) - -# header files / no moc processing -SET(_other_HEADERS - PVGUI_OutputWindowAdapter.h - PVGUI_Tools.h - #PVGUI_MatplotlibMathTextUtilities.h - PV_I.h - PARAVIS_Gen_i.hh - PV_Events.h - PV_Tools.h + PVGUI_DataModel.h + PVGUI_ParaViewSettingsPane.h ) # header files / to install -SET(PVGUI_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) +SET(PVGUI_HEADERS ${_moc_HEADERS} ${_ui_FORMS_HEADERS}) # --- resources --- @@ -117,98 +105,35 @@ ENDIF() # --- sources --- # sources / rcc wrappings -QT4_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES}) +QT_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES}) # sources / moc wrappings -QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) - -# sources / EDF specific stuff -INCLUDE(vtkWrapClientServer) -VTK_WRAP_ClientServer(vtkEDFCutterCS vtkEDFCutter_SRCS ${GUI_ROOT_DIR}/include/salome/vtkEDFCutter.h) +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) # sources / static SET(_other_SOURCES PVGUI_Module.cxx PVGUI_Module_actions.cxx PVGUI_Module_widgets.cxx - PVGUI_ViewManager.cxx - PVGUI_ViewModel.cxx - PVGUI_ViewWindow.cxx - PVGUI_OutputWindowAdapter.cxx - PVGUI_Tools.cxx -# PVGUI_ParaViewSettingsPane.cxx - #PVGUI_MatplotlibMathTextUtilities.cxx - PARAVIS_Gen_i.cc - PV_Tools.cxx + PVGUI_ParaViewSettingsPane.cxx + PVGUI_DataModel.cxx ) -IF(NOT SALOME_PARAVIS_MINIMAL_CORBA) - # Generate headers and sources corresponding to the IDL implementations: - INCLUDE(${PROJECT_SOURCE_DIR}/src/VTKWrapping/wrap.cmake) - - ## From 2.8.10, we should use: - ## SET(CMAKE_POSITION_INDEPENDENT_CODE ON) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") - - # Make the list of wrapped files visible from the top directory (will be used in idl): - SET(WRAP_IDL_I_HH "${WRAP_IDL_I_HH}" PARENT_SCOPE) - SET(WRAP_IDL_I_CC "${WRAP_IDL_I_CC}" PARENT_SCOPE) - - SET(_VTK_wrap_SOURCES - PARAVIS_CreateClass.cxx - ${WRAP_IDL_I_CC} - ) -ENDIF() - # sources / to compile SET(PVGUI_SOURCES ${_other_SOURCES} ${_moc_SOURCES} ${_rcc_SOURCES} - ${vtkEDFCutter_SRCS} ${_VTK_wrap_SOURCES} + ${_ui_FORMS_HEADERS} ) # --- rules --- - -IF(NOT SALOME_PARAVIS_MINIMAL_CORBA) - ADD_CUSTOM_COMMAND( - OUTPUT PARAVIS_CreateClass.cxx - COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/src/VTKWrapping/create_class.py ${CMAKE_BINARY_DIR} - DEPENDS ${CMAKE_BINARY_DIR}/wrapfiles.txt - ${PROJECT_BINARY_DIR}/idl/PARAVIS_Gen.hh - ${PROJECT_BINARY_DIR}/idl/PARAVIS_Gen_Types.hh - SalomeIDLPARAVIS - generate_implements - ) - - # All wrapping tools have to be build before generating the above module - NEEDED? - ###ADD_DEPENDENCIES(SalomeIDLPARAVIS vtkWrapIDL_HH vtkWrapIDL_CC vtkWrapIDL) - - # Intermediate target used in PVGUI directory (we can not cross reference - # a generated source file across directories, hence this trick): - INCLUDE_DIRECTORIES( - ${PROJECT_BINARY_DIR}/idl - ${PROJECT_BINARY_DIR}/src/VTKWrapping - ) -ENDIF() - ADD_LIBRARY(PARAVIS ${PVGUI_SOURCES}) -IF(NOT SALOME_PARAVIS_MINIMAL_CORBA) - # Make sure the generation of the VTK wrapping get executed first: - ADD_DEPENDENCIES(PARAVIS PARAVIS_CreateClass.cxx) -ENDIF() - -IF(NOT SALOME_PARAVIS_MINIMAL_CORBA) - # Ensure .hh files corresponding to IDL have been generated first: - ADD_DEPENDENCIES(PARAVIS omniorb_module_SalomeIDLPARAVIS) -ENDIF() - TARGET_LINK_LIBRARIES(PARAVIS ${_link_LIBRARIES}) INSTALL(TARGETS PARAVIS EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) - # --- header and resources installation --- INSTALL(FILES ${PVGUI_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_PARAVIS_INSTALL_RES_DATA}") +QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_PARAVIS_INSTALL_RES_DATA}") INSTALL(FILES ${_other_RESOURCES} DESTINATION ${SALOME_PARAVIS_INSTALL_RES_DATA})