Salome HOME
Updated copyright comment
[plugins/netgenplugin.git] / src / NETGENPlugin / CMakeLists.txt
1 # Copyright (C) 2012-2024  CEA, EDF, 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, 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(UseQtExt)
21
22 # --- options ---
23 # additional include directories
24 INCLUDE_DIRECTORIES(
25   ${QT_INCLUDES}
26   ${KERNEL_INCLUDE_DIRS}
27   ${GUI_INCLUDE_DIRS}
28   ${GEOM_INCLUDE_DIRS}
29   ${OpenCASCADE_INCLUDE_DIR}
30   ${SMESH_INCLUDE_DIRS}
31   ${MEDCOUPLING_INCLUDE_DIRS}
32   ${Boost_INCLUDE_DIRS}
33   ${OMNIORB_INCLUDE_DIR}
34   ${PROJECT_BINARY_DIR}/idl
35 )
36
37 #Avoid compilation warnings from netgen headers
38 INCLUDE_DIRECTORIES( SYSTEM  ${NETGEN_INCLUDE_DIRS} ${NETGEN_ZLIB_INCLUDE_DIRS} )
39
40 # additional preprocessor / compiler flags
41 ADD_DEFINITIONS(
42   ${QT_DEFINITIONS}
43   ${OMNIORB_DEFINITIONS}
44   ${OpenCASCADE_DEFINITIONS}
45   ${BOOST_DEFINITIONS}
46   ${NETGEN_DEFINITIONS}
47 )
48
49 # libraries to link to
50 SET(_link_LIBRARIES
51   ${NETGEN_LIBRARIES}
52   ${OpenCASCADE_FoundationClasses_LIBRARIES}
53   ${OpenCASCADE_ModelingData_LIBRARIES}
54   ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
55   ${OpenCASCADE_DataExchange_LIBRARIES}
56   ${OpenCASCADE_Visualization_LIBRARIES}
57   ${OpenCASCADE_ApplicationFramework_LIBRARIES}
58   ${GEOM_GEOMbasic}
59   ${SMESH_SMESHimpl}
60   ${SMESH_SMESHEngine}
61   ${SMESH_SMESHUtils}
62   ${SMESH_StdMeshersEngine}
63   ${SMESH_StdMeshers}
64   ${SMESH_SMESHDS}
65   ${SMESH_SMDS}
66   ${SMESH_SMESHControls}
67   ${KERNEL_SalomeGenericObj}
68   ${KERNEL_SalomeNS}
69   ${KERNEL_SALOMELocalTrace}
70   ${KERNEL_OpUtil}
71   VTK::CommonCore
72   VTK::CommonDataModel
73   SalomeIDLNETGENPLUGIN
74   Qt5::Core
75 )
76
77 # --- headers ---
78
79 # header files
80 SET(NETGENEngine_HEADERS
81   NETGENPlugin_NETGEN_3D.hxx
82   NETGENPlugin_NETGEN_3D_i.hxx
83   NETGENPlugin_NETGEN_2D.hxx
84   NETGENPlugin_NETGEN_2D_i.hxx
85   NETGENPlugin_NETGEN_2D3D.hxx
86   NETGENPlugin_NETGEN_2D3D_i.hxx
87   NETGENPlugin_NETGEN_2D_ONLY.hxx
88   NETGENPlugin_NETGEN_2D_ONLY_i.hxx
89   NETGENPlugin_Hypothesis.hxx
90   NETGENPlugin_Hypothesis_i.hxx
91   NETGENPlugin_Hypothesis_2D.hxx
92   NETGENPlugin_Hypothesis_2D_i.hxx
93   NETGENPlugin_Hypothesis_3D_i.hxx
94   NETGENPlugin_Hypothesis_2D_ONLY_i.hxx
95   NETGENPlugin_SimpleHypothesis_2D.hxx
96   NETGENPlugin_SimpleHypothesis_3D.hxx
97   NETGENPlugin_SimpleHypothesis_2D_i.hxx
98   NETGENPlugin_SimpleHypothesis_3D_i.hxx
99   NETGENPlugin_Mesher.hxx
100   NETGENPlugin_Remesher_2D.hxx
101   NETGENPlugin_Defs.hxx
102   NETGENPlugin_DriverParam.hxx
103   NETGENPlugin_NETGEN_3D_SA.hxx
104   NETGENPlugin_NETGEN_2D_SA.hxx
105   NETGENPlugin_NETGEN_1D2D3D_SA.hxx
106   NETGENPlugin_NETGEN_3D_Remote.hxx
107   NETGENPlugin_NETGEN_3D_Remote_i.hxx
108   NETGENPlugin_NETGEN_2D_Remote.hxx
109   NETGENPlugin_NETGEN_2D_Remote_i.hxx
110 )
111
112 # --- sources ---
113
114 # sources / static
115 SET(NETGENEngine_SOURCES
116   NETGENPlugin_NETGEN_3D.cxx
117   NETGENPlugin_NETGEN_3D_i.cxx
118   NETGENPlugin_Mesher.cxx
119   NETGENPlugin_NETGEN_2D.cxx
120   NETGENPlugin_NETGEN_2D_i.cxx
121   NETGENPlugin_NETGEN_2D3D.cxx
122   NETGENPlugin_NETGEN_2D3D_i.cxx
123   NETGENPlugin_NETGEN_2D_ONLY.cxx
124   NETGENPlugin_NETGEN_2D_ONLY_i.cxx
125   NETGENPlugin_Hypothesis.cxx
126   NETGENPlugin_Hypothesis_i.cxx
127   NETGENPlugin_Hypothesis_2D.cxx
128   NETGENPlugin_Hypothesis_2D_i.cxx
129   NETGENPlugin_Hypothesis_3D_i.cxx
130   NETGENPlugin_Hypothesis_2D_ONLY_i.cxx
131   NETGENPlugin_SimpleHypothesis_2D.cxx
132   NETGENPlugin_SimpleHypothesis_3D.cxx
133   NETGENPlugin_SimpleHypothesis_2D_i.cxx
134   NETGENPlugin_SimpleHypothesis_3D_i.cxx
135   NETGENPlugin_Remesher_2D.cxx
136   NETGENPlugin_i.cxx
137   NETGENPlugin_DriverParam.cxx
138   NETGENPlugin_NETGEN_3D_SA.cxx
139   NETGENPlugin_NETGEN_2D_SA.cxx
140   NETGENPlugin_NETGEN_1D2D3D_SA.cxx
141   NETGENPlugin_NETGEN_3D_Remote.cxx
142   NETGENPlugin_NETGEN_3D_Remote_i.cxx
143   NETGENPlugin_NETGEN_2D_Remote.cxx
144   NETGENPlugin_NETGEN_2D_Remote_i.cxx
145 )
146
147 SET(NetgenRunner_SOURCES
148   NETGENPlugin_Runner_main.cxx
149 )
150
151 # --- scripts ---
152
153 # scripts / static
154 SET(_bin_SCRIPTS
155   __init__.py
156   NETGENPluginBuilder.py
157 )
158
159 # --- rules ---
160
161 ADD_LIBRARY(NETGENEngine ${NETGENEngine_SOURCES})
162 TARGET_LINK_LIBRARIES(NETGENEngine ${_link_LIBRARIES} )
163 INSTALL(TARGETS NETGENEngine EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
164
165 ADD_EXECUTABLE(NETGENPlugin_Runner ${NetgenRunner_SOURCES})
166 TARGET_LINK_LIBRARIES(NETGENPlugin_Runner ${_link_LIBRARIES} NETGENEngine )
167 INSTALL(TARGETS NETGENPlugin_Runner EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
168
169 INSTALL(FILES ${NETGENEngine_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
170
171 SALOME_INSTALL_SCRIPTS("${_bin_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/NETGENPlugin)