Salome HOME
Merge branch V7_3_1_BR
[modules/smesh.git] / src / Tools / MacMesh / CMakeLists.txt
1 # Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
2
3 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5
6 # This library is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU Lesser General Public
8 # License as published by the Free Software Foundation; either
9 # version 2.1 of the License, or (at your option) any later version.
10
11 # This library is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 # Lesser General Public License for more details.
15
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with this library; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19
20 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21
22 SET(MACMESH_INSTALL_PY ${SALOME_SMESH_INSTALL_PLUGINS}/MacMesh)
23 SET(MACMESH_INSTALL_DOC ${SALOME_INSTALL_DOC}/gui/SMESH/MacMesh)
24
25 SALOME_CONFIGURE_FILE(Doc/index.html.in index.html)
26 SALOME_CONFIGURE_FILE(Example/PressureValve.py.in PressureValve.py)
27
28 SET(plugin_DOC_FILES
29   Doc/MacMesh.v.10avr.pdf
30   ${CMAKE_CURRENT_BINARY_DIR}/index.html
31   Doc/snap.jpg
32   )
33
34 IF(SALOME_BUILD_DOC)
35   INSTALL(FILES ${plugin_DOC_FILES} DESTINATION ${MACMESH_INSTALL_DOC})
36 ENDIF(SALOME_BUILD_DOC)
37
38 # --- scripts ---
39
40 # scripts / static
41 SET(plugin_SCRIPTS
42   MacMesh/Alarms.py
43   MacMesh/CentralUnrefine.py
44   MacMesh/CompositeBox.py
45   MacMesh/CompositeBoxF.py
46   MacMesh/Config.py
47   MacMesh/CutnGroup.py
48   MacMesh/Cylinder.py
49   MacMesh/GenFunctions.py
50   MacMesh/MacObject.py
51   MacMesh/PublishGroups.py
52   MacMesh/SharpAngle.py
53 )
54 SET(sample_SCRIPT
55   ${CMAKE_CURRENT_BINARY_DIR}/PressureValve.py
56 )
57 # --- rules ---
58
59 SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${MACMESH_INSTALL_PY})
60 SALOME_INSTALL_SCRIPTS("${sample_SCRIPT}" ${SALOME_INSTALL_SCRIPT_PYTHON} DEF_PERMS)
61
62 SET(testname MacMesh_Example_PressureValve)
63 SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
64 ADD_TEST(
65   NAME ${testname}
66   COMMAND ${PYTHON_EXECUTABLE} -B ${CMAKE_SOURCE_DIR}/doc/salome/examples/testme.py ${sample_SCRIPT})
67 SET_TESTS_PROPERTIES(${testname} PROPERTIES ENVIRONMENT "${tests_env}")
68