--- /dev/null
+# Copyright (C) 2007-2011 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.
+#
+# 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
+#
+
+ADD_SUBDIRECTORY(Swig)
+ADD_SUBDIRECTORY(Test)
+
+INCLUDE_DIRECTORIES(
+ ${MED3_INCLUDES_DIR}
+ ${HDF5_INCLUDES_DIR}
+ ${OMNIORB_INCLUDES_DIR}
+ ${KERNEL_ROOT_DIR}/include/salome
+ ${CMAKE_CURRENT_BINARY_DIR}/../../idl
+ ${CMAKE_CURRENT_SOURCE_DIR}/../MEDCouplingCorba
+ ${CMAKE_CURRENT_SOURCE_DIR}/../MEDLoader
+ ${CMAKE_CURRENT_SOURCE_DIR}/../MEDCoupling
+ ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL
+ ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/Bases
+ ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/Geometric2D
+ ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/ExprEval
+ ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/GaussPoints
+ )
+
+SET(medcalculator_SOURCES
+ MEDCalculatorBrowserMesh.cxx
+ MEDCalculatorBrowserField.cxx
+ MEDCalculatorBrowserStep.cxx
+ MEDCalculatorBrowserLiteStruct.cxx
+ MEDCalculatorDBRangeSelection.cxx
+ MEDCalculatorDBSliceField.cxx
+ MEDCalculatorDBField.cxx
+)
+
+ADD_LIBRARY(medcalculator SHARED ${medcalculator_SOURCES})
+SET_TARGET_PROPERTIES(medcalculator PROPERTIES COMPILE_FLAGS "${HDF5_FLAGS} ${MED3_FLAGS}")
+TARGET_LINK_LIBRARIES(medcalculator medloader medcouplingcorba ${KERNEL_LDFLAGS} ${SALOMELocalTrace} ${SalomeNS} ${OpUtil})
+INSTALL(TARGETS medcalculator DESTINATION ${MED_salomelib_LIBS})
+
+FILE(GLOB medcalculator_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
+INSTALL(FILES ${medcalculator_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
--- /dev/null
+# Copyright (C) 2007-2011 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.
+#
+# 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
+#
+
+FIND_PACKAGE(SWIG REQUIRED)
+INCLUDE(${SWIG_USE_FILE})
+
+INCLUDE_DIRECTORIES(
+ ${PYTHON_INCLUDE_PATH}
+ ${MED3_INCLUDES_DIR}
+ ${HDF5_INCLUDES_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/..
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../MEDLoader
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../MEDLoader/Swig
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../MEDCoupling_Swig
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../MEDCoupling
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL/Bases
+ )
+
+SET(medcalculatorspython_SOURCES
+ SPythonInterpreter.cxx
+ SPythonParser.cxx
+ )
+
+ADD_LIBRARY(medcalculatorspython SHARED ${medcalculatorspython_SOURCES})
+TARGET_LINK_LIBRARIES(medcalculatorspython interpkernel ${PYTHON_LIBS})
+INSTALL(TARGETS medcalculatorspython DESTINATION ${MED_salomelib_LIBS})
+
+SET_SOURCE_FILES_PROPERTIES(MEDCalculator.i PROPERTIES CPLUSPLUS ON)
+SET_SOURCE_FILES_PROPERTIES(MEDCalculator.i PROPERTIES SWIG_FLAGS "-shadow")
+
+SWIG_ADD_MODULE(MEDCalculator python MEDCalculator.i)
+SWIG_LINK_LIBRARIES(MEDCalculator ${PYTHON_LIBRARIES} medcalculator)
+
+FILE(GLOB medcalculatorspython_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
+INSTALL(FILES ${medcalculatorspython_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
+INSTALL(TARGETS _MEDCalculator DESTINATION ${MED_salomepythondir})
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/MEDCalculator.py DESTINATION ${MED_salomescript_PYTHON})
--- /dev/null
+# Copyright (C) 2007-2011 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.
+#
+# 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
+#
+
+INCLUDE_DIRECTORIES(
+ ${PYTHON_INCLUDE_PATH}
+ ${CPPUNIT_INCLUDES_DIR}
+ ${HDF5_INCLUDES_DIR}
+ ${MED3_INCLUDES_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/..
+ ${CMAKE_CURRENT_SOURCE_DIR}/../Swig
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../MEDCoupling
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../MEDLoader
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL/Bases
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNELTest # For common CppUnitTest.hxx file
+ )
+
+SET(TestMEDCalculator_SOURCES
+ TestMEDCalculator.cxx
+ MEDCalculatorBasicsTest.cxx
+ )
+
+ADD_EXECUTABLE(TestMEDCalculator ${TestMEDCalculator_SOURCES})
+SET_TARGET_PROPERTIES(TestMEDCalculator PROPERTIES COMPILE_FLAGS "${HDF5_FLAGS} ${MED3_FLAGS} ${CPPUNIT_FLAGS}")
+TARGET_LINK_LIBRARIES(TestMEDCalculator medcalculatorspython medcalculator ${CPPUNIT_LIBS})
+#ADD_TEST(TestMEDCalculator TestMEDCalculator)
+
+INSTALL(TARGETS TestMEDCalculator DESTINATION ${MED_salomebin_BINS})
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
-FIND_PACKAGE(PythonLibs)
-
SET_SOURCE_FILES_PROPERTIES(MEDCouplingCorba.i PROPERTIES CPLUSPLUS ON)
SET_SOURCE_FILES_PROPERTIES(MEDCouplingCorba.i PROPERTIES SWIG_FLAGS "-shadow")
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
-FIND_PACKAGE(PythonLibs)
-INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
-
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-
SET_SOURCE_FILES_PROPERTIES(MEDCoupling.i PROPERTIES CPLUSPLUS ON)
SET_SOURCE_FILES_PROPERTIES(MEDCoupling.i PROPERTIES SWIG_FLAGS "-shadow")
INCLUDE_DIRECTORIES(
+ ${PYTHON_INCLUDE_PATH}
+ ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../MEDCoupling
${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL
${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/Bases
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
-FIND_PACKAGE(PythonLibs)
-INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
-
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-
SET_SOURCE_FILES_PROPERTIES(MEDLoader.i PROPERTIES CPLUSPLUS ON)
SET_SOURCE_FILES_PROPERTIES(MEDLoader.i PROPERTIES SWIG_FLAGS "-shadow")
INCLUDE_DIRECTORIES(
+ ${PYTHON_INCLUDE_PATH}
+ ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../../MEDCoupling_Swig
${CMAKE_CURRENT_SOURCE_DIR}/../../MEDCoupling
${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL
${CMAKE_CURRENT_SOURCE_DIR}/../../MEDCoupling
${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL
${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL/Bases
- ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL/Geometric2D
- ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL/ExprEval
- ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL/GaussPoints
- ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNELTest
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNELTest # For common CppUnitTest.hxx file
)
SET(TestMEDLoader_SOURCES
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
-FIND_PACKAGE(PythonLibs)
-
SET_SOURCE_FILES_PROPERTIES(ParaMEDMEM.i PROPERTIES CPLUSPLUS ON)
SET_SOURCE_FILES_PROPERTIES(ParaMEDMEM.i PROPERTIES SWIG_FLAGS "-shadow")