Salome HOME
bos #18834 When SHAPER is deactivated, its panel should not be available in desktop...
[modules/shaper.git] / CMakeLists.txt
index 79938bc10eb03e5c09eee7b9bb81680c3418eef0..1b7e24ed3227ac9502f5785083b7225102043984 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
+#
 
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.10)
 
@@ -27,10 +26,13 @@ IF(WIN32)
   CMAKE_POLICY(SET CMP0020 OLD) # disable automatic linking to qtmain.lib
 ENDIF(WIN32)
 
-SET (SHAPER_Version 9.2.0)
+SET (SHAPER_Version 9.4.0)
 
 SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeCommon" ${CMAKE_MODULE_PATH})
-OPTION(SHAPER_BUILD_DOC "Generate SHAPER documentation" ON)
+
+IF (NOT CADBUILDER_BUILD_DOC)
+  OPTION(SHAPER_BUILD_DOC "Generate SHAPER documentation" ON)
+ENDIF(NOT CADBUILDER_BUILD_DOC)
 
 INCLUDE(SalomeMacros)
 
@@ -95,15 +97,19 @@ IF(${HAVE_SALOME})
     SET(SHAPER_INSTALL_BIN lib/salome CACHE INTERNAL "" FORCE)
     SET(SHAPER_INSTALL_PLUGIN_FILES lib/salome CACHE INTERNAL "" FORCE)
     SET(SHAPER_INSTALL_PYTHON_FILES bin/salome CACHE INTERNAL "" FORCE)
+    SET(SHAPER_INSTALL_HEADERS include/salome CACHE INTERNAL "" FORCE)
     SET(SHAPER_INSTALL_RESOURCES share/salome/resources/shaper CACHE INTERNAL "" FORCE)
     SET(SHAPER_INSTALL_QM_RESOURCES share/salome/resources/shaper CACHE INTERNAL "" FORCE)
     SET(SHAPER_INSTALL_XML_RESOURCES share/salome/resources/shaper CACHE INTERNAL "" FORCE)
     SET(SHAPER_INSTALL_GUI_DOC share/doc/salome/gui/SHAPER CACHE INTERNAL "" FORCE)
     SET(SHAPER_INSTALL_TUI_DOC share/doc/salome/tui/SHAPER CACHE INTERNAL "" FORCE)
     # without SALOME there is another kind of documentation, separated one
+
+    SALOME_INSTALL_SCRIPTS("shaper_test.py" ${SHAPER_INSTALL_PYTHON_FILES})
 ELSE(${HAVE_SALOME})
     SET(SHAPER_INSTALL_ADDONS addons CACHE INTERNAL "" FORCE)
     SET(SHAPER_INSTALL_BIN bin CACHE INTERNAL "" FORCE)
+    SET(SHAPER_INSTALL_HEADERS include CACHE INTERNAL "" FORCE)
     SET(SHAPER_INSTALL_PLUGIN_FILES plugins CACHE INTERNAL "" FORCE)
     SET(SHAPER_INSTALL_PYTHON_FILES plugins CACHE INTERNAL "" FORCE)
     SET(SHAPER_INSTALL_RESOURCES resources CACHE INTERNAL "" FORCE)
@@ -116,8 +122,12 @@ ENDIF(${HAVE_SALOME})
 # Sketcher: Change radius of circular edges while dragging a point on the edge
 SET(SKETCHER_CHANGE_RADIUS_WHEN_MOVE TRUE)
 
+SET(MAKE_TRANSLATION YES)
+
+    ADD_DEFINITIONS( -DMAKE_TRANSLATION )
 ADD_SUBDIRECTORY (src/Config)
 ADD_SUBDIRECTORY (src/Events)
+ADD_SUBDIRECTORY (src/Selector)
 ADD_SUBDIRECTORY (src/Model)
 ADD_SUBDIRECTORY (src/XAO)
 ADD_SUBDIRECTORY (src/GeomAPI)
@@ -144,6 +154,7 @@ ADD_SUBDIRECTORY (src/PartSet)
 ADD_SUBDIRECTORY (src/XGUI)
 ADD_SUBDIRECTORY (src/ExchangePlugin)
 ADD_SUBDIRECTORY (src/GeomValidators)
+ADD_SUBDIRECTORY (src/FiltersPlugin)
 ADD_SUBDIRECTORY (src/InitializationPlugin)
 ADD_SUBDIRECTORY (src/ParametersPlugin)
 ADD_SUBDIRECTORY (src/PythonAddons)
@@ -161,6 +172,7 @@ ADD_SUBDIRECTORY (src/PrimitivesAPI)
 ADD_SUBDIRECTORY (src/SketchAPI)
 ADD_SUBDIRECTORY (src/GDMLAPI)
 ADD_SUBDIRECTORY (src/ConnectorAPI)
+ADD_SUBDIRECTORY (src/FiltersAPI)
 # Tests
 ADD_SUBDIRECTORY (test.API/SHAPER)
 
@@ -173,9 +185,17 @@ ENABLE_TESTING()
 
 IF(ADD_MODELS_TESTS)
   ADD_SUBDIRECTORY (test.models)
-  ADD_CUSTOM_TARGET(run_unit_tests COMMAND ${CMAKE_CTEST_COMMAND} -C "${CMAKE_BUILD_TYPE}" -LE "models_tests")
+  ADD_CUSTOM_TARGET(run_model_tests COMMAND ${CMAKE_CTEST_COMMAND} -C "${CMAKE_BUILD_TYPE}" -LE "models_tests")
 ENDIF(ADD_MODELS_TESTS)
 
+IF(ADD_COMPATIBILITY_TESTS)
+  ADD_SUBDIRECTORY (test.compatibility)
+  ADD_CUSTOM_TARGET(run_compatibility_tests COMMAND ${CMAKE_CTEST_COMMAND} -C "${CMAKE_BUILD_TYPE}" -LE "tests_compatibility")
+ENDIF(ADD_COMPATIBILITY_TESTS)
+
+IF(ADD_HDF_TESTS)
+  ADD_SUBDIRECTORY (test.hdfs)
+ENDIF(ADD_HDF_TESTS)
 
 IF(SHAPER_BUILD_DOC)
     INCLUDE(FindSphinx)