From 2e1d5a33ce2f076b78c429e5308a3aaa35ac3b07 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Thu, 29 Jan 2015 13:07:39 +0000 Subject: [PATCH] Added pkgconfig --- CMakeLists.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index b351adddc..aaefc9b1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -266,6 +266,25 @@ if( NOT PROJECT_NAME STREQUAL CMAKE_PROJECT_NAME ) set( ECCODES_INSTALL_ECMWF_TOOLS ${ECCODES_INSTALL_ECMWF_TOOLS} PARENT_SCOPE ) endif() +# pkg-config +ecbuild_pkgconfig( + NAME eccodes + URL "https://software.ecmwf.int/wiki/display/ECC" + DESCRIPTION "The ecCodes library" + IGNORE_LIBRARIES grib_api_f90 grib_api_f77 + IGNORE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/fortran ${CMAKE_CURRENT_BINARY_DIR}/fortran ${NETCDF_INCLUDE_DIRS} + VARIABLES HAVE_JPG HAVE_LIBJASPER GRIB_PTHREADS HAVE_NETCDF HAVE_PYTHON HAVE_FORTRAN HAVE_PNG HAVE_AEC +) +if( EC_HAVE_FORTRAN ) + ecbuild_pkgconfig( + NAME eccodes_f90 + URL "https://software.ecmwf.int/wiki/display/ECC" + IGNORE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/fortran ${CMAKE_CURRENT_BINARY_DIR}/fortran ${NETCDF_INCLUDE_DIRS} + DESCRIPTION "The ecCodes library for Fortran 90" + VARIABLES HAVE_JPG HAVE_LIBJASPER GRIB_PTHREADS HAVE_NETCDF HAVE_PYTHON HAVE_PNG HAVE_AEC + ) +endif() + ############################################################################################ # finalize