Salome HOME
6a93a4f5acf071fe031e26cafab4b43301b7f4c3
[plugins/gmshplugin.git] / src / GMSHPlugin / CMakeLists.txt
1 # Copyright (C) 2012-2015  ALNEOS
2 # Copyright (C) 2016-2024  EDF
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # See http://www.alneos.com/ or email : contact@alneos.fr
19 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #
21
22 # --- options ---
23 # additional include directories
24 INCLUDE_DIRECTORIES(
25   ${KERNEL_INCLUDE_DIRS}
26   ${OpenCASCADE_INCLUDE_DIR}
27   ${GEOM_INCLUDE_DIRS}
28   ${SMESH_INCLUDE_DIRS}
29   ${MEDCOUPLING_INCLUDE_DIRS}
30   ${Boost_INCLUDE_DIRS}
31   ${OMNIORB_INCLUDE_DIR}
32   ${PROJECT_BINARY_DIR}/idl
33 )
34
35 #Avoid compilation warnings from gmsh headers
36 INCLUDE_DIRECTORIES( SYSTEM  ${GMSH_INCLUDE_DIRS} )
37
38 # additional preprocessor / compiler flags
39 ADD_DEFINITIONS(  
40   ${OMNIORB_DEFINITIONS}
41   ${OpenCASCADE_DEFINITIONS}
42   ${BOOST_DEFINITIONS}
43 )
44
45 # libraries to link to
46 SET(_link_LIBRARIES
47   ${OpenCASCADE_FoundationClasses_LIBRARIES}
48   ${OpenCASCADE_ModelingData_LIBRARIES}
49   ${OpenCASCADE_ApplicationFramework_LIBRARIES}
50   ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
51   ${GMSH_LIBRARIES}
52   ${KERNEL_SALOMELocalTrace}
53   ${KERNEL_SALOMEBasics}
54   ${KERNEL_SalomeGenericObj}
55   ${KERNEL_SalomeNS}
56   ${KERNEL_OpUtil}
57   ${SMESH_SMDS}
58   ${SMESH_SMESHDS}
59   ${SMESH_SMESHimpl}
60   ${SMESH_StdMeshers}
61   ${SMESH_SMESHEngine}
62   ${SMESH_MeshDriverGMF}
63   SalomeIDLGMSHPLUGIN
64 )
65
66 # --- headers ---
67
68 # header files
69 SET(GMSHEngine_HEADERS
70   GMSHPlugin_GMSH_2D.hxx
71   GMSHPlugin_GMSH_2D_i.hxx
72   GMSHPlugin_GMSH_3D.hxx
73   GMSHPlugin_GMSH_3D_SA.hxx
74   GMSHPlugin_GMSH_3D_Remote.hxx
75   GMSHPlugin_GMSH_3D_Remote_i.hxx
76   GMSHPlugin_GMSH_3D_i.cxx
77   GMSHPlugin_GMSH.hxx
78   GMSHPlugin_GMSH_i.hxx
79   GMSHPlugin_Hypothesis.hxx
80   GMSHPlugin_Hypothesis_i.hxx
81   GMSHPlugin_Hypothesis_2D.hxx
82   GMSHPlugin_Hypothesis_2D_i.hxx
83   GMSHPlugin_Hypothesis_3D.hxx
84   GMSHPlugin_Hypothesis_3D_i.hxx
85   GMSHPlugin_Mesher.hxx
86   GMSHPlugin_Defs.hxx
87 )
88
89 # --- sources ---
90
91 # sources / static
92 SET(GMSHEngine_SOURCES
93   GMSHPlugin_GMSH_2D.cxx
94   GMSHPlugin_GMSH_2D_i.cxx
95   GMSHPlugin_GMSH_3D.cxx
96   GMSHPlugin_GMSH_3D_SA.cxx
97   GMSHPlugin_GMSH_3D_Remote.cxx
98   GMSHPlugin_GMSH_3D_Remote_i.cxx
99   GMSHPlugin_GMSH_3D_i.cxx
100   GMSHPlugin_GMSH.cxx
101   GMSHPlugin_GMSH_i.cxx
102   GMSHPlugin_Hypothesis.cxx
103   GMSHPlugin_Hypothesis_i.cxx
104   GMSHPlugin_Hypothesis_2D.cxx
105   GMSHPlugin_Hypothesis_2D_i.cxx
106   GMSHPlugin_Hypothesis_3D.cxx
107   GMSHPlugin_Hypothesis_3D_i.cxx
108   GMSHPlugin_Mesher.cxx
109   GMSHPlugin_i.cxx
110 )
111
112 SET(GmshRunner_SOURCES
113   GMSHPlugin_Runner_main.cxx
114 )
115
116 # --- scripts ---
117
118 # scripts / static
119 SET(_bin_SCRIPTS
120   __init__.py
121   GMSHPluginBuilder.py
122 )
123
124 # --- rules ---
125
126 ADD_LIBRARY(GMSHEngine ${GMSHEngine_SOURCES})
127 TARGET_LINK_LIBRARIES(GMSHEngine ${_link_LIBRARIES} )
128 INSTALL(TARGETS GMSHEngine EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
129
130 ADD_EXECUTABLE(GMSHPlugin_Runner ${GmshRunner_SOURCES})
131 TARGET_LINK_LIBRARIES(GMSHPlugin_Runner ${_link_LIBRARIES} GMSHEngine )
132 INSTALL(TARGETS GMSHPlugin_Runner EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
133
134 INSTALL(FILES ${GMSHEngine_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
135
136 SALOME_INSTALL_SCRIPTS("${_bin_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/GMSHPlugin)