Salome HOME
Yacs decorator
[modules/yacs.git] / src / py2yacs / CMakeLists.txt
1 # Copyright (C) 2012-2020  CEA/DEN, 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 INCLUDE_DIRECTORIES(
21   ${PYTHON_INCLUDE_DIR}
22   ${OMNIORBPY_INCLUDE_DIR}
23   ${SALOME_INCL_PATH}
24   ${PROJECT_SOURCE_DIR}/src/bases
25   ${PROJECT_SOURCE_DIR}/src/engine
26   ${PROJECT_SOURCE_DIR}/src/runtime
27   ${PROJECT_SOURCE_DIR}
28   )
29
30 ADD_DEFINITIONS(
31   ${PYTHON_DEFINITIONS}
32   ${OMNIORB_DEFINITIONS}
33   )
34
35 IF(SALOME_BUILD_TESTS)
36   ADD_SUBDIRECTORY(Test)
37 ENDIF(SALOME_BUILD_TESTS)
38
39 SET(_link_LIBRARIES
40   ${PYTHON_LIBRARIES}
41   YACSRuntimeSALOME
42   )
43
44 SET(_py2yacs_sources
45   py2yacs.cxx
46   )
47
48 SET(_py2yacs_headers
49   py2yacs.hxx
50   )
51
52 ADD_LIBRARY(py2yacslib ${_py2yacs_sources})
53 TARGET_LINK_LIBRARIES(py2yacslib ${_link_LIBRARIES})
54
55 INSTALL(TARGETS py2yacslib EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
56 INSTALL(FILES ${_py2yacs_headers} DESTINATION ${SALOME_INSTALL_HEADERS})
57
58 SET( _py_SCRIPTS
59   py2yacs.py
60   yacsdecorator.py
61   yacstools.py
62   )
63
64 SET(_py_PROGS
65   yacsbuild.py
66   )
67
68 SALOME_INSTALL_SCRIPTS("${_py_SCRIPTS}"  ${SALOME_INSTALL_PYTHON})
69 SALOME_INSTALL_SCRIPTS("${_py_PROGS}" ${SALOME_INSTALL_SCRIPT_SCRIPTS})