From 455e39da4613bee7927fcc11525c81cbba83ea89 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Wed, 19 Aug 2020 16:08:07 +0100 Subject: [PATCH] Support for ecbuild v3.4. Fix AEC, maths library and Python/Numpy --- CMakeLists.txt | 5 ++--- src/CMakeLists.txt | 5 ++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ae3b37df4..5180c9802 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,12 +125,11 @@ ecbuild_add_option( FEATURE AEC ecbuild_find_python( VERSION 2.6 NO_LIBS ) find_package( NumPy ) -message(STATUS "..............Python_FOUND=${PYTHON_FOUND} and NumPy_FOUND=${NUMPY_FOUND}") ecbuild_add_option( FEATURE PYTHON DESCRIPTION "Build the ecCodes Python2 interface (deprecated)" DEFAULT OFF - #REQUIRED_PACKAGES "Python VERSION 2.6 NO_LIBS" NumPy - CONDITION Python_FOUND AND NumPy_FOUND + #CONDITION Python_FOUND AND NumPy_FOUND + CONDITION PYTHON_FOUND AND NUMPY_FOUND ) # For Python2 we build our own bindings (using SWIG) in the build directory # but for Python3 one has to add the eccodes from pip3 AFTER the install diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 431ed3945..7a973ced6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -440,7 +440,10 @@ ecbuild_add_library( TARGET eccodes # griby.c gribl.c ${grib_api_srcs} GENERATED grib_api_version.c - PRIVATE_LIBS ${ECCODES_EXTRA_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${CMATH_LIBRARIES} + #PRIVATE_LIBS ${ECCODES_EXTRA_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${CMATH_LIBRARIES} + PRIVATE_INCLUDES "${AEC_INCLUDE_DIRS}" + PRIVATE_LIBS ${ECCODES_EXTRA_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${AEC_LIBRARIES} + PUBLIC_LIBS ${CMATH_LIBRARIES} TEMPLATES ${grib_api_extra_srcs} INSTALL_HEADERS_LIST grib_api.h