Salome HOME
Issue #2308: 1.1.2.4 Faces in “Union”
[modules/shaper.git] / src / GeomAlgoAPI / CMakeLists.txt
1 ## Copyright (C) 2014-2017  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
18 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
19 ##
20
21 FIND_PACKAGE(SWIG REQUIRED)
22
23 INCLUDE(${SWIG_USE_FILE})
24 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
25
26 SET(PROJECT_HEADERS
27     GeomAlgoAPI.h
28     GeomAlgoAPI_Tools.h
29     GeomAlgoAPI_CompoundBuilder.h
30     GeomAlgoAPI_FaceBuilder.h
31     GeomAlgoAPI_EdgeBuilder.h
32     GeomAlgoAPI_PointBuilder.h
33     GeomAlgoAPI_SketchBuilder.h
34     GeomAlgoAPI_Prism.h
35     GeomAlgoAPI_Revolution.h
36     GeomAlgoAPI_Boolean.h
37     GeomAlgoAPI_Rotation.h
38     GeomAlgoAPI_Translation.h
39     GeomAlgoAPI_MakeShape.h
40     GeomAlgoAPI_MakeShapeCustom.h
41     GeomAlgoAPI_MakeShapeList.h
42     GeomAlgoAPI_MakeSweep.h
43     GeomAlgoAPI_MakeVolume.h
44     GeomAlgoAPI_DFLoader.h
45     GeomAlgoAPI_Placement.h
46     GeomAlgoAPI_BREPImport.h
47     GeomAlgoAPI_STEPImport.h
48     GeomAlgoAPI_IGESImport.h
49     GeomAlgoAPI_BREPExport.h
50     GeomAlgoAPI_STEPExport.h
51     GeomAlgoAPI_IGESExport.h
52     GeomAlgoAPI_Transform.h
53     GeomAlgoAPI_ShapeTools.h
54     GeomAlgoAPI_Partition.h
55     GeomAlgoAPI_PaveFiller.h
56     GeomAlgoAPI_Intersection.h
57     GeomAlgoAPI_Pipe.h
58     GeomAlgoAPI_WireBuilder.h
59     GeomAlgoAPI_Sewing.h
60     GeomAlgoAPI_ShapeBuilder.h
61     GeomAlgoAPI_ShapeAPI.h
62     GeomAlgoAPI_Exception.h
63     GeomAlgoAPI_Box.h
64     GeomAlgoAPI_Cone.h
65     GeomAlgoAPI_Cylinder.h
66     GeomAlgoAPI_Sphere.h
67     GeomAlgoAPI_Torus.h
68     GeomAlgoAPI_XAOExport.h
69     GeomAlgoAPI_XAOImport.h
70     GeomAlgoAPI_Copy.h
71     GeomAlgoAPI_ConeSegment.h
72     GeomAlgoAPI_Ellipsoid.h
73     GeomAlgoAPI_Symmetry.h
74     GeomAlgoAPI_Scale.h
75     GeomAlgoAPI_Circ2dBuilder.h
76     GeomAlgoAPI_UnifySameDomain.h
77 )
78
79 SET(PROJECT_SOURCES
80     GeomAlgoAPI_Tools.cpp
81     GeomAlgoAPI_CompoundBuilder.cpp
82     GeomAlgoAPI_FaceBuilder.cpp
83     GeomAlgoAPI_EdgeBuilder.cpp
84     GeomAlgoAPI_PointBuilder.cpp
85     GeomAlgoAPI_SketchBuilder.cpp
86     GeomAlgoAPI_Prism.cpp
87     GeomAlgoAPI_Revolution.cpp
88     GeomAlgoAPI_Boolean.cpp
89     GeomAlgoAPI_Rotation.cpp
90     GeomAlgoAPI_Translation.cpp
91     GeomAlgoAPI_MakeShape.cpp
92     GeomAlgoAPI_MakeShapeCustom.cpp
93     GeomAlgoAPI_MakeShapeList.cpp
94     GeomAlgoAPI_MakeSweep.cpp
95     GeomAlgoAPI_MakeVolume.cpp
96     GeomAlgoAPI_DFLoader.cpp
97     GeomAlgoAPI_Placement.cpp
98     GeomAlgoAPI_BREPImport.cpp
99     GeomAlgoAPI_STEPImport.cpp
100     GeomAlgoAPI_IGESImport.cpp
101     GeomAlgoAPI_BREPExport.cpp
102     GeomAlgoAPI_STEPExport.cpp
103     GeomAlgoAPI_IGESExport.cpp
104     GeomAlgoAPI_Transform.cpp
105     GeomAlgoAPI_ShapeTools.cpp
106     GeomAlgoAPI_Partition.cpp
107     GeomAlgoAPI_PaveFiller.cpp
108     GeomAlgoAPI_Intersection.cpp
109     GeomAlgoAPI_Pipe.cpp
110     GeomAlgoAPI_WireBuilder.cpp
111     GeomAlgoAPI_Sewing.cpp
112     GeomAlgoAPI_ShapeBuilder.cpp
113     GeomAlgoAPI_ShapeAPI.cpp
114     GeomAlgoAPI_Exception.cpp
115     GeomAlgoAPI_Box.cpp
116     GeomAlgoAPI_Cone.cpp
117     GeomAlgoAPI_Cylinder.cpp
118     GeomAlgoAPI_Sphere.cpp
119     GeomAlgoAPI_Torus.cpp
120     GeomAlgoAPI_XAOExport.cpp
121     GeomAlgoAPI_XAOImport.cpp
122     GeomAlgoAPI_Copy.cpp
123     GeomAlgoAPI_ConeSegment.cpp
124     GeomAlgoAPI_Ellipsoid.cpp
125     GeomAlgoAPI_Symmetry.cpp
126     GeomAlgoAPI_Scale.cpp
127     GeomAlgoAPI_Circ2dBuilder.cpp
128     GeomAlgoAPI_UnifySameDomain.cpp
129 )
130
131 SET(PROJECT_LIBRARIES
132     GeomAPI
133     GeomAlgoImpl
134     ModelAPI
135     XAOShaper
136     ${CAS_OCAF}
137     ${CAS_SHAPE}
138     ${CAS_TKBO}
139     ${CAS_TKBool}
140     ${CAS_TKBRep}
141     ${CAS_TKCAF}
142     ${CAS_TKCAF}
143     ${CAS_TKLCAF}
144     ${CAS_TKPrim}
145     ${CAS_TKSTEP}
146     ${CAS_TKSTEPBase}
147     ${CAS_TKIGES}
148     ${CAS_TKTopAlgo}
149     ${CAS_TKXSBase}
150     ${CAS_TKOffset}
151     ${CAS_TKShHealing}
152 )
153
154 ADD_DEFINITIONS(-DGEOMALGOAPI_EXPORTS ${CAS_DEFINITIONS})
155 ADD_LIBRARY(GeomAlgoAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
156
157 SET(CMAKE_SWIG_FLAGS "-Wall")
158
159 SET_SOURCE_FILES_PROPERTIES(GeomAlgoAPI.i PROPERTIES CPLUSPLUS ON)
160 SET_SOURCE_FILES_PROPERTIES(GeomAlgoAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
161
162 INCLUDE_DIRECTORIES(
163   ../GeomAPI
164   ../GeomAlgoImpl
165   ../ModelAPI
166   ../XAO
167   ${CAS_INCLUDE_DIRS}
168 )
169
170 TARGET_LINK_LIBRARIES(GeomAlgoAPI ${PROJECT_LIBRARIES})
171
172 SET(SWIG_SCRIPTS
173   ${CMAKE_CURRENT_BINARY_DIR}/GeomAlgoAPI.py
174 )
175
176 SET(SWIG_LINK_LIBRARIES
177   GeomAPI
178   GeomAlgoAPI
179   GeomAlgoImpl
180   ${PYTHON_LIBRARIES}
181 )
182
183 SWIG_ADD_MODULE(GeomAlgoAPI python GeomAlgoAPI.i ${PROJECT_HEADERS})
184 SWIG_LINK_LIBRARIES(GeomAlgoAPI ${SWIG_LINK_LIBRARIES})
185
186 IF(WIN32)
187   SET_TARGET_PROPERTIES(_GeomAlgoAPI PROPERTIES DEBUG_OUTPUT_NAME _GeomAlgoAPI_d)
188 ENDIF(WIN32)
189
190 INSTALL(TARGETS _GeomAlgoAPI DESTINATION ${SHAPER_INSTALL_SWIG})
191 INSTALL(TARGETS GeomAlgoAPI DESTINATION ${SHAPER_INSTALL_BIN})
192 INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
193