1 ## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 FIND_PACKAGE(SWIG REQUIRED)
4 INCLUDE(${SWIG_USE_FILE})
5 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
11 ModelAPI_AttributeBoolean.h
12 ModelAPI_AttributeIntArray.h
13 ModelAPI_AttributeDocRef.h
14 ModelAPI_AttributeDouble.h
15 ModelAPI_AttributeDoubleArray.h
16 ModelAPI_AttributeInteger.h
17 ModelAPI_AttributeRefAttr.h
18 ModelAPI_AttributeReference.h
19 ModelAPI_AttributeRefAttrList.h
20 ModelAPI_AttributeRefList.h
21 ModelAPI_AttributeSelection.h
22 ModelAPI_AttributeSelectionList.h
23 ModelAPI_AttributeString.h
24 ModelAPI_AttributeStringArray.h
25 ModelAPI_AttributeTables.h
26 ModelAPI_AttributeValidator.h
27 ModelAPI_BodyBuilder.h
28 ModelAPI_CompositeFeature.h
31 ModelAPI_EventReentrantMessage.h
35 ModelAPI_FeatureValidator.h
41 ModelAPI_ResultCompSolid.h
42 ModelAPI_ResultConstruction.h
43 ModelAPI_ResultField.h
44 ModelAPI_ResultGroup.h
45 ModelAPI_ResultParameter.h
54 ModelAPI_Attribute.cpp
55 ModelAPI_AttributeBoolean.cpp
56 ModelAPI_AttributeIntArray.cpp
57 ModelAPI_AttributeDocRef.cpp
58 ModelAPI_AttributeDouble.cpp
59 ModelAPI_AttributeDoubleArray.cpp
60 ModelAPI_AttributeInteger.cpp
61 ModelAPI_AttributeRefAttr.cpp
62 ModelAPI_AttributeReference.cpp
63 ModelAPI_AttributeRefAttrList.cpp
64 ModelAPI_AttributeRefList.cpp
65 ModelAPI_AttributeSelection.cpp
66 ModelAPI_AttributeSelectionList.cpp
67 ModelAPI_AttributeString.cpp
68 ModelAPI_AttributeStringArray.cpp
69 ModelAPI_AttributeTables.cpp
70 ModelAPI_BodyBuilder.cpp
71 ModelAPI_CompositeFeature.cpp
74 ModelAPI_EventReentrantMessage.cpp
76 ModelAPI_Expression.cpp
78 ModelAPI_FeatureValidator.cpp
79 ModelAPI_IReentrant.cpp
83 ModelAPI_ResultBody.cpp
84 ModelAPI_ResultCompSolid.cpp
85 ModelAPI_ResultConstruction.cpp
86 ModelAPI_ResultField.cpp
87 ModelAPI_ResultGroup.cpp
88 ModelAPI_ResultPart.cpp
89 ModelAPI_ResultParameter.cpp
92 ModelAPI_AttributeValidator.cpp
98 SET(CMAKE_SWIG_FLAGS -threads -Wall)
99 ADD_DEFINITIONS(-DMODELAPI_EXPORTS)
101 ADD_LIBRARY(ModelAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
102 SET_TARGET_PROPERTIES(ModelAPI PROPERTIES LINKER_LANGUAGE CXX)
103 TARGET_LINK_LIBRARIES(ModelAPI ${PROJECT_LIBRARIES})
105 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/Config
106 ${PROJECT_SOURCE_DIR}/src/Events
107 ${PROJECT_SOURCE_DIR}/src/GeomAPI
108 ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
112 SET_SOURCE_FILES_PROPERTIES(ModelAPI.i PROPERTIES CPLUSPLUS ON)
113 # "-includeall" is not needed: it starts to follow the standard inludes (like "string") without success
114 # SET_SOURCE_FILES_PROPERTIES(ModelAPI.i PROPERTIES SWIG_FLAGS)
115 SET_SOURCE_FILES_PROPERTIES(ModelAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
116 #SET_SOURCE_FILES_PROPERTIES(ModelAPIPYTHON_wrap.cxx PROPERTIES COMPILE_FLAGS "-D_WIN32")
119 ${CMAKE_CURRENT_BINARY_DIR}/ModelAPI.py
122 SET(SWIG_LINK_LIBRARIES
128 SWIG_ADD_MODULE(ModelAPI python ModelAPI.i ${PROJECT_HEADERS})
129 SWIG_LINK_LIBRARIES(ModelAPI ${SWIG_LINK_LIBRARIES})
132 SET_TARGET_PROPERTIES(_ModelAPI PROPERTIES DEBUG_OUTPUT_NAME _ModelAPI_d)
135 INSTALL(TARGETS _ModelAPI DESTINATION ${SHAPER_INSTALL_SWIG})
136 INSTALL(TARGETS ModelAPI DESTINATION ${SHAPER_INSTALL_BIN})
137 INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
139 ADD_UNIT_TESTS(TestConstants.py
150 TestExternalConstruction.py