FIND_PACKAGE(SWIG REQUIRED) INCLUDE(${SWIG_USE_FILE}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) INCLUDE(UnitTest) SET(PROJECT_HEADERS GeomDataAPI.h GeomDataAPI_Point.h GeomDataAPI_Dir.h GeomDataAPI_Point2D.h ) SET(CMAKE_SWIG_FLAGS "") SET_SOURCE_FILES_PROPERTIES(GeomDataAPI.i PROPERTIES CPLUSPLUS ON) SET_SOURCE_FILES_PROPERTIES(GeomDataAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow") INCLUDE_DIRECTORIES( ../ModelAPI ) SET(SWIG_SCRIPTS ${CMAKE_CURRENT_BINARY_DIR}/GeomDataAPI.py ) SET(SWIG_LINK_LIBRARIES ModelAPI ${PYTHON_LIBRARIES} ) SWIG_ADD_MODULE(GeomDataAPI python GeomDataAPI.i ${PROJECT_HEADERS}) SWIG_LINK_LIBRARIES(GeomDataAPI ${SWIG_LINK_LIBRARIES}) IF(WIN32) SET_TARGET_PROPERTIES(_GeomDataAPI PROPERTIES DEBUG_OUTPUT_NAME _GeomDataAPI_d) ENDIF(WIN32) INSTALL(TARGETS _GeomDataAPI DESTINATION swig) INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION swig) ADD_UNIT_TESTS(TestConstants.py)