From 890a254fc35d68ec6c164cbf79971e7c4fb63462 Mon Sep 17 00:00:00 2001 From: AlysonStahl-NOAA <166434581+AlysonStahl-NOAA@users.noreply.github.com> Date: Wed, 9 Oct 2024 17:21:23 -0700 Subject: [PATCH] Update CMakeLists.txt --- wgrib2/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wgrib2/CMakeLists.txt b/wgrib2/CMakeLists.txt index 12811db..4916d1b 100644 --- a/wgrib2/CMakeLists.txt +++ b/wgrib2/CMakeLists.txt @@ -89,7 +89,7 @@ if(USE_NETCDF) endif() if(USE_JASPER) - target_link_libraries(obj_lib PUBLIC g2c::g2c) +# target_link_libraries(obj_lib PUBLIC g2c::g2c) # include_directories(${JASPER_INCLUDE_DIR}) # target_include_directories(obj_lib PUBLIC ${JASPER_INCLUDE_DIR}) # target_link_libraries(obj_lib PUBLIC ${JASPER_LIBRARIES}) @@ -126,6 +126,9 @@ if(USE_AEC) target_link_libraries(wgrib2_exe PRIVATE aec) endif() +if(USE_JASPER) + target_link_libraries(wgrib2_exe PRIVATE g2c::g2c) +endif() if(USE_OPENJPEG) include_directories(${OPENJPEG_INCLUDE_DIRS})