Salome HOME
bos #26449: SHAPER: save imported images
[modules/shaper.git] / src / GeomAlgoAPI / CMakeLists.txt
1 # Copyright (C) 2014-2021  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 email : webmaster.salome@opencascade.com
18 #
19
20 FIND_PACKAGE(SWIG REQUIRED)
21
22 INCLUDE(${SWIG_USE_FILE})
23 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
24
25 SET(PROJECT_HEADERS
26     GeomAlgoAPI.h
27     GeomAlgoAPI_Tools.h
28     GeomAlgoAPI_CompoundBuilder.h
29     GeomAlgoAPI_FaceBuilder.h
30     GeomAlgoAPI_EdgeBuilder.h
31     GeomAlgoAPI_PointBuilder.h
32     GeomAlgoAPI_SketchBuilder.h
33     GeomAlgoAPI_Prism.h
34     GeomAlgoAPI_Revolution.h
35     GeomAlgoAPI_Boolean.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_MakeSweep.h
43     GeomAlgoAPI_MakeVolume.h
44     GeomAlgoAPI_DFLoader.h
45     GeomAlgoAPI_Placement.h
46     GeomAlgoAPI_BREPImport.h
47     GeomAlgoAPI_STEPImport.h
48     GeomAlgoAPI_STEPImportXCAF.h
49     GeomAlgoAPI_IGESImport.h
50     GeomAlgoAPI_BREPExport.h
51     GeomAlgoAPI_STEPExport.h
52     GeomAlgoAPI_STLExport.h
53     GeomAlgoAPI_STLImport.h
54     GeomAlgoAPI_ImageImport.h
55     GeomAlgoAPI_IGESExport.h
56     GeomAlgoAPI_Transform.h
57     GeomAlgoAPI_ShapeTools.h
58     GeomAlgoAPI_Partition.h
59     GeomAlgoAPI_PaveFiller.h
60     GeomAlgoAPI_Intersection.h
61     GeomAlgoAPI_Pipe.h
62     GeomAlgoAPI_WireBuilder.h
63     GeomAlgoAPI_Sewing.h
64     GeomAlgoAPI_ShapeBuilder.h
65     GeomAlgoAPI_ShapeAPI.h
66     GeomAlgoAPI_Exception.h
67     GeomAlgoAPI_Box.h
68     GeomAlgoAPI_Cone.h
69     GeomAlgoAPI_Cylinder.h
70     GeomAlgoAPI_Sphere.h
71     GeomAlgoAPI_Torus.h
72     GeomAlgoAPI_XAOExport.h
73     GeomAlgoAPI_XAOImport.h
74     GeomAlgoAPI_Copy.h
75     GeomAlgoAPI_ConeSegment.h
76     GeomAlgoAPI_Ellipsoid.h
77     GeomAlgoAPI_Symmetry.h
78     GeomAlgoAPI_Scale.h
79     GeomAlgoAPI_Circ2dBuilder.h
80     GeomAlgoAPI_UnifySameDomain.h
81     GeomAlgoAPI_Fillet.h
82     GeomAlgoAPI_Fillet1D.h
83     GeomAlgoAPI_SortListOfShapes.h
84     GeomAlgoAPI_Filling.h
85     GeomAlgoAPI_CurveBuilder.h
86     GeomAlgoAPI_NExplode.h
87     GeomAlgoAPI_Offset.h
88     GeomAlgoAPI_SolidClassifier.h
89     GeomAlgoAPI_MapShapesAndAncestors.h
90     GeomAlgoAPI_Projection.h
91     GeomAlgoAPI_Chamfer.h
92     GeomAlgoAPI_Defeaturing.h
93     GeomAlgoAPI_BoundingBox.h
94     GeomAlgoAPI_NormalToFace.h
95 )
96
97 SET(PROJECT_SOURCES
98     GeomAlgoAPI_Tools.cpp
99     GeomAlgoAPI_CompoundBuilder.cpp
100     GeomAlgoAPI_FaceBuilder.cpp
101     GeomAlgoAPI_EdgeBuilder.cpp
102     GeomAlgoAPI_PointBuilder.cpp
103     GeomAlgoAPI_SketchBuilder.cpp
104     GeomAlgoAPI_Prism.cpp
105     GeomAlgoAPI_Revolution.cpp
106     GeomAlgoAPI_Boolean.cpp
107     GeomAlgoAPI_ThroughAll.cpp
108     GeomAlgoAPI_Rotation.cpp
109     GeomAlgoAPI_Translation.cpp
110     GeomAlgoAPI_MakeShape.cpp
111     GeomAlgoAPI_MakeShapeCustom.cpp
112     GeomAlgoAPI_MakeShapeList.cpp
113     GeomAlgoAPI_MakeSweep.cpp
114     GeomAlgoAPI_MakeVolume.cpp
115     GeomAlgoAPI_DFLoader.cpp
116     GeomAlgoAPI_Placement.cpp
117     GeomAlgoAPI_BREPImport.cpp
118     GeomAlgoAPI_STEPImport.cpp
119     GeomAlgoAPI_STEPImportXCAF.cpp
120     GeomAlgoAPI_IGESImport.cpp
121     GeomAlgoAPI_BREPExport.cpp
122     GeomAlgoAPI_STEPExport.cpp
123     GeomAlgoAPI_STLExport.cpp
124     GeomAlgoAPI_STLImport.cpp
125     GeomAlgoAPI_ImageImport.cpp
126     GeomAlgoAPI_IGESExport.cpp
127     GeomAlgoAPI_Transform.cpp
128     GeomAlgoAPI_ShapeTools.cpp
129     GeomAlgoAPI_Partition.cpp
130     GeomAlgoAPI_PaveFiller.cpp
131     GeomAlgoAPI_Intersection.cpp
132     GeomAlgoAPI_Pipe.cpp
133     GeomAlgoAPI_WireBuilder.cpp
134     GeomAlgoAPI_Sewing.cpp
135     GeomAlgoAPI_ShapeBuilder.cpp
136     GeomAlgoAPI_ShapeAPI.cpp
137     GeomAlgoAPI_Exception.cpp
138     GeomAlgoAPI_Box.cpp
139     GeomAlgoAPI_Cone.cpp
140     GeomAlgoAPI_Cylinder.cpp
141     GeomAlgoAPI_Sphere.cpp
142     GeomAlgoAPI_Torus.cpp
143     GeomAlgoAPI_XAOExport.cpp
144     GeomAlgoAPI_XAOImport.cpp
145     GeomAlgoAPI_Copy.cpp
146     GeomAlgoAPI_ConeSegment.cpp
147     GeomAlgoAPI_Ellipsoid.cpp
148     GeomAlgoAPI_Symmetry.cpp
149     GeomAlgoAPI_Scale.cpp
150     GeomAlgoAPI_Circ2dBuilder.cpp
151     GeomAlgoAPI_UnifySameDomain.cpp
152     GeomAlgoAPI_Fillet.cpp
153     GeomAlgoAPI_Fillet1D.cpp
154     GeomAlgoAPI_SortListOfShapes.cpp
155     GeomAlgoAPI_Filling.cpp
156     GeomAlgoAPI_CurveBuilder.cpp
157     GeomAlgoAPI_NExplode.cpp
158     GeomAlgoAPI_Offset.cpp
159     GeomAlgoAPI_SolidClassifier.cpp
160     GeomAlgoAPI_MapShapesAndAncestors.cpp
161     GeomAlgoAPI_Projection.cpp
162     GeomAlgoAPI_Chamfer.cpp
163     GeomAlgoAPI_Defeaturing.cpp
164     GeomAlgoAPI_BoundingBox.cpp
165     GeomAlgoAPI_NormalToFace.cpp
166 )
167
168 SET(PROJECT_LIBRARIES
169     GeomAPI
170     GeomAlgoImpl
171     ModelAPI
172     XAOShaper
173     ${OpenCASCADE_DataExchange_LIBRARIES}
174     ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
175     ${OpenCASCADE_ApplicationFramework_LIBRARIES}
176 )
177
178 ADD_DEFINITIONS(-DGEOMALGOAPI_EXPORTS ${OpenCASCADE_DEFINITIONS})
179 ADD_LIBRARY(GeomAlgoAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
180
181 SET(CMAKE_SWIG_FLAGS -w325,321,362,383,302)
182
183 SET_SOURCE_FILES_PROPERTIES(GeomAlgoAPI.i PROPERTIES CPLUSPLUS ON)
184 SET_SOURCE_FILES_PROPERTIES(GeomAlgoAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
185
186 # additional include directories
187 INCLUDE_DIRECTORIES(
188   ../GeomAPI
189   ../GeomAlgoImpl
190   ../ModelAPI
191   ../XAO
192   ${PROJECT_SOURCE_DIR}/src/Locale
193   ${OpenCASCADE_INCLUDE_DIR}
194 )
195
196 TARGET_LINK_LIBRARIES(GeomAlgoAPI ${PROJECT_LIBRARIES})
197
198 SET(SWIG_SCRIPTS
199   ${CMAKE_CURRENT_BINARY_DIR}/GeomAlgoAPI.py
200 )
201
202 SET(SWIG_LINK_LIBRARIES
203   GeomAPI
204   GeomAlgoAPI
205   GeomAlgoImpl
206   ${PYTHON_LIBRARIES}
207 )
208
209 IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
210   SWIG_ADD_LIBRARY(GeomAlgoAPI LANGUAGE python SOURCES GeomAlgoAPI.i ${PROJECT_HEADERS})
211 ELSE()
212   SWIG_ADD_MODULE(GeomAlgoAPI python GeomAlgoAPI.i ${PROJECT_HEADERS})
213 ENDIF()
214 SWIG_LINK_LIBRARIES(GeomAlgoAPI ${SWIG_LINK_LIBRARIES})
215
216 IF(WIN32)
217   SET_TARGET_PROPERTIES(_GeomAlgoAPI PROPERTIES DEBUG_OUTPUT_NAME _GeomAlgoAPI_d)
218 ENDIF(WIN32)
219
220 INSTALL(TARGETS _GeomAlgoAPI DESTINATION ${SHAPER_INSTALL_SWIG})
221 INSTALL(TARGETS GeomAlgoAPI DESTINATION ${SHAPER_INSTALL_BIN})
222 INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
223