Salome HOME
Update copyrights 2014.
[modules/homard.git] / src / HOMARDGUI / CMakeLists.txt
1 # Copyright (C) 2012-2014  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(UseQt4Ext)
21 INCLUDE(UsePyQt4)
22
23 # --- options ---
24 # additional include directories
25 INCLUDE_DIRECTORIES(
26   ${QT_INCLUDES}
27   ${CAS_INCLUDE_DIRS}
28   ${PYTHON_INCLUDE_DIRS}
29   ${MEDFILE_INCLUDE_DIRS}
30   ${HDF5_INCLUDE_DIRS}
31   ${Boost_INCLUDE_DIRS}
32   ${OMNIORB_INCLUDE_DIR}
33   ${KERNEL_INCLUDE_DIRS}
34   ${GUI_INCLUDE_DIRS}
35   ${CMAKE_CURRENT_SOURCE_DIR}
36   ${PROJECT_BINARY_DIR}
37   ${PROJECT_BINARY_DIR}/idl
38   ${PROJECT_BINARY_DIR}/adm_local/unix
39   ${PROJECT_SOURCE_DIR}/src/HOMARD
40   ${PROJECT_SOURCE_DIR}/src/HOMARD_I
41 )
42
43 # additional preprocessor / compiler flags
44 ADD_DEFINITIONS(
45   ${BOOST_DEFINITIONS}
46   ${OMNIORB_DEFINITIONS}
47   ${CAS_DEFINITIONS}
48   ${KERNEL_DEFINITIONS}
49 )
50
51 # libraries to link to
52 SET(_link_LIBRARIES
53   ${MEDFILE_C_LIBRARIES}
54   ${KERNEL_SalomeLifeCycleCORBA}
55   ${KERNEL_SalomeDS}
56   ${GUI_SalomeApp}
57   SalomeIDLHOMARD
58   HOMARDEngine
59 )
60
61 # --- headers ---
62
63 # header files / to be processed by moc
64 SET(_moc_HEADERS
65   HOMARDGUI.h
66   MonCreateBoundaryAn.h
67   MonEditBoundaryAn.h
68   MonCreateBoundaryDi.h
69   MonEditBoundaryDi.h
70   MonCreateCase.h
71   MonEditCase.h
72   MonCreateZone.h
73   MonEditZone.h
74   MonCreateHypothesis.h
75   MonEditHypothesis.h
76   MonCreateListGroup.h
77   MonEditListGroup.h
78   MonCreateIteration.h
79   MonEditIteration.h
80   MonPursueIteration.h
81   MonMeshInfo.h
82   MonIterInfo.h
83   MonCreateYACS.h
84   MonEditYACS.h
85   MonEditFile.h
86 )
87
88 # header files / no moc processing
89 SET(_other_HEADERS
90   CreateBoundaryAn.h
91   CreateBoundaryDi.h
92   CreateCase.h
93   CreateZone.h
94   CreateHypothesis.h
95   CreateListGroup.h
96   CreateIteration.h
97   PursueIteration.h
98   MeshInfo.h
99   IterInfo.h
100   CreateYACS.h
101   HOMARDGUI_Utils.h
102   EditFile.h
103   HomardQtCommun.h
104   HOMARDGUI_Exports.hxx
105 )
106
107 # header files / to install
108 SET(HOMARD_HEADERS ${_other_HEADERS} ${_moc_HEADERS})
109
110 # --- sources ---
111
112 # sources / moc wrappings
113 QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
114
115 # sources / static
116 SET(_other_SOURCES
117   HOMARDGUI.cxx
118   HOMARDGUI_Utils.cxx
119   MonCreateBoundaryAn.cxx
120   MonEditBoundaryAn.cxx
121   MonCreateBoundaryDi.cxx
122   MonEditBoundaryDi.cxx
123   MonCreateCase.cxx
124   MonEditCase.cxx
125   MonCreateHypothesis.cxx
126   MonEditHypothesis.cxx
127   MonCreateListGroup.cxx
128   MonEditListGroup.cxx
129   MonCreateIteration.cxx
130   MonEditIteration.cxx
131   MonPursueIteration.cxx
132   MonCreateZone.cxx
133   MonEditZone.cxx
134   MonMeshInfo.cxx
135   MonIterInfo.cxx
136   MonCreateYACS.cxx
137   MonEditYACS.cxx
138   MonEditFile.cxx
139   HomardQtCommun.cxx
140 )
141
142 # sources / to compile
143 SET(HOMARD_SOURCES ${_other_SOURCES} ${_moc_SOURCES})
144
145 # --- resources ---
146
147 # resource files / to be processed by lrelease
148 SET(_ts_RESOURCES
149   HOMARD_msg_en.ts
150   HOMARD_msg_fr.ts
151   HOMARD_msg_ja.ts
152
153
154 # no install files
155 # uic files / to be processed by pyuic
156 SET(_pyuic_files
157   CreateBoundaryAn.ui
158   CreateBoundaryDi.ui
159   CreateCase.ui
160   CreateHypothesis.ui
161   CreateIteration.ui
162   CreateListGroup.ui
163   CreateZone.ui
164   PursueIteration.ui
165   MeshInfo.ui
166   IterInfo.ui
167   CreateYACS.ui
168   EditFile.ui
169 )
170
171 # scripts / pyuic wrappings
172 PYQT4_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
173
174 # --- rules ---
175
176 ADD_LIBRARY(HOMARD ${HOMARD_SOURCES})
177 TARGET_LINK_LIBRARIES(HOMARD ${_link_LIBRARIES} )
178 INSTALL(TARGETS HOMARD EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
179
180 INSTALL(FILES ${HOMARD_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
181 QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_HOMARD_INSTALL_RES_DATA}")