]> SALOME platform Git repositories - modules/homard.git/blob - src/HOMARDGUI/CMakeLists.txt
Salome HOME
Porting HOMARD SALOME module to the CMake build system: initial version.
[modules/homard.git] / src / HOMARDGUI / 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 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 )
105
106 # header files / to install
107 SET(HOMARD_HEADERS ${_other_HEADERS} ${_moc_HEADERS})
108
109 # --- sources ---
110
111 # sources / moc wrappings
112 QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
113
114 # sources / static
115 SET(_other_SOURCES
116   HOMARDGUI.cxx
117   HOMARDGUI_Utils.cxx
118   MonCreateBoundaryAn.cxx
119   MonEditBoundaryAn.cxx
120   MonCreateBoundaryDi.cxx
121   MonEditBoundaryDi.cxx
122   MonCreateCase.cxx
123   MonEditCase.cxx
124   MonCreateHypothesis.cxx
125   MonEditHypothesis.cxx
126   MonCreateListGroup.cxx
127   MonEditListGroup.cxx
128   MonCreateIteration.cxx
129   MonEditIteration.cxx
130   MonPursueIteration.cxx
131   MonCreateZone.cxx
132   MonEditZone.cxx
133   MonMeshInfo.cxx
134   MonIterInfo.cxx
135   MonCreateYACS.cxx
136   MonEditYACS.cxx
137   MonEditFile.cxx
138   HomardQtCommun.cxx
139 )
140
141 # sources / to compile
142 SET(HOMARD_SOURCES ${_other_SOURCES} ${_moc_SOURCES})
143
144 # --- resources ---
145
146 # resource files / to be processed by lrelease
147 SET(_ts_RESOURCES
148   HOMARD_msg_en.ts
149   HOMARD_msg_fr.ts
150   HOMARD_msg_ja.ts
151
152
153 # no install files
154 # uic files / to be processed by pyuic
155 SET(_pyuic_files
156   CreateBoundaryAn.ui
157   CreateBoundaryDi.ui
158   CreateCase.ui
159   CreateHypothesis.ui
160   CreateIteration.ui
161   CreateListGroup.ui
162   CreateZone.ui
163   PursueIteration.ui
164   MeshInfo.ui
165   IterInfo.ui
166   CreateYACS.ui
167   EditFile.ui
168 )
169
170 # scripts / pyuic wrappings
171 PYQT4_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
172
173 # --- rules ---
174
175 ADD_LIBRARY(HOMARD ${HOMARD_SOURCES})
176 TARGET_LINK_LIBRARIES(HOMARD ${_link_LIBRARIES} )
177 INSTALL(TARGETS HOMARD EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
178
179 INSTALL(FILES ${HOMARD_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
180 QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_HOMARD_INSTALL_RES_DATA}")