1 ## Copyright (C) 2014-2017 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
18 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
21 FIND_PACKAGE(SWIG REQUIRED)
22 INCLUDE(${SWIG_USE_FILE})
23 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
29 ModelAPI_AttributeBoolean.h
30 ModelAPI_AttributeIntArray.h
31 ModelAPI_AttributeDocRef.h
32 ModelAPI_AttributeDouble.h
33 ModelAPI_AttributeDoubleArray.h
34 ModelAPI_AttributeInteger.h
35 ModelAPI_AttributeRefAttr.h
36 ModelAPI_AttributeReference.h
37 ModelAPI_AttributeRefAttrList.h
38 ModelAPI_AttributeRefList.h
39 ModelAPI_AttributeSelection.h
40 ModelAPI_AttributeSelectionList.h
41 ModelAPI_AttributeString.h
42 ModelAPI_AttributeStringArray.h
43 ModelAPI_AttributeTables.h
44 ModelAPI_AttributeValidator.h
45 ModelAPI_BodyBuilder.h
46 ModelAPI_CompositeFeature.h
49 ModelAPI_EventReentrantMessage.h
53 ModelAPI_FeatureValidator.h
60 ModelAPI_ResultConstruction.h
61 ModelAPI_ResultField.h
62 ModelAPI_ResultGroup.h
63 ModelAPI_ResultParameter.h
72 ModelAPI_Attribute.cpp
73 ModelAPI_AttributeBoolean.cpp
74 ModelAPI_AttributeIntArray.cpp
75 ModelAPI_AttributeDocRef.cpp
76 ModelAPI_AttributeDouble.cpp
77 ModelAPI_AttributeDoubleArray.cpp
78 ModelAPI_AttributeInteger.cpp
79 ModelAPI_AttributeRefAttr.cpp
80 ModelAPI_AttributeReference.cpp
81 ModelAPI_AttributeRefAttrList.cpp
82 ModelAPI_AttributeRefList.cpp
83 ModelAPI_AttributeSelection.cpp
84 ModelAPI_AttributeSelectionList.cpp
85 ModelAPI_AttributeString.cpp
86 ModelAPI_AttributeStringArray.cpp
87 ModelAPI_AttributeTables.cpp
88 ModelAPI_BodyBuilder.cpp
89 ModelAPI_CompositeFeature.cpp
92 ModelAPI_EventReentrantMessage.cpp
94 ModelAPI_Expression.cpp
96 ModelAPI_FeatureValidator.cpp
98 ModelAPI_IReentrant.cpp
102 ModelAPI_ResultBody.cpp
103 ModelAPI_ResultConstruction.cpp
104 ModelAPI_ResultField.cpp
105 ModelAPI_ResultGroup.cpp
106 ModelAPI_ResultPart.cpp
107 ModelAPI_ResultParameter.cpp
110 ModelAPI_AttributeValidator.cpp
113 SET(PROJECT_LIBRARIES
117 SET(CMAKE_SWIG_FLAGS -threads -Wall)
118 ADD_DEFINITIONS(-DMODELAPI_EXPORTS)
120 ADD_LIBRARY(ModelAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
121 SET_TARGET_PROPERTIES(ModelAPI PROPERTIES LINKER_LANGUAGE CXX)
122 TARGET_LINK_LIBRARIES(ModelAPI ${PROJECT_LIBRARIES})
124 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/Config
125 ${PROJECT_SOURCE_DIR}/src/Events
126 ${PROJECT_SOURCE_DIR}/src/GeomAPI
127 ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
131 SET_SOURCE_FILES_PROPERTIES(ModelAPI.i PROPERTIES CPLUSPLUS ON)
132 # "-includeall" is not needed: it starts to follow the standard inludes (like "string") without success
133 # SET_SOURCE_FILES_PROPERTIES(ModelAPI.i PROPERTIES SWIG_FLAGS)
134 SET_SOURCE_FILES_PROPERTIES(ModelAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
135 #SET_SOURCE_FILES_PROPERTIES(ModelAPIPYTHON_wrap.cxx PROPERTIES COMPILE_FLAGS "-D_WIN32")
138 ${CMAKE_CURRENT_BINARY_DIR}/ModelAPI.py
141 SET(SWIG_LINK_LIBRARIES
147 IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
148 SWIG_ADD_LIBRARY(ModelAPI LANGUAGE python SOURCES ModelAPI.i ${PROJECT_HEADERS})
150 SWIG_ADD_MODULE(ModelAPI python ModelAPI.i ${PROJECT_HEADERS})
152 SWIG_LINK_LIBRARIES(ModelAPI ${SWIG_LINK_LIBRARIES})
155 SET_TARGET_PROPERTIES(_ModelAPI PROPERTIES DEBUG_OUTPUT_NAME _ModelAPI_d)
158 INSTALL(TARGETS _ModelAPI DESTINATION ${SHAPER_INSTALL_SWIG})
159 INSTALL(TARGETS ModelAPI DESTINATION ${SHAPER_INSTALL_BIN})
160 INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
162 ADD_UNIT_TESTS(TestConstants.py
175 TestExternalConstruction.py
182 TestCustomName_BooleanCut.py
183 TestCustomName_CommonCompSolid.py
184 TestCustomName_CutCompSolid.py
185 TestCustomName_CutGroup.py
186 TestCustomName_DefaultName.py
187 TestCustomName_ExtrudeFace.py
188 TestCustomName_ExtrusionCut.py
189 TestCustomName_ExtrusionCutFace.py
190 TestCustomName_MultiTranslation.py
191 TestCustomName_Partition.py
192 TestCustomName_Placement.py
193 TestCustomName_Recover.py
194 TestCustomName_Rename.py
195 TestCustomName_RotateGroup.py
196 TestCustomName_Translation.py
200 TestFolder_Stability.py
201 TestFolder_CustomName.py
210 TestFeatureSelection_1.py
211 TestFeatureSelection_2.py
213 TestBlockRecalculation.py
214 TestSelectionScope.py
216 TestWeakNaming2125.py
217 TestWeakNaming2222.py
218 TestWeakNaming2245.py
219 TestWeakNaming2247.py
220 TestWeakNaming2248.py
221 TestWeakNaming2261.py
222 TestWeakNaming2291.py
223 TestWeakNaming2335.py
224 TestWeakNaming2375.py
225 TestWeakNaming2437.py
226 TestWeakNaming2445.py
227 TestWeakNaming2446.py
228 TestWeakNaming2452.py
229 TestWeakNamingSortOrder.py
231 TestGeomNamingPlacement.py
232 TestGeomNamingRevolution.py
233 TestGeomNamingEdgeByFilter.py
234 TestGeomNamingSketchPlane.py
235 TestGeomNamingBoxWithFillet.py
236 TestContainerSelector.py
239 TestSelectionInitialization.py