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
|
||||
DEFAULT ON )
|
||||
|
||||
find_package( PNG )
|
||||
ecbuild_add_option( FEATURE PNG
|
||||
DESCRIPTION "Support for PNG decoding/encoding"
|
||||
DEFAULT OFF
|
||||
CONDITION PNG_FOUND )
|
||||
REQUIRED_PACKAGES PNG )
|
||||
|
||||
if( HAVE_PNG )
|
||||
set( HAVE_LIBPNG 1 ) # compatibility with autotools
|
||||
|
@ -112,20 +111,18 @@ else()
|
|||
set( HAVE_LIBPNG 0 )
|
||||
endif()
|
||||
|
||||
find_package( NetCDF )
|
||||
ecbuild_add_option( FEATURE NETCDF
|
||||
DESCRIPTION "Support for GRIB to NetCDF conversion"
|
||||
DEFAULT ON
|
||||
CONDITION NetCDF_FOUND
|
||||
REQUIRED_PACKAGES NetCDF
|
||||
NO_TPL )
|
||||
|
||||
find_package( AEC QUIET )
|
||||
find_package( AEC )
|
||||
ecbuild_add_option( FEATURE AEC
|
||||
DESCRIPTION "Support for Adaptive Entropy Coding"
|
||||
DEFAULT OFF
|
||||
CONDITION AEC_FOUND )
|
||||
|
||||
#find_package( Python 2.6 NO_LIBS )
|
||||
ecbuild_find_python( VERSION 2.6 NO_LIBS )
|
||||
find_package( NumPy )
|
||||
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.
|
||||
# The current CMAKE_PREFIX_PATH is backed up as _CMAKE_PREFIX_PATH
|
||||
#
|
||||
set(CMAKE_WARN_DEPRECATED OFF) # Suppress deprecation message
|
||||
ecbuild_add_extra_search_paths( jasper )
|
||||
#set(CMAKE_WARN_DEPRECATED OFF) # Suppress deprecation message
|
||||
#ecbuild_add_extra_search_paths( jasper )
|
||||
find_package( Jasper )
|
||||
set(CMAKE_PREFIX_PATH ${_CMAKE_PREFIX_PATH}) # Restore CMAKE_PREFIX_PATH
|
||||
set(CMAKE_WARN_DEPRECATED ON) # Remove suppression
|
||||
#set(CMAKE_PREFIX_PATH ${_CMAKE_PREFIX_PATH}) # Restore CMAKE_PREFIX_PATH
|
||||
#set(CMAKE_WARN_DEPRECATED ON) # Remove suppression
|
||||
|
||||
find_package( OpenJPEG )
|
||||
|
||||
|
@ -507,7 +504,7 @@ ecbuild_print_summary()
|
|||
|
||||
ecbuild_info("")
|
||||
ecbuild_info(" +--------------------------+")
|
||||
ecbuild_info(" | ecCodes version ${ECCODES_VERSION} |")
|
||||
ecbuild_info(" | ecCodes version ${eccodes_VERSION} |")
|
||||
ecbuild_info(" +--------------------------+")
|
||||
ecbuild_info("")
|
||||
|
||||
|
|
|
@ -13,13 +13,13 @@
|
|||
|
||||
#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 */
|
||||
|
||||
#define ECCODES_MAJOR_VERSION @ECCODES_MAJOR_VERSION@
|
||||
#define ECCODES_MINOR_VERSION @ECCODES_MINOR_VERSION@
|
||||
#define ECCODES_REVISION_VERSION @ECCODES_PATCH_VERSION@
|
||||
#define ECCODES_MAJOR_VERSION @eccodes_VERSION_MAJOR@
|
||||
#define ECCODES_MINOR_VERSION @eccodes_VERSION_MINOR@
|
||||
#define ECCODES_REVISION_VERSION @eccodes_VERSION_PATCH@
|
||||
|
||||
#define ECCODES_DEFINITION_PATH "@ECCODES_DEFINITION_PATH@"
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ if( HAVE_FORTRAN )
|
|||
ecbuild_add_library( TARGET eccodes_f90
|
||||
SOURCES grib_fortran.c grib_f90.f90 eccodes_f90.f90 grib_kinds.h
|
||||
GENERATED grib_f90.f90 eccodes_f90.f90
|
||||
LIBS eccodes )
|
||||
PRIVATE_LIBS eccodes )
|
||||
if( DEFINED ecbuild_VERSION AND NOT ${ecbuild_VERSION} VERSION_LESS 3.1 )
|
||||
# Installed module directory is not in the PUBLIC INCLUDES!
|
||||
target_include_directories( eccodes_f90 PUBLIC $<INSTALL_INTERFACE:${INSTALL_INCLUDE_DIR}> )
|
||||
|
|
|
@ -440,7 +440,7 @@ ecbuild_add_library( TARGET eccodes
|
|||
# griby.c gribl.c
|
||||
${grib_api_srcs}
|
||||
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}
|
||||
INSTALL_HEADERS_LIST
|
||||
grib_api.h
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
#ifndef 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_MINOR_VERSION @ECCODES_MINOR_VERSION@
|
||||
#define ECCODES_REVISION_VERSION @ECCODES_PATCH_VERSION@
|
||||
#define ECCODES_MAJOR_VERSION @eccodes_VERSION_MAJOR@
|
||||
#define ECCODES_MINOR_VERSION @eccodes_VERSION_MINOR@
|
||||
#define ECCODES_REVISION_VERSION @eccodes_VERSION_PATCH@
|
||||
#define ECCODES_VERSION (ECCODES_MAJOR_VERSION*10000+ECCODES_MINOR_VERSION*100+ECCODES_REVISION_VERSION)
|
||||
|
||||
#endif /* eccodes_version_H */
|
||||
|
|
|
@ -23,7 +23,7 @@ ecbuild_add_library( TARGET grib_tools
|
|||
TYPE STATIC
|
||||
NOINSTALL
|
||||
SOURCES ${grib_tools_sources}
|
||||
LIBS eccodes )
|
||||
PRIVATE_LIBS eccodes )
|
||||
|
||||
# tools binaries
|
||||
list( APPEND ecc_tools_binaries
|
||||
|
|
Loading…
Reference in New Issue