]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Cmakization of MED.
authorageay <ageay>
Wed, 21 Mar 2012 17:39:24 +0000 (17:39 +0000)
committerageay <ageay>
Wed, 21 Mar 2012 17:39:24 +0000 (17:39 +0000)
src/MEDCalculator/CMakeLists.txt [new file with mode: 0644]
src/MEDCalculator/Swig/CMakeLists.txt [new file with mode: 0644]
src/MEDCalculator/Test/CMakeLists.txt [new file with mode: 0644]
src/MEDCouplingCorba_Swig/CMakeLists.txt
src/MEDCoupling_Swig/CMakeLists.txt
src/MEDLoader/Swig/CMakeLists.txt
src/MEDLoader/Test/CMakeLists.txt
src/ParaMEDMEM_Swig/CMakeLists.txt

diff --git a/src/MEDCalculator/CMakeLists.txt b/src/MEDCalculator/CMakeLists.txt
new file mode 100644 (file)
index 0000000..3ad6803
--- /dev/null
@@ -0,0 +1,55 @@
+# 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})
diff --git a/src/MEDCalculator/Swig/CMakeLists.txt b/src/MEDCalculator/Swig/CMakeLists.txt
new file mode 100644 (file)
index 0000000..ae7d1ce
--- /dev/null
@@ -0,0 +1,55 @@
+# 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})
diff --git a/src/MEDCalculator/Test/CMakeLists.txt b/src/MEDCalculator/Test/CMakeLists.txt
new file mode 100644 (file)
index 0000000..e83c94d
--- /dev/null
@@ -0,0 +1,44 @@
+# 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})
index effec25c9c887fc0f89d788f45107007b8ba747c..6d8d01cb7aab652575f23aee8913fabc14283f37 100644 (file)
@@ -22,8 +22,6 @@ ADD_SUBDIRECTORY(Client)
 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")
 
index b4d7d9129383aef22db11e95baaae96a4c5198b9..ef54df555ea4aeb97175bf60d045b0a2fd1848a2 100644 (file)
 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
index 5892292f6e6d269d52309bd806d782637a029536..378bf46068a4dbe979058b03ebbfe69c317d9f23 100644 (file)
 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
index 5ad6a38de5f4c56bca99de19960806ba83d90546..fcb585183762d302a30b1bdfda533807104a97b2 100644 (file)
@@ -25,10 +25,7 @@ INCLUDE_DIRECTORIES(
   ${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
index b57fbdda7c361fdd4c4ae72d690fae939e0d0d82..d944b2e7ebd019503bbdce656e70eeed72083231 100644 (file)
@@ -20,8 +20,6 @@
 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")