X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FConfig%2FCMakeLists.txt;h=e5f3d42a71c96283705d0661193ad6da11484928;hb=b5893b0a30fac08134c24de4565cb513a43affa6;hp=8952f175698a41860d1d7dafc09eeaeda13020fc;hpb=fe443ed42df3b33646e053bd8001fd2899624b37;p=modules%2Fshaper.git diff --git a/src/Config/CMakeLists.txt b/src/Config/CMakeLists.txt index 8952f1756..e5f3d42a7 100644 --- a/src/Config/CMakeLists.txt +++ b/src/Config/CMakeLists.txt @@ -2,6 +2,8 @@ INCLUDE(Common) INCLUDE(XMLProcessing) +FIND_PACKAGE(SWIG REQUIRED) +INCLUDE(${SWIG_USE_FILE}) INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/Events ${PYTHON_INCLUDE_DIR}) @@ -21,9 +23,9 @@ SET(PROJECT_HEADERS Config_Prop.h Config_PropManager.h Config_AttributeMessage.h - Config_SelectionFilterMessage.h Config_ValidatorReader.h Config_DataModelReader.h + Config_Translator.h ) SET(PROJECT_SOURCES @@ -39,11 +41,28 @@ SET(PROJECT_SOURCES Config_Prop.cpp Config_PropManager.cpp Config_AttributeMessage.cpp - Config_SelectionFilterMessage.cpp Config_ValidatorReader.cpp Config_DataModelReader.cpp + Config_Translator.cpp ) +SET(CMAKE_SWIG_FLAGS -threads -Wall) +SET_SOURCE_FILES_PROPERTIES(ConfigAPI.i PROPERTIES CPLUSPLUS ON) +SET_SOURCE_FILES_PROPERTIES(ConfigAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow") +SET(SWIG_SCRIPTS + ${CMAKE_CURRENT_BINARY_DIR}/ConfigAPI.py +) +SET(SWIG_LINK_LIBRARIES + Config + ${PYTHON_LIBRARIES} +) +SWIG_ADD_MODULE(ConfigAPI python ConfigAPI.i ${PROJECT_HEADERS}) +SWIG_LINK_LIBRARIES(ConfigAPI ${SWIG_LINK_LIBRARIES}) +IF(WIN32) + SET_TARGET_PROPERTIES(_ConfigAPI PROPERTIES DEBUG_OUTPUT_NAME _ConfigAPI_d) +ENDIF(WIN32) + + SET(XML_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/plugins.xml dataModel.xml @@ -67,7 +86,7 @@ TARGET_LINK_LIBRARIES(Config ${PROJECT_LIBRARIES}) # Prepare plugins.xml # the solver to activate after installation -SET(DEFAULT_SOLVER "SolveSpace") +SET(DEFAULT_SOLVER "PlaneGCS") # the list of all solvers SET(SOLVERS "SolveSpace" "PlaneGCS") @@ -104,3 +123,6 @@ CONFIGURE_FILE( INSTALL(TARGETS Config DESTINATION ${SHAPER_INSTALL_BIN}) INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}) + +INSTALL(TARGETS _ConfigAPI DESTINATION ${SHAPER_INSTALL_SWIG}) +INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})