From c57d39ef59b874e7dae37d5e90c5a960c1bcd562 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Fri, 3 Jan 2014 11:20:14 +0000 Subject: [PATCH] improved generated headers --- CMakeLists.txt | 4 ++++ grib_api_config.h.in | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f6c781004..52b0338a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,8 @@ set( GRIB_API_INSTALL_INCLUDE_DIR include CACHE PATH "GRIB_API override installa include( ecbuild_system ) +ecbuild_requires_macro_version( 1.2 ) + ############################################################################### # local project @@ -175,6 +177,8 @@ endif() ### config header +ecbuild_generate_config_headers() + configure_file( grib_api_config.h.in grib_api_config.h ) add_definitions( -DHAVE_GRIB_API_CONFIG_H ) diff --git a/grib_api_config.h.in b/grib_api_config.h.in index 26086229b..7d88c9122 100644 --- a/grib_api_config.h.in +++ b/grib_api_config.h.in @@ -11,9 +11,11 @@ #ifndef grib_api_config_h #define grib_api_config_h -#include "ecbuild_config.h" +#include "grib_api_ecbuild_config.h" /* generated by ecbuild */ -#define GRIB_API_VERSION_STR "@GRIB_API_VERSION@" +#define GRIB_API_VERSION_STR "@GRIB_API_VERSION_STR@" + +/* GRIB_API_VERSION is defined in grib_api.h from the 3 version components below */ #define GRIB_API_MAJOR_VERSION @GRIB_API_MAJOR_VERSION@ #define GRIB_API_MINOR_VERSION @GRIB_API_MINOR_VERSION@