diff --git a/memfs/CMakeLists.txt b/memfs/CMakeLists.txt index a25899c45..7f9c466ec 100644 --- a/memfs/CMakeLists.txt +++ b/memfs/CMakeLists.txt @@ -12,7 +12,7 @@ set_source_files_properties( ${CMAKE_CURRENT_BINARY_DIR}/memfs.c PROPERTIES OBJE # "${PROJECT_SOURCE_DIR}/memfs.py" ${definition_files}" ) -ecbuild_add_library(TARGET grib_api_memfs +ecbuild_add_library(TARGET eccodes_memfs CONDITION HAVE_MEMFS SOURCES ${CMAKE_CURRENT_BINARY_DIR}/memfs.c GENERATED ${CMAKE_CURRENT_BINARY_DIR}/memfs.c ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fae67286a..292afae4b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -401,7 +401,7 @@ configure_file( eccodes_version.h.in eccodes_version.h @ONLY ) # DEPENDANT action.c ) if(HAVE_MEMFS) - list(APPEND ECCODES_EXTRA_LIBRARIES grib_api_memfs) + list(APPEND ECCODES_EXTRA_LIBRARIES eccodes_memfs) endif() diff --git a/src/grib_context.c b/src/grib_context.c index cf55f79cd..69f1d6590 100644 --- a/src/grib_context.c +++ b/src/grib_context.c @@ -416,6 +416,13 @@ grib_context* grib_context_get_default() default_grib_context.log_stream=stdout; } +#ifdef HAVE_MEMFS + if(!default_grib_context.grib_samples_path) + default_grib_context.grib_samples_path = ""; + if(!default_grib_context.grib_definition_files_path) + default_grib_context.grib_definition_files_path = ""; +#endif + #ifdef ECCODES_SAMPLES_PATH if(!default_grib_context.grib_samples_path) default_grib_context.grib_samples_path = ECCODES_SAMPLES_PATH ;