Salome HOME
Get rid of compilation warnings. Part III. Eliminate rest of warnings.
[modules/shaper.git] / src / PartSet / CMakeLists.txt
index c029f0565752068615d9af7f9698f927de30a50f..d869c8b93b94a22e6348ae7a88d47f1f35799cc3 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-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)
@@ -27,6 +26,8 @@ INCLUDE_DIRECTORIES(${QT_INCLUDES})
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(${QT_DEFINITIONS})
 
+SET(UPDATE_TRANSLATION OFF)
+
 SET(PROJECT_HEADERS
     PartSet.h
     PartSet_Constants.h
@@ -58,7 +59,10 @@ SET(PROJECT_HEADERS
     PartSet_WidgetSketchLabel.h
     PartSet_CenterPrs.h
     PartSet_ExternalPointsMgr.h
-       PartSet_TreeNodes.h
+    PartSet_TreeNodes.h
+    PartSet_FieldStepPrs.h
+    PartSet_WidgetBSplinePoints.h
+    PartSet_BSplineWidget.h
 )
 
 SET(PROJECT_MOC_HEADERS
@@ -76,7 +80,9 @@ SET(PROJECT_MOC_HEADERS
     PartSet_WidgetShapeSelector.h
     PartSet_WidgetSketchCreator.h
     PartSet_WidgetSketchLabel.h
+    PartSet_WidgetBSplinePoints.h
     PartSet_ExternalPointsMgr.h
+    PartSet_BSplineWidget.h
 )
 
 SET(PROJECT_SOURCES
@@ -107,16 +113,19 @@ SET(PROJECT_SOURCES
     PartSet_WidgetSketchLabel.cpp
     PartSet_CenterPrs.cpp
     PartSet_ExternalPointsMgr.cpp
-       PartSet_TreeNodes.cpp
+    PartSet_TreeNodes.cpp
+    PartSet_FieldStepPrs.cpp
+    PartSet_WidgetBSplinePoints.cpp
+    PartSet_BSplineWidget.cpp
 )
 
 SET(PROJECT_RESOURCES
     PartSet_icons.qrc
 )
 
-#SET(TEXT_RESOURCES
-#    PartSet_msg_fr.ts
-#)
+SET(TEXT_RESOURCES
+    PartSet_msg_fr.ts
+)
 
 SET(PROJECT_LIBRARIES
     ModuleBase
@@ -126,8 +135,7 @@ SET(PROJECT_LIBRARIES
     GeomDataAPI
     SketcherPrs
     ${QT_LIBRARIES}
-    ${CAS_KERNEL}
-    ${CAS_SHAPE}
+    ${OpenCASCADE_FoundationClasses_LIBRARIES}
 )
 
 # sources / moc wrappings
@@ -135,17 +143,24 @@ QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
 
 # sources / rcc wrappings
 QT_ADD_RESOURCES(PROJECT_COMPILED_RESOURCES ${PROJECT_RESOURCES})
-#QT4_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
-#QT4_CREATE_TRANSLATION(QM_RESOURCES
-#                       ${PROJECT_SOURCES}
-#                       ${TEXT_RESOURCES}
-#                       OPTIONS -extensions cpp -no-recursive
-#                       )
-
-#SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES} ${QM_RESOURCES})
-SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES})
-#SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES} ${PROJECT_RESOURCES})
-SOURCE_GROUP ("Resource Files" FILES ${PROJECT_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 ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES})
+SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES} ${PROJECT_RESOURCES})
+#SOURCE_GROUP ("Resource Files" FILES ${PROJECT_RESOURCES})
 
 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/XGUI
                     ${PROJECT_SOURCE_DIR}/src/Config
@@ -162,7 +177,7 @@ INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/XGUI
                     ${PROJECT_SOURCE_DIR}/src/PartSetPlugin
                     ${PROJECT_SOURCE_DIR}/src/GeomAPI
                     ${PROJECT_SOURCE_DIR}/src/CollectionPlugin
-                    ${CAS_INCLUDE_DIRS}
+                    ${OpenCASCADE_INCLUDE_DIR}
                     ${SUIT_INCLUDE}
 )
 
@@ -173,14 +188,14 @@ ELSE(${HAVE_SALOME})
 ENDIF(${HAVE_SALOME})
 
 
-ADD_DEFINITIONS(-DPARTSET_EXPORTS ${CAS_DEFINITIONS})
+ADD_DEFINITIONS(-DPARTSET_EXPORTS ${OpenCASCADE_DEFINITIONS})
 ADD_LIBRARY(PartSet SHARED
     ${PROJECT_SOURCES}
     ${PROJECT_HEADERS}
     ${PROJECT_COMPILED_RESOURCES}
     ${PROJECT_AUTOMOC}
-#    ${TEXT_RESOURCES}
-#    ${QM_RESOURCES}
+    ${TEXT_RESOURCES}
+    ${QM_RESOURCES}
 )
 
 # The Qt5Widgets_LIBRARIES variable also includes QtGui and QtCore
@@ -189,4 +204,4 @@ TARGET_LINK_LIBRARIES(PartSet ${PROJECT_LIBRARIES} XGUI ModelAPI GeomAlgoAPI)
 ADD_DEPENDENCIES(PartSet ModuleBase)
 
 INSTALL(TARGETS PartSet DESTINATION ${SHAPER_INSTALL_BIN})
-#INSTALL(FILES ${QM_RESOURCES} DESTINATION bin)
+INSTALL(FILES ${QM_RESOURCES} DESTINATION ${SHAPER_INSTALL_QM_RESOURCES})