1 # Copyright (C) 2014-2022 CEA/DEN, EDF R&D
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.
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.
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
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 FIND_PACKAGE(SWIG REQUIRED)
22 INCLUDE(${SWIG_USE_FILE})
23 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
28 GeomAlgoAPI_CompoundBuilder.h
29 GeomAlgoAPI_FaceBuilder.h
30 GeomAlgoAPI_EdgeBuilder.h
31 GeomAlgoAPI_PointBuilder.h
32 GeomAlgoAPI_SketchBuilder.h
34 GeomAlgoAPI_Revolution.h
36 GeomAlgoAPI_ThroughAll.h
37 GeomAlgoAPI_Rotation.h
38 GeomAlgoAPI_Translation.h
39 GeomAlgoAPI_MakeShape.h
40 GeomAlgoAPI_MakeShapeCustom.h
41 GeomAlgoAPI_MakeShapeList.h
42 GeomAlgoAPI_MakeShapeSet.h
43 GeomAlgoAPI_MakeSweep.h
44 GeomAlgoAPI_MakeVolume.h
45 GeomAlgoAPI_DFLoader.h
46 GeomAlgoAPI_Placement.h
47 GeomAlgoAPI_BREPImport.h
48 GeomAlgoAPI_STEPImport.h
49 GeomAlgoAPI_STEPImportXCAF.h
50 GeomAlgoAPI_IGESImport.h
51 GeomAlgoAPI_BREPExport.h
52 GeomAlgoAPI_STEPExport.h
53 GeomAlgoAPI_STLExport.h
54 GeomAlgoAPI_STLImport.h
55 GeomAlgoAPI_ImageImport.h
56 GeomAlgoAPI_IGESExport.h
57 GeomAlgoAPI_Transform.h
58 GeomAlgoAPI_ShapeTools.h
59 GeomAlgoAPI_Partition.h
60 GeomAlgoAPI_PaveFiller.h
61 GeomAlgoAPI_Intersection.h
63 GeomAlgoAPI_WireBuilder.h
65 GeomAlgoAPI_ShapeBuilder.h
66 GeomAlgoAPI_ShapeAPI.h
67 GeomAlgoAPI_Exception.h
70 GeomAlgoAPI_Cylinder.h
73 GeomAlgoAPI_XAOExport.h
74 GeomAlgoAPI_XAOImport.h
76 GeomAlgoAPI_ConeSegment.h
77 GeomAlgoAPI_Ellipsoid.h
78 GeomAlgoAPI_Symmetry.h
80 GeomAlgoAPI_Circ2dBuilder.h
81 GeomAlgoAPI_UnifySameDomain.h
83 GeomAlgoAPI_Fillet1D.h
84 GeomAlgoAPI_SortListOfShapes.h
86 GeomAlgoAPI_CurveBuilder.h
87 GeomAlgoAPI_NExplode.h
89 GeomAlgoAPI_SolidClassifier.h
90 GeomAlgoAPI_MapShapesAndAncestors.h
91 GeomAlgoAPI_Projection.h
93 GeomAlgoAPI_Defeaturing.h
94 GeomAlgoAPI_BoundingBox.h
95 GeomAlgoAPI_NormalToFace.h
97 GeomAlgoAPI_ShapeInfo.h
101 GeomAlgoAPI_Tools.cpp
102 GeomAlgoAPI_CompoundBuilder.cpp
103 GeomAlgoAPI_FaceBuilder.cpp
104 GeomAlgoAPI_EdgeBuilder.cpp
105 GeomAlgoAPI_PointBuilder.cpp
106 GeomAlgoAPI_SketchBuilder.cpp
107 GeomAlgoAPI_Prism.cpp
108 GeomAlgoAPI_Revolution.cpp
109 GeomAlgoAPI_Boolean.cpp
110 GeomAlgoAPI_ThroughAll.cpp
111 GeomAlgoAPI_Rotation.cpp
112 GeomAlgoAPI_Translation.cpp
113 GeomAlgoAPI_MakeShape.cpp
114 GeomAlgoAPI_MakeShapeCustom.cpp
115 GeomAlgoAPI_MakeShapeList.cpp
116 GeomAlgoAPI_MakeShapeSet.cpp
117 GeomAlgoAPI_MakeSweep.cpp
118 GeomAlgoAPI_MakeVolume.cpp
119 GeomAlgoAPI_DFLoader.cpp
120 GeomAlgoAPI_Placement.cpp
121 GeomAlgoAPI_BREPImport.cpp
122 GeomAlgoAPI_STEPImport.cpp
123 GeomAlgoAPI_STEPImportXCAF.cpp
124 GeomAlgoAPI_IGESImport.cpp
125 GeomAlgoAPI_BREPExport.cpp
126 GeomAlgoAPI_STEPExport.cpp
127 GeomAlgoAPI_STLExport.cpp
128 GeomAlgoAPI_STLImport.cpp
129 GeomAlgoAPI_ImageImport.cpp
130 GeomAlgoAPI_IGESExport.cpp
131 GeomAlgoAPI_Transform.cpp
132 GeomAlgoAPI_ShapeTools.cpp
133 GeomAlgoAPI_Partition.cpp
134 GeomAlgoAPI_PaveFiller.cpp
135 GeomAlgoAPI_Intersection.cpp
137 GeomAlgoAPI_WireBuilder.cpp
138 GeomAlgoAPI_Sewing.cpp
139 GeomAlgoAPI_ShapeBuilder.cpp
140 GeomAlgoAPI_ShapeAPI.cpp
141 GeomAlgoAPI_Exception.cpp
144 GeomAlgoAPI_Cylinder.cpp
145 GeomAlgoAPI_Sphere.cpp
146 GeomAlgoAPI_Torus.cpp
147 GeomAlgoAPI_XAOExport.cpp
148 GeomAlgoAPI_XAOImport.cpp
150 GeomAlgoAPI_ConeSegment.cpp
151 GeomAlgoAPI_Ellipsoid.cpp
152 GeomAlgoAPI_Symmetry.cpp
153 GeomAlgoAPI_Scale.cpp
154 GeomAlgoAPI_Circ2dBuilder.cpp
155 GeomAlgoAPI_UnifySameDomain.cpp
156 GeomAlgoAPI_Fillet.cpp
157 GeomAlgoAPI_Fillet1D.cpp
158 GeomAlgoAPI_SortListOfShapes.cpp
159 GeomAlgoAPI_Filling.cpp
160 GeomAlgoAPI_CurveBuilder.cpp
161 GeomAlgoAPI_NExplode.cpp
162 GeomAlgoAPI_Offset.cpp
163 GeomAlgoAPI_SolidClassifier.cpp
164 GeomAlgoAPI_MapShapesAndAncestors.cpp
165 GeomAlgoAPI_Projection.cpp
166 GeomAlgoAPI_Chamfer.cpp
167 GeomAlgoAPI_Defeaturing.cpp
168 GeomAlgoAPI_BoundingBox.cpp
169 GeomAlgoAPI_NormalToFace.cpp
171 GeomAlgoAPI_ShapeInfo.cpp
174 SET(PROJECT_LIBRARIES
179 ${OpenCASCADE_DataExchange_LIBRARIES}
180 ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
181 ${OpenCASCADE_ApplicationFramework_LIBRARIES}
184 ADD_DEFINITIONS(-DGEOMALGOAPI_EXPORTS ${OpenCASCADE_DEFINITIONS})
185 ADD_LIBRARY(GeomAlgoAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
187 SET(CMAKE_SWIG_FLAGS -w325,321,362,383,302)
189 SET_SOURCE_FILES_PROPERTIES(GeomAlgoAPI.i PROPERTIES CPLUSPLUS ON)
190 SET_SOURCE_FILES_PROPERTIES(GeomAlgoAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
192 # additional include directories
198 ${PROJECT_SOURCE_DIR}/src/Locale
199 ${OpenCASCADE_INCLUDE_DIR}
202 TARGET_LINK_LIBRARIES(GeomAlgoAPI ${PROJECT_LIBRARIES})
205 ${CMAKE_CURRENT_BINARY_DIR}/GeomAlgoAPI.py
208 SET(SWIG_LINK_LIBRARIES
215 IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
216 SWIG_ADD_LIBRARY(GeomAlgoAPI LANGUAGE python SOURCES GeomAlgoAPI.i ${PROJECT_HEADERS})
218 SWIG_ADD_MODULE(GeomAlgoAPI python GeomAlgoAPI.i ${PROJECT_HEADERS})
220 SWIG_LINK_LIBRARIES(GeomAlgoAPI ${SWIG_LINK_LIBRARIES})
223 SET_TARGET_PROPERTIES(_GeomAlgoAPI PROPERTIES DEBUG_OUTPUT_NAME _GeomAlgoAPI_d)
226 INSTALL(TARGETS _GeomAlgoAPI DESTINATION ${SHAPER_INSTALL_SWIG})
227 INSTALL(TARGETS GeomAlgoAPI DESTINATION ${SHAPER_INSTALL_BIN})
228 INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})