Salome HOME
Porting to Paraview 5.8
[plugins/gmshplugin.git] / src / GMSHPlugin / CMakeLists.txt
1 # Copyright (C) 2012-2015  ALNEOS
2 # Copyright (C) 2016-2019  EDF R&D
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.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20
21 # --- options ---
22 # additional include directories
23 INCLUDE_DIRECTORIES(
24   ${KERNEL_INCLUDE_DIRS}
25   ${OpenCASCADE_INCLUDE_DIR}
26   ${GEOM_INCLUDE_DIRS}
27   ${SMESH_INCLUDE_DIRS}
28   ${Boost_INCLUDE_DIRS}
29   ${OMNIORB_INCLUDE_DIR}
30   ${GMSH_INCLUDE_DIRS}
31   ${PROJECT_BINARY_DIR}/idl
32 )
33
34 # additional preprocessor / compiler flags
35 ADD_DEFINITIONS(  
36   ${OMNIORB_DEFINITIONS}
37   ${OpenCASCADE_DEFINITIONS}
38   ${BOOST_DEFINITIONS}
39 )
40
41 # libraries to link to
42 SET(_link_LIBRARIES
43   ${OpenCASCADE_FoundationClasses_LIBRARIES}
44   ${OpenCASCADE_ModelingData_LIBRARIES}
45   ${OpenCASCADE_ApplicationFramework_LIBRARIES}
46   ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
47   ${GMSH_LIBRARIES}
48   ${KERNEL_SALOMELocalTrace}
49   ${KERNEL_SALOMEBasics}
50   ${KERNEL_SalomeGenericObj}
51   ${KERNEL_SalomeNS}
52   ${KERNEL_OpUtil}
53   ${SMESH_SMDS}
54   ${SMESH_SMESHDS}
55   ${SMESH_SMESHimpl}
56   ${SMESH_SMESHEngine}
57   ${SMESH_MeshDriverGMF}
58   SalomeIDLGMSHPLUGIN
59 )
60
61 # --- headers ---
62
63 # header files
64 SET(GMSHEngine_HEADERS
65   GMSHPlugin_GMSH_2D.hxx
66   GMSHPlugin_GMSH_2D_i.hxx
67   GMSHPlugin_GMSH.hxx
68   GMSHPlugin_GMSH_i.hxx
69   GMSHPlugin_Hypothesis.hxx
70   GMSHPlugin_Hypothesis_i.hxx
71   GMSHPlugin_Hypothesis_2D.hxx
72   GMSHPlugin_Hypothesis_2D_i.hxx
73   GMSHPlugin_Mesher.hxx
74   GMSHPlugin_Defs.hxx
75 )
76
77 # --- sources ---
78
79 # sources / static
80 SET(GMSHEngine_SOURCES
81   GMSHPlugin_GMSH_2D.cxx
82   GMSHPlugin_GMSH_2D_i.cxx
83   GMSHPlugin_GMSH.cxx
84   GMSHPlugin_GMSH_i.cxx
85   GMSHPlugin_Hypothesis.cxx
86   GMSHPlugin_Hypothesis_i.cxx
87   GMSHPlugin_Hypothesis_2D.cxx
88   GMSHPlugin_Hypothesis_2D_i.cxx
89   GMSHPlugin_Mesher.cxx
90   GMSHPlugin_i.cxx
91 )
92
93 # --- scripts ---
94
95 # scripts / static
96 SET(_bin_SCRIPTS
97   __init__.py
98   GMSHPluginBuilder.py
99 )
100
101 # --- rules ---
102
103 ADD_LIBRARY(GMSHEngine ${GMSHEngine_SOURCES})
104 TARGET_LINK_LIBRARIES(GMSHEngine ${_link_LIBRARIES} )
105 INSTALL(TARGETS GMSHEngine EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
106
107 INSTALL(FILES ${GMSHEngine_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
108
109 SALOME_INSTALL_SCRIPTS("${_bin_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/GMSHPlugin)