Salome HOME
Removing stand alone mascaret now within telemac
[modules/hydrosolver.git] / src / mascaret_wrapper / CMakeLists.txt
1 #  Copyright (C) 2012-2013 EDF
2 #
3 #  This file is part of SALOME HYDRO module.
4 #
5 #  SALOME HYDRO module is free software: you can redistribute it and/or modify
6 #  it under the terms of the GNU General Public License as published by
7 #  the Free Software Foundation, either version 3 of the License, or
8 #  (at your option) any later version.
9 #
10 #  SALOME HYDRO module is distributed in the hope that it will be useful,
11 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
12 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 #  GNU General Public License for more details.
14 #
15 #  You should have received a copy of the GNU General Public License
16 #  along with SALOME HYDRO module.  If not, see <http://www.gnu.org/licenses/>.
17
18 INCLUDE(${SWIG_USE_FILE})
19
20 # --- options ---
21
22 # additional include directories
23 INCLUDE_DIRECTORIES(
24   ${PYTHON_INCLUDE_DIRS}
25   ${MASCARET_INCLUDE_DIR}
26   ${CMAKE_CURRENT_SOURCE_DIR}
27 )
28
29 # swig flags
30 SET_SOURCE_FILES_PROPERTIES(mascaret_swig.i PROPERTIES
31                             CPLUSPLUS ON
32                             SWIG_DEFINITIONS "-shadow")
33
34 # additional preprocessor / compiler flags
35 ADD_DEFINITIONS(
36   ${PYTHON_DEFINITIONS}
37   )
38
39 # libraries to link to
40 SET(_link_LIBRARIES
41   ${PYTHON_LIBRARIES}
42   ${MASCARET_LIBRARIES}
43   )
44
45 # --- sources ---
46 SET(mascaret_SOURCES
47   Mascaret.cxx
48   )
49 # --- headers ---
50 SET(mascaret_HEADERS
51   Mascaret.hxx
52   )
53
54 # --- scripts ---
55 # scripts / swig wrappings
56 SET(_swig_SCRIPTS
57   ${CMAKE_CURRENT_BINARY_DIR}/mascaret_swig.py
58 )
59
60 # --- rules ---
61 SWIG_ADD_MODULE(mascaret_swig python mascaret_swig.i ${mascaret_SOURCES})
62 SWIG_LINK_LIBRARIES(mascaret_swig "${_link_LIBRARIES}")
63
64 SET(mypkgpythondir ${SALOME_INSTALL_PYTHON}/salome/hydro/mascaret)
65
66 INSTALL(TARGETS ${SWIG_MODULE_mascaret_swig_REAL_NAME} DESTINATION ${mypkgpythondir})
67 SALOME_INSTALL_SCRIPTS("${_swig_SCRIPTS}" ${mypkgpythondir})