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