]> SALOME platform Git repositories - modules/shaper.git/blob - src/GeomAlgoAPI/CMakeLists.txt
Salome HOME
Add Chamfer feature
[modules/shaper.git] / src / GeomAlgoAPI / CMakeLists.txt
1 # Copyright (C) 2014-2019  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_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     GeomAlgoAPI_Fillet.h
78     GeomAlgoAPI_SortListOfShapes.h
79     GeomAlgoAPI_Filling.h
80     GeomAlgoAPI_CurveBuilder.h
81     GeomAlgoAPI_NExplode.h
82     GeomAlgoAPI_Offset.h
83     GeomAlgoAPI_SolidClassifier.h
84     GeomAlgoAPI_MapShapesAndAncestors.h
85     GeomAlgoAPI_Chamfer.h
86 )
87
88 SET(PROJECT_SOURCES
89     GeomAlgoAPI_Tools.cpp
90     GeomAlgoAPI_CompoundBuilder.cpp
91     GeomAlgoAPI_FaceBuilder.cpp
92     GeomAlgoAPI_EdgeBuilder.cpp
93     GeomAlgoAPI_PointBuilder.cpp
94     GeomAlgoAPI_SketchBuilder.cpp
95     GeomAlgoAPI_Prism.cpp
96     GeomAlgoAPI_Revolution.cpp
97     GeomAlgoAPI_Boolean.cpp
98     GeomAlgoAPI_ThroughAll.cpp
99     GeomAlgoAPI_Rotation.cpp
100     GeomAlgoAPI_Translation.cpp
101     GeomAlgoAPI_MakeShape.cpp
102     GeomAlgoAPI_MakeShapeCustom.cpp
103     GeomAlgoAPI_MakeShapeList.cpp
104     GeomAlgoAPI_MakeSweep.cpp
105     GeomAlgoAPI_MakeVolume.cpp
106     GeomAlgoAPI_DFLoader.cpp
107     GeomAlgoAPI_Placement.cpp
108     GeomAlgoAPI_BREPImport.cpp
109     GeomAlgoAPI_STEPImport.cpp
110     GeomAlgoAPI_IGESImport.cpp
111     GeomAlgoAPI_BREPExport.cpp
112     GeomAlgoAPI_STEPExport.cpp
113     GeomAlgoAPI_IGESExport.cpp
114     GeomAlgoAPI_Transform.cpp
115     GeomAlgoAPI_ShapeTools.cpp
116     GeomAlgoAPI_Partition.cpp
117     GeomAlgoAPI_PaveFiller.cpp
118     GeomAlgoAPI_Intersection.cpp
119     GeomAlgoAPI_Pipe.cpp
120     GeomAlgoAPI_WireBuilder.cpp
121     GeomAlgoAPI_Sewing.cpp
122     GeomAlgoAPI_ShapeBuilder.cpp
123     GeomAlgoAPI_ShapeAPI.cpp
124     GeomAlgoAPI_Exception.cpp
125     GeomAlgoAPI_Box.cpp
126     GeomAlgoAPI_Cone.cpp
127     GeomAlgoAPI_Cylinder.cpp
128     GeomAlgoAPI_Sphere.cpp
129     GeomAlgoAPI_Torus.cpp
130     GeomAlgoAPI_XAOExport.cpp
131     GeomAlgoAPI_XAOImport.cpp
132     GeomAlgoAPI_Copy.cpp
133     GeomAlgoAPI_ConeSegment.cpp
134     GeomAlgoAPI_Ellipsoid.cpp
135     GeomAlgoAPI_Symmetry.cpp
136     GeomAlgoAPI_Scale.cpp
137     GeomAlgoAPI_Circ2dBuilder.cpp
138     GeomAlgoAPI_UnifySameDomain.cpp
139     GeomAlgoAPI_Fillet.cpp
140     GeomAlgoAPI_SortListOfShapes.cpp
141     GeomAlgoAPI_Filling.cpp
142     GeomAlgoAPI_CurveBuilder.cpp
143     GeomAlgoAPI_NExplode.cpp
144     GeomAlgoAPI_Offset.cpp
145     GeomAlgoAPI_SolidClassifier.cpp
146     GeomAlgoAPI_MapShapesAndAncestors.cpp
147     GeomAlgoAPI_Projection.cpp
148     GeomAlgoAPI_Chamfer.cpp
149 )
150
151 SET(PROJECT_LIBRARIES
152     GeomAPI
153     GeomAlgoImpl
154     ModelAPI
155     XAOShaper
156     ${OpenCASCADE_DataExchange_LIBRARIES}
157     ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
158     ${OpenCASCADE_ApplicationFramework_LIBRARIES}
159 )
160
161 ADD_DEFINITIONS(-DGEOMALGOAPI_EXPORTS ${OpenCASCADE_DEFINITIONS})
162 ADD_LIBRARY(GeomAlgoAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
163
164 SET(CMAKE_SWIG_FLAGS -w325,321,362,383,302)
165
166 SET_SOURCE_FILES_PROPERTIES(GeomAlgoAPI.i PROPERTIES CPLUSPLUS ON)
167 SET_SOURCE_FILES_PROPERTIES(GeomAlgoAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
168
169 INCLUDE_DIRECTORIES(
170   ../GeomAPI
171   ../GeomAlgoImpl
172   ../ModelAPI
173   ../XAO
174   ${OpenCASCADE_INCLUDE_DIR}
175 )
176
177 TARGET_LINK_LIBRARIES(GeomAlgoAPI ${PROJECT_LIBRARIES})
178
179 SET(SWIG_SCRIPTS
180   ${CMAKE_CURRENT_BINARY_DIR}/GeomAlgoAPI.py
181 )
182
183 SET(SWIG_LINK_LIBRARIES
184   GeomAPI
185   GeomAlgoAPI
186   GeomAlgoImpl
187   ${PYTHON_LIBRARIES}
188 )
189
190 IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
191   SWIG_ADD_LIBRARY(GeomAlgoAPI LANGUAGE python SOURCES GeomAlgoAPI.i ${PROJECT_HEADERS})
192 ELSE()
193   SWIG_ADD_MODULE(GeomAlgoAPI python GeomAlgoAPI.i ${PROJECT_HEADERS})
194 ENDIF()
195 SWIG_LINK_LIBRARIES(GeomAlgoAPI ${SWIG_LINK_LIBRARIES})
196
197 IF(WIN32)
198   SET_TARGET_PROPERTIES(_GeomAlgoAPI PROPERTIES DEBUG_OUTPUT_NAME _GeomAlgoAPI_d)
199 ENDIF(WIN32)
200
201 INSTALL(TARGETS _GeomAlgoAPI DESTINATION ${SHAPER_INSTALL_SWIG})
202 INSTALL(TARGETS GeomAlgoAPI DESTINATION ${SHAPER_INSTALL_BIN})
203 INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
204