FIND_PACKAGE(SWIG REQUIRED) INCLUDE(${SWIG_USE_FILE}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) SET(PROJECT_HEADERS GeomAlgoAPI.h GeomAlgoAPI_CompoundBuilder.h GeomAlgoAPI_FaceBuilder.h GeomAlgoAPI_EdgeBuilder.h GeomAlgoAPI_PointBuilder.h GeomAlgoAPI_SketchBuilder.h GeomAlgoAPI_Extrusion.h GeomAlgoAPI_Boolean.h GeomAlgoAPI_MakeShape.h GeomAlgoAPI_DFLoader.h ) SET(PROJECT_SOURCES GeomAlgoAPI_CompoundBuilder.cpp GeomAlgoAPI_FaceBuilder.cpp GeomAlgoAPI_EdgeBuilder.cpp GeomAlgoAPI_PointBuilder.cpp GeomAlgoAPI_SketchBuilder.cpp GeomAlgoAPI_Extrusion.cpp GeomAlgoAPI_Boolean.cpp GeomAlgoAPI_MakeShape.cpp GeomAlgoAPI_DFLoader.cpp ) SET(PROJECT_LIBRARIES GeomAPI ModelAPI ${CAS_TKBool} ${CAS_TKBO} ${CAS_TKPrim} ${CAS_SHAPE} ${CAS_TKTopAlgo} ) ADD_DEFINITIONS(-DGEOMALGOAPI_EXPORTS ${CAS_DEFINITIONS}) ADD_LIBRARY(GeomAlgoAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS}) SET(CMAKE_SWIG_FLAGS "") SET_SOURCE_FILES_PROPERTIES(GeomAlgoAPI.i PROPERTIES CPLUSPLUS ON) SET_SOURCE_FILES_PROPERTIES(GeomAlgoAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow") INCLUDE_DIRECTORIES( ../GeomAPI ../ModelAPI ${CAS_INCLUDE_DIRS} ) TARGET_LINK_LIBRARIES(GeomAlgoAPI ${PROJECT_LIBRARIES}) SET(SWIG_SCRIPTS ${CMAKE_CURRENT_BINARY_DIR}/GeomAlgoAPI.py ) SET(SWIG_LINK_LIBRARIES GeomAPI GeomAlgoAPI ${PYTHON_LIBRARIES} ) SWIG_ADD_MODULE(GeomAlgoAPI python GeomAlgoAPI.i ${PROJECT_HEADERS}) SWIG_LINK_LIBRARIES(GeomAlgoAPI ${SWIG_LINK_LIBRARIES}) IF(WIN32) SET_TARGET_PROPERTIES(_GeomAlgoAPI PROPERTIES DEBUG_OUTPUT_NAME _GeomAlgoAPI_d) ENDIF(WIN32) INSTALL(TARGETS _GeomAlgoAPI DESTINATION swig) INSTALL(TARGETS GeomAlgoAPI DESTINATION bin) INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION swig)