Salome HOME
Porting CALCULATOR module to the CMake build system: initial version.
[samples/calculator.git] / src / CALCULATOR / CMakeLists.txt
1 # Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
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.
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 # --- options ---
21 # additional include directories
22 INCLUDE_DIRECTORIES(
23   ${OMNIORB_INCLUDE_DIR}
24   ${KERNEL_INCLUDE_DIRS}
25   ${MED_INCLUDE_DIRS}
26   ${PROJECT_BINARY_DIR}
27   ${PROJECT_BINARY_DIR}/idl
28 )
29
30 # additional preprocessor / compiler flags
31 ADD_DEFINITIONS(
32   ${QT_DEFINITIONS}
33 )
34
35 # libraries to link to
36 SET(_link_LIBRARIES
37   ${KERNEL_SalomeContainer}
38   ${KERNEL_OpUtil}
39   ${KERNEL_SalomeIDLKERNEL}
40   ${MED_medcouplingclient}
41   ${MED_medcouplingcorba}
42   ${MED_SalomeIDLMED}
43   SalomeIDLCALCULATOR
44 )
45 # --- headers ---
46
47 # header files / no moc processing
48 SET(CALCULATOR_HEADERS
49   CALCULATOR.hxx
50 )
51
52 # --- sources ---
53
54 # sources / static
55 SET(CALCULATOR_SOURCES
56   CALCULATOR.cxx
57 )
58
59 # --- scripts ---
60
61 # scripts / static
62 SET(_bin_SCRIPTS
63   CALCULATOR_TEST.py
64   CALCULATOR_TEST_WITHOUTIHM.py
65   CALCULATOR_TEST_STUDY_WITHOUTIHM.py
66   graphe1.py
67 )
68
69 # resource files / static
70 SET(CALCULATOR_RESOURCES
71   graphe1.xml
72 )
73
74
75 # --- rules ---
76
77 ADD_LIBRARY(CALCULATOREngine ${CALCULATOR_SOURCES})
78 TARGET_LINK_LIBRARIES(CALCULATOREngine ${_link_LIBRARIES})
79 INSTALL(TARGETS CALCULATOREngine EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
80
81 INSTALL(FILES ${CALCULATOR_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
82
83 SALOME_INSTALL_SCRIPTS("${_bin_SCRIPTS}" ${SALOME_INSTALL_SCRIPT_PYTHON})
84
85 INSTALL(FILES ${CALCULATOR_RESOURCES} DESTINATION ${SALOME_CALCULATOR_INSTALL_RES_DATA})