Salome HOME
Fix due to the coding standards.
[modules/shaper.git] / src / Config / CMakeLists.txt
index 9d82189428ba94308282c6bc36af3658ae0d24ed..e120e21b8a9fb69a62d309835331b1408dc0f4aa 100644 (file)
@@ -1,7 +1,27 @@
-## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+## Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+##
+## This library is free software; you can redistribute it and/or
+## modify it under the terms of the GNU Lesser General Public
+## License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+##
+## This library is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public
+## License along with this library; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+## See http:##www.salome-platform.org/ or
+## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+##
 
 INCLUDE(Common)
 INCLUDE(XMLProcessing)
+FIND_PACKAGE(SWIG REQUIRED)
+INCLUDE(${SWIG_USE_FILE})
 
 INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/Events
                      ${PYTHON_INCLUDE_DIR})
@@ -9,6 +29,7 @@ INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/Events
 SET(PROJECT_HEADERS
   Config_def.h
   Config_FeatureMessage.h
+  Config_PluginMessage.h
   Config_XMLReader.h
   Config_ModuleReader.h
   Config_FeatureReader.h
@@ -21,7 +42,6 @@ SET(PROJECT_HEADERS
   Config_Prop.h
   Config_PropManager.h
   Config_AttributeMessage.h
-  Config_SelectionFilterMessage.h
   Config_ValidatorReader.h
   Config_DataModelReader.h
   Config_Translator.h
@@ -29,6 +49,7 @@ SET(PROJECT_HEADERS
 
 SET(PROJECT_SOURCES
   Config_FeatureMessage.cpp
+  Config_PluginMessage.cpp
   Config_XMLReader.cpp
   Config_ModuleReader.cpp
   Config_FeatureReader.cpp
@@ -40,12 +61,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
@@ -69,7 +106,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")
@@ -106,3 +143,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})