mirror of https://github.com/ecmwf/eccodes.git
Support for ecbuild v3.4. Version macros and PRIVATE_LIB
This commit is contained in:
parent
5720903cb0
commit
ad93825ffe
|
@ -99,11 +99,10 @@ ecbuild_add_option( FEATURE JPG_LIBOPENJPEG
|
||||||
CONDITION ENABLE_JPG
|
CONDITION ENABLE_JPG
|
||||||
DEFAULT ON )
|
DEFAULT ON )
|
||||||
|
|
||||||
find_package( PNG )
|
|
||||||
ecbuild_add_option( FEATURE PNG
|
ecbuild_add_option( FEATURE PNG
|
||||||
DESCRIPTION "Support for PNG decoding/encoding"
|
DESCRIPTION "Support for PNG decoding/encoding"
|
||||||
DEFAULT OFF
|
DEFAULT OFF
|
||||||
CONDITION PNG_FOUND )
|
REQUIRED_PACKAGES PNG )
|
||||||
|
|
||||||
if( HAVE_PNG )
|
if( HAVE_PNG )
|
||||||
set( HAVE_LIBPNG 1 ) # compatibility with autotools
|
set( HAVE_LIBPNG 1 ) # compatibility with autotools
|
||||||
|
@ -112,20 +111,18 @@ else()
|
||||||
set( HAVE_LIBPNG 0 )
|
set( HAVE_LIBPNG 0 )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package( NetCDF )
|
|
||||||
ecbuild_add_option( FEATURE NETCDF
|
ecbuild_add_option( FEATURE NETCDF
|
||||||
DESCRIPTION "Support for GRIB to NetCDF conversion"
|
DESCRIPTION "Support for GRIB to NetCDF conversion"
|
||||||
DEFAULT ON
|
DEFAULT ON
|
||||||
CONDITION NetCDF_FOUND
|
REQUIRED_PACKAGES NetCDF
|
||||||
NO_TPL )
|
NO_TPL )
|
||||||
|
|
||||||
find_package( AEC QUIET )
|
find_package( AEC )
|
||||||
ecbuild_add_option( FEATURE AEC
|
ecbuild_add_option( FEATURE AEC
|
||||||
DESCRIPTION "Support for Adaptive Entropy Coding"
|
DESCRIPTION "Support for Adaptive Entropy Coding"
|
||||||
DEFAULT OFF
|
DEFAULT OFF
|
||||||
CONDITION AEC_FOUND )
|
CONDITION AEC_FOUND )
|
||||||
|
|
||||||
#find_package( Python 2.6 NO_LIBS )
|
|
||||||
ecbuild_find_python( VERSION 2.6 NO_LIBS )
|
ecbuild_find_python( VERSION 2.6 NO_LIBS )
|
||||||
find_package( NumPy )
|
find_package( NumPy )
|
||||||
message(STATUS "..............Python_FOUND=${PYTHON_FOUND} and NumPy_FOUND=${NUMPY_FOUND}")
|
message(STATUS "..............Python_FOUND=${PYTHON_FOUND} and NumPy_FOUND=${NUMPY_FOUND}")
|
||||||
|
@ -218,11 +215,11 @@ if( ENABLE_JPG )
|
||||||
# which can affect future package discovery if not undone by the caller.
|
# which can affect future package discovery if not undone by the caller.
|
||||||
# The current CMAKE_PREFIX_PATH is backed up as _CMAKE_PREFIX_PATH
|
# The current CMAKE_PREFIX_PATH is backed up as _CMAKE_PREFIX_PATH
|
||||||
#
|
#
|
||||||
set(CMAKE_WARN_DEPRECATED OFF) # Suppress deprecation message
|
#set(CMAKE_WARN_DEPRECATED OFF) # Suppress deprecation message
|
||||||
ecbuild_add_extra_search_paths( jasper )
|
#ecbuild_add_extra_search_paths( jasper )
|
||||||
find_package( Jasper )
|
find_package( Jasper )
|
||||||
set(CMAKE_PREFIX_PATH ${_CMAKE_PREFIX_PATH}) # Restore CMAKE_PREFIX_PATH
|
#set(CMAKE_PREFIX_PATH ${_CMAKE_PREFIX_PATH}) # Restore CMAKE_PREFIX_PATH
|
||||||
set(CMAKE_WARN_DEPRECATED ON) # Remove suppression
|
#set(CMAKE_WARN_DEPRECATED ON) # Remove suppression
|
||||||
|
|
||||||
find_package( OpenJPEG )
|
find_package( OpenJPEG )
|
||||||
|
|
||||||
|
@ -507,7 +504,7 @@ ecbuild_print_summary()
|
||||||
|
|
||||||
ecbuild_info("")
|
ecbuild_info("")
|
||||||
ecbuild_info(" +--------------------------+")
|
ecbuild_info(" +--------------------------+")
|
||||||
ecbuild_info(" | ecCodes version ${ECCODES_VERSION} |")
|
ecbuild_info(" | ecCodes version ${eccodes_VERSION} |")
|
||||||
ecbuild_info(" +--------------------------+")
|
ecbuild_info(" +--------------------------+")
|
||||||
ecbuild_info("")
|
ecbuild_info("")
|
||||||
|
|
||||||
|
|
|
@ -13,13 +13,13 @@
|
||||||
|
|
||||||
#include "eccodes_ecbuild_config.h" /* generated by ecbuild */
|
#include "eccodes_ecbuild_config.h" /* generated by ecbuild */
|
||||||
|
|
||||||
#define ECCODES_VERSION_STR "@ECCODES_VERSION_STR@"
|
#define ECCODES_VERSION_STR "@eccodes_VERSION_STR@"
|
||||||
|
|
||||||
/* ECCODES_VERSION is defined in eccodes_version.h from the 3 version components below */
|
/* ECCODES_VERSION is defined in eccodes_version.h from the 3 version components below */
|
||||||
|
|
||||||
#define ECCODES_MAJOR_VERSION @ECCODES_MAJOR_VERSION@
|
#define ECCODES_MAJOR_VERSION @eccodes_VERSION_MAJOR@
|
||||||
#define ECCODES_MINOR_VERSION @ECCODES_MINOR_VERSION@
|
#define ECCODES_MINOR_VERSION @eccodes_VERSION_MINOR@
|
||||||
#define ECCODES_REVISION_VERSION @ECCODES_PATCH_VERSION@
|
#define ECCODES_REVISION_VERSION @eccodes_VERSION_PATCH@
|
||||||
|
|
||||||
#define ECCODES_DEFINITION_PATH "@ECCODES_DEFINITION_PATH@"
|
#define ECCODES_DEFINITION_PATH "@ECCODES_DEFINITION_PATH@"
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ if( HAVE_FORTRAN )
|
||||||
ecbuild_add_library( TARGET eccodes_f90
|
ecbuild_add_library( TARGET eccodes_f90
|
||||||
SOURCES grib_fortran.c grib_f90.f90 eccodes_f90.f90 grib_kinds.h
|
SOURCES grib_fortran.c grib_f90.f90 eccodes_f90.f90 grib_kinds.h
|
||||||
GENERATED grib_f90.f90 eccodes_f90.f90
|
GENERATED grib_f90.f90 eccodes_f90.f90
|
||||||
LIBS eccodes )
|
PRIVATE_LIBS eccodes )
|
||||||
if( DEFINED ecbuild_VERSION AND NOT ${ecbuild_VERSION} VERSION_LESS 3.1 )
|
if( DEFINED ecbuild_VERSION AND NOT ${ecbuild_VERSION} VERSION_LESS 3.1 )
|
||||||
# Installed module directory is not in the PUBLIC INCLUDES!
|
# Installed module directory is not in the PUBLIC INCLUDES!
|
||||||
target_include_directories( eccodes_f90 PUBLIC $<INSTALL_INTERFACE:${INSTALL_INCLUDE_DIR}> )
|
target_include_directories( eccodes_f90 PUBLIC $<INSTALL_INTERFACE:${INSTALL_INCLUDE_DIR}> )
|
||||||
|
|
|
@ -440,7 +440,7 @@ ecbuild_add_library( TARGET eccodes
|
||||||
# griby.c gribl.c
|
# griby.c gribl.c
|
||||||
${grib_api_srcs}
|
${grib_api_srcs}
|
||||||
GENERATED grib_api_version.c
|
GENERATED grib_api_version.c
|
||||||
LIBS ${ECCODES_EXTRA_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${CMATH_LIBRARIES}
|
PRIVATE_LIBS ${ECCODES_EXTRA_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${CMATH_LIBRARIES}
|
||||||
TEMPLATES ${grib_api_extra_srcs}
|
TEMPLATES ${grib_api_extra_srcs}
|
||||||
INSTALL_HEADERS_LIST
|
INSTALL_HEADERS_LIST
|
||||||
grib_api.h
|
grib_api.h
|
||||||
|
|
|
@ -11,11 +11,11 @@
|
||||||
#ifndef eccodes_version_H
|
#ifndef eccodes_version_H
|
||||||
#define eccodes_version_H
|
#define eccodes_version_H
|
||||||
|
|
||||||
#define ECCODES_VERSION_STR "@ECCODES_VERSION_STR@"
|
#define ECCODES_VERSION_STR "@eccodes_VERSION_STR@"
|
||||||
|
|
||||||
#define ECCODES_MAJOR_VERSION @ECCODES_MAJOR_VERSION@
|
#define ECCODES_MAJOR_VERSION @eccodes_VERSION_MAJOR@
|
||||||
#define ECCODES_MINOR_VERSION @ECCODES_MINOR_VERSION@
|
#define ECCODES_MINOR_VERSION @eccodes_VERSION_MINOR@
|
||||||
#define ECCODES_REVISION_VERSION @ECCODES_PATCH_VERSION@
|
#define ECCODES_REVISION_VERSION @eccodes_VERSION_PATCH@
|
||||||
#define ECCODES_VERSION (ECCODES_MAJOR_VERSION*10000+ECCODES_MINOR_VERSION*100+ECCODES_REVISION_VERSION)
|
#define ECCODES_VERSION (ECCODES_MAJOR_VERSION*10000+ECCODES_MINOR_VERSION*100+ECCODES_REVISION_VERSION)
|
||||||
|
|
||||||
#endif /* eccodes_version_H */
|
#endif /* eccodes_version_H */
|
||||||
|
|
|
@ -23,7 +23,7 @@ ecbuild_add_library( TARGET grib_tools
|
||||||
TYPE STATIC
|
TYPE STATIC
|
||||||
NOINSTALL
|
NOINSTALL
|
||||||
SOURCES ${grib_tools_sources}
|
SOURCES ${grib_tools_sources}
|
||||||
LIBS eccodes )
|
PRIVATE_LIBS eccodes )
|
||||||
|
|
||||||
# tools binaries
|
# tools binaries
|
||||||
list( APPEND ecc_tools_binaries
|
list( APPEND ecc_tools_binaries
|
||||||
|
|
Loading…
Reference in New Issue