Salome HOME
Issue #2998: Add help description for automatic creation of constraints
[modules/shaper.git] / src / ModuleBase / CMakeLists.txt
index ee79fe18606b89c6063ec90cd8f5c6b678aee875..fe127695dd545764b0db4fc78ec1d351b1d8b041 100644 (file)
@@ -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<mailto:webmaster.salome@opencascade.com>
-##
+# Copyright (C) 2014-2019  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,6 +28,8 @@ INCLUDE_DIRECTORIES(${QT_INCLUDES})
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(${QT_DEFINITIONS})
 
+SET(UPDATE_TRANSLATION OFF)
+
 SET(PROJECT_HEADERS
   ModuleBase.h
   ModuleBase_ActionInfo.h
@@ -104,6 +105,9 @@ SET(PROJECT_HEADERS
   ModuleBase_WidgetRadiobox.h
   ModuleBase_WidgetPointInput.h
   ModuleBase_ITreeNode.h
+  ModuleBase_WidgetSelectionFilter.h
+  ModuleBase_IStepPrs.h
+  ModuleBase_SelectionFilterType.h
 )
 
 SET(PROJECT_MOC_HEADERS
@@ -153,6 +157,7 @@ SET(PROJECT_MOC_HEADERS
   ModuleBase_WidgetNameEdit.h
   ModuleBase_WidgetRadiobox.h
   ModuleBase_WidgetPointInput.h
+  ModuleBase_WidgetSelectionFilter.h
 )
 
 SET(PROJECT_SOURCES
@@ -221,6 +226,12 @@ SET(PROJECT_SOURCES
   ModuleBase_WidgetNameEdit.cpp
   ModuleBase_WidgetRadiobox.cpp
   ModuleBase_WidgetPointInput.cpp
+  ModuleBase_WidgetSelectionFilter.cpp
+  ModuleBase_IStepPrs.cpp
+)
+
+SET(TEXT_RESOURCES
+#    ModuleBase_msg_fr.ts
 )
 
 SET(PROJECT_LIBRARIES
@@ -242,10 +253,19 @@ 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
+                          )
+ELSE(${UPDATE_TRANSLATION})
+    QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
+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(
     ${OpenCASCADE_INCLUDE_DIR}
@@ -264,7 +284,15 @@ IF(${HAVE_SALOME})
 ENDIF(${HAVE_SALOME})
 
 ADD_DEFINITIONS(-DMODULEBASE_EXPORTS ${OpenCASCADE_DEFINITIONS})
-ADD_LIBRARY(ModuleBase SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${PROJECT_AUTOMOC})
+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})