+FIND_PACKAGE(SWIG REQUIRED)
+INCLUDE(FindCAS)
+
+INCLUDE(${SWIG_USE_FILE})
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+
+SET(PROJECT_HEADERS
+ GeomAlgoAPI.h
+ GeomAlgoAPI_FaceBuilder.h
+)
+
+SET(PROJECT_SOURCES
+ GeomAlgoAPI_FaceBuilder.cpp
+)
+
+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
+ ${CAS_INCLUDE_DIRS}
+)
+
+TARGET_LINK_LIBRARIES(GeomAlgoAPI ${PROJECT_LIBRARIES} GeomAPI ${CAS_KERNEL} ${CAS_MODELER})
+
+SET(SWIG_SCRIPTS
+ ${CMAKE_CURRENT_BINARY_DIR}/GeomAlgoAPI.py
+)
+
+SET(SWIG_LINK_LIBRARIES
+ 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)