From 1b33ca280743aa36157ba81e58c5f3e849e5c2cc Mon Sep 17 00:00:00 2001 From: AlysonStahl-NOAA <166434581+AlysonStahl-NOAA@users.noreply.github.com> Date: Wed, 9 Oct 2024 14:09:43 -0700 Subject: [PATCH] fixed missing link to g2c --- CMakeLists.txt | 2 +- wgrib2/CMakeLists.txt | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d39ff6d..7e94bd7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -102,7 +102,7 @@ endif() message(STATUS "Checking if the user wants to use Jasper...") if(USE_JASPER) if (NOT USE_G2CLIB) - message(FATAL_ERROR "If USE_JASPER, USE_G2CLIB must be on") + message(FATAL_ERROR "If USE_JASPER, USE_G2CLIB must be on") endif() # list(APPEND definitions_list -DUSE_JASPER) # find_package(Jasper REQUIRED) diff --git a/wgrib2/CMakeLists.txt b/wgrib2/CMakeLists.txt index 767d728..870b528 100644 --- a/wgrib2/CMakeLists.txt +++ b/wgrib2/CMakeLists.txt @@ -88,11 +88,11 @@ if(USE_NETCDF) target_link_libraries(obj_lib PUBLIC NetCDF::NetCDF_C) endif() -if(USE_JASPER) - include_directories(${JASPER_INCLUDE_DIR}) - target_include_directories(obj_lib PUBLIC ${JASPER_INCLUDE_DIR}) - target_link_libraries(obj_lib PUBLIC ${JASPER_LIBRARIES}) -endif() +#if(USE_JASPER) +# include_directories(${JASPER_INCLUDE_DIR}) +# target_include_directories(obj_lib PUBLIC ${JASPER_INCLUDE_DIR}) +# target_link_libraries(obj_lib PUBLIC ${JASPER_LIBRARIES}) +#endif() if(USE_PNG) target_link_libraries(obj_lib PUBLIC PNG::PNG) @@ -103,6 +103,7 @@ if(OpenMP_C_FOUND) endif() if(USE_G2CLIB) + target_link_libraries(obj_lib PUBLIC g2c::g2c) endif() if(USE_IPOLATES)