From ace2f658bb4d09df060c48700c970bd14e8f2a48 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernard=20S=C3=A9cher=C3=83?= Date: Fri, 16 Oct 2020 14:24:10 +0200 Subject: [PATCH] get MEDCoupling config for 64 bits --- CMakeLists.txt | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d5ab9ce..84dd80c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -300,9 +300,15 @@ if( MEDCOUPLING_ROOT_DIR OR DEFINED ENV{MEDCOUPLING_ROOT_DIR}) set(MEDCoupling_VERSION 9.6.0)#We force the version to 9.6 until we solve the problem of find_package(MEDCoupling) add_library(medloader SHARED IMPORTED ) set_property(TARGET medloader PROPERTY IMPORTED_LOCATION ${MEDCOUPLING_ROOT_DIR}/lib/libmedloader.so) - -# set(MEDCoupling_DIR ${MEDCOUPLING_ROOT_DIR}/cmake_files) -# find_package(MEDCoupling CONFIG REQUIRED ) # CONFIG is important ! + add_library(interpkernel SHARED IMPORTED ) + set_property(TARGET interpkernel PROPERTY IMPORTED_LOCATION ${MEDCOUPLING_ROOT_DIR}/lib/libinterpkernel.so) + add_library(medcouplingremapper SHARED IMPORTED ) + set_property(TARGET medcouplingremapper PROPERTY IMPORTED_LOCATION ${MEDCOUPLING_ROOT_DIR}/lib/libmedcouplingremapper.so) + add_library(medcouplingcpp SHARED IMPORTED ) + set_property(TARGET medcouplingcpp PROPERTY IMPORTED_LOCATION ${MEDCOUPLING_ROOT_DIR}/lib/libmedcouplingcpp.so) + + set(MEDCoupling_DIR ${MEDCOUPLING_ROOT_DIR}/cmake_files) + find_package(MEDCoupling CONFIG REQUIRED) # CONFIG is important ! message( STATUS "MEDCoupling found. Version is ${MEDCoupling_VERSION}") else( MEDCOUPLING_ROOT_DIR OR DEFINED ENV{MEDCOUPLING_ROOT_DIR}) @@ -363,6 +369,10 @@ endif(TARGET MED AND TARGET MEDCoupling) if (TARGET PETSc AND TARGET MEDCoupling) ExternalProject_Add_StepDependencies( MEDCoupling build PETSc )#PETSc doit être compilé avant MEDCoupling (car il contient hdf5) endif(TARGET PETSc AND TARGET MEDCoupling) + +IF(MEDCOUPLING_USE_64BIT_IDS) + SET(CMAKE_SWIG_FLAGS ${CMAKE_SWIG_FLAGS} -DMEDCOUPLING_USE_64BIT_IDS) +ENDIF(MEDCOUPLING_USE_64BIT_IDS) #################### # Final operations # -- 2.39.2