X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FCMakeLists.txt;h=2f06c5f28339fba69d6909f9f637e63ecbd5d5c5;hb=50a8df0c6a66da8067b16155e5ae39f8f26a7ebc;hp=d536ef23d12246754133dcb4e2c66866f7a65235;hpb=53e00bab4d44d644c2be0df82b5e5b8c2db34beb;p=modules%2Fshaper.git diff --git a/src/ModuleBase/CMakeLists.txt b/src/ModuleBase/CMakeLists.txt index d536ef23d..2f06c5f28 100644 --- a/src/ModuleBase/CMakeLists.txt +++ b/src/ModuleBase/CMakeLists.txt @@ -1,22 +1,21 @@ -## Copyright (C) 2014-2017 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 -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -## -## See http:##www.salome-platform.org/ or -## email : webmaster.salome@opencascade.com -## +# Copyright (C) 2014-2020 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 +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# INCLUDE(Common) INCLUDE(UseQtExt) @@ -29,10 +28,13 @@ INCLUDE_DIRECTORIES(${QT_INCLUDES}) # additional preprocessor / compiler flags ADD_DEFINITIONS(${QT_DEFINITIONS}) +SET(UPDATE_TRANSLATION OFF) + SET(PROJECT_HEADERS ModuleBase.h ModuleBase_ActionInfo.h ModuleBase_ActionType.h + ModuleBase_BRepOwner.h ModuleBase_Definitions.h ModuleBase_DoubleSpinBox.h ModuleBase_Events.h @@ -44,14 +46,15 @@ SET(PROJECT_HEADERS ModuleBase_IPrefMgr.h ModuleBase_IPropertyPanel.h ModuleBase_ISelection.h + ModuleBase_ISelectionActivate.h ModuleBase_IViewWindow.h ModuleBase_IViewer.h ModuleBase_IWidgetCreator.h ModuleBase_IWorkshop.h ModuleBase_LabelValue.h + ModuleBase_ListView.h ModuleBase_ModelWidget.h ModuleBase_Operation.h - ModuleBase_OperationAction.h ModuleBase_OperationDescription.h ModuleBase_OperationFeature.h ModuleBase_PageBase.h @@ -94,7 +97,17 @@ SET(PROJECT_HEADERS ModuleBase_IconFactory.h ModuleBase_Dialog.h ModuleBase_ModelDialogWidget.h + ModuleBase_ActionParameter.h + ModuleBase_ActionIntParameter.h ModuleBase_ChoiceCtrl.h + ModuleBase_WidgetNameEdit.h + ModuleBase_WidgetRadiobox.h + ModuleBase_WidgetPointInput.h + ModuleBase_ITreeNode.h + ModuleBase_WidgetSelectionFilter.h + ModuleBase_IStepPrs.h + ModuleBase_SelectionFilterType.h + ModuleBase_WidgetUndoLabel.h ) SET(PROJECT_MOC_HEADERS @@ -107,10 +120,10 @@ SET(PROJECT_MOC_HEADERS ModuleBase_IViewer.h ModuleBase_IWorkshop.h ModuleBase_LabelValue.h + ModuleBase_ListView.h ModuleBase_ModelDialogWidget.h ModuleBase_ModelWidget.h ModuleBase_Operation.h - ModuleBase_OperationAction.h ModuleBase_OperationFeature.h ModuleBase_PagedContainer.h ModuleBase_PageGroupBox.h @@ -140,10 +153,16 @@ SET(PROJECT_MOC_HEADERS ModuleBase_WidgetToolbox.h ModuleBase_WidgetValidated.h ModuleBase_ChoiceCtrl.h + ModuleBase_WidgetNameEdit.h + ModuleBase_WidgetRadiobox.h + ModuleBase_WidgetPointInput.h + ModuleBase_WidgetSelectionFilter.h + ModuleBase_WidgetUndoLabel.h ) SET(PROJECT_SOURCES ModuleBase_ActionInfo.cpp + ModuleBase_BRepOwner.cpp ModuleBase_DoubleSpinBox.cpp ModuleBase_Filter.cpp ModuleBase_FilterValidated.cpp @@ -158,9 +177,9 @@ SET(PROJECT_SOURCES ModuleBase_IWidgetCreator.cpp ModuleBase_IWorkshop.cpp ModuleBase_LabelValue.cpp + ModuleBase_ListView.cpp ModuleBase_ModelWidget.cpp ModuleBase_Operation.cpp - ModuleBase_OperationAction.cpp ModuleBase_OperationDescription.cpp ModuleBase_OperationFeature.cpp ModuleBase_PageBase.cpp @@ -203,6 +222,16 @@ SET(PROJECT_SOURCES ModuleBase_SelectionValidator.cpp ModuleBase_Dialog.cpp ModuleBase_ChoiceCtrl.cpp + ModuleBase_WidgetNameEdit.cpp + ModuleBase_WidgetRadiobox.cpp + ModuleBase_WidgetPointInput.cpp + ModuleBase_WidgetSelectionFilter.cpp + ModuleBase_IStepPrs.cpp + ModuleBase_WidgetUndoLabel.cpp +) + +SET(TEXT_RESOURCES + ModuleBase_msg_fr.ts ) SET(PROJECT_LIBRARIES @@ -214,9 +243,8 @@ SET(PROJECT_LIBRARIES GeomDataAPI GeomAlgoAPI ${QT_LIBRARIES} - ${CAS_VIEWER} - ${CAS_KERNEL} - ${CAS_SHAPE} + ${OpenCASCADE_FoundationClasses_LIBRARIES} + ${OpenCASCADE_Visualization_LIBRARIES} ${suit} ${qtx} ${ViewerData} @@ -225,13 +253,24 @@ SET(PROJECT_LIBRARIES # sources / moc wrappings QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS}) -#QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES}) +IF (${UPDATE_TRANSLATION}) + SET(PROJECT_FILES ${PROJECT_SOURCES} ${PROJECT_HEADERS} ) + QT5_CREATE_TRANSLATION(QM_RESOURCES + ${PROJECT_FILES} + ${TEXT_RESOURCES} + OPTIONS -extensions cpp -no-recursive -locations none + ) +ELSE(${UPDATE_TRANSLATION}) + IF(${MAKE_TRANSLATION}) + QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES}) + ENDIF(${MAKE_TRANSLATION}) +ENDIF(${UPDATE_TRANSLATION}) SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES} ${QM_RESOURCES}) -#SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES} ${PROJECT_RESOURCES}) +SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES} ${PROJECT_RESOURCES}) INCLUDE_DIRECTORIES( - ${CAS_INCLUDE_DIRS} + ${OpenCASCADE_INCLUDE_DIR} ${PROJECT_SOURCE_DIR}/src/Config ${PROJECT_SOURCE_DIR}/src/Events ${PROJECT_SOURCE_DIR}/src/ModelAPI @@ -246,8 +285,16 @@ IF(${HAVE_SALOME}) INCLUDE_DIRECTORIES(${SALOME_KERNEL_INCLUDE}) ENDIF(${HAVE_SALOME}) -ADD_DEFINITIONS(-DMODULEBASE_EXPORTS ${CAS_DEFINITIONS}) -ADD_LIBRARY(ModuleBase SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${PROJECT_AUTOMOC}) +ADD_DEFINITIONS(-DMODULEBASE_EXPORTS ${OpenCASCADE_DEFINITIONS}) +ADD_LIBRARY(ModuleBase SHARED + ${PROJECT_SOURCES} + ${PROJECT_HEADERS} + ${PROJECT_AUTOMOC} + ${TEXT_RESOURCES} + ${QM_RESOURCES} +) + TARGET_LINK_LIBRARIES(ModuleBase GeomAPI ${PROJECT_LIBRARIES}) INSTALL(TARGETS ModuleBase DESTINATION ${SHAPER_INSTALL_BIN}) +INSTALL(FILES ${QM_RESOURCES} DESTINATION ${SHAPER_INSTALL_QM_RESOURCES})