improved generated headers

This commit is contained in:
Shahram Najm 2014-01-03 11:20:14 +00:00
parent 893d830ddc
commit c57d39ef59
2 changed files with 8 additions and 2 deletions

View File

@ -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 )

View File

@ -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@