From 08de5b5938e120eb923dfbbedb38d88226993a71 Mon Sep 17 00:00:00 2001
From: Andrey Debolskiy <and.debol@gmail.com>
Date: Mon, 18 Nov 2024 18:15:48 +0300
Subject: [PATCH] update linking to hdf5

---
 .idea/developer-tools.xml | 6 ++++++
 CMakeLists.txt            | 8 ++++----
 2 files changed, 10 insertions(+), 4 deletions(-)
 create mode 100644 .idea/developer-tools.xml

diff --git a/.idea/developer-tools.xml b/.idea/developer-tools.xml
new file mode 100644
index 0000000..5421cc5
--- /dev/null
+++ b/.idea/developer-tools.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="DeveloperToolsToolWindowSettingsV1" lastSelectedContentNodeId="base64-encoder-decoder">
+    <developerToolsConfigurations />
+  </component>
+</project>
\ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c3c8335..4c84608 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,15 +26,15 @@ set(src_io
 add_library(lib_scm_io ${src_io})
 #NetCDF handling
 execute_process (
-        COMMAND bash -c "nc-config --fflags | grep -Eo '^[^ ]+' | tr -d '\n'"
+        COMMAND bash -c "nf-config --fflags | grep -Eo '^[^ ]+' | tr -d '\n'"
         OUTPUT_VARIABLE netcdf_inc
 )
 cmake_path(SET netcfd_inc_dir " ${netcdf_inc}" )
 message("CMake path is ${netcdf_inc}")
 target_compile_options(lib_scm_io PRIVATE ${netcdf_inc})
-#include_directories(${netcdf_inc})
+include_directories(${netcdf_inc})
 execute_process (
-        COMMAND bash -c "nc-config --flibs | tr -d '\n'"
+        COMMAND bash -c "nf-config --flibs | tr -d '\n'"
         OUTPUT_VARIABLE temp
 )
 separate_arguments(netcdff_libs UNIX_COMMAND "${temp}")
@@ -44,7 +44,7 @@ execute_process (
 )
 separate_arguments(netcdf_libs UNIX_COMMAND "${temp}")
 execute_process (
-        COMMAND bash -c "nc-config --static | tr -d '\n'"
+        COMMAND bash -c "nc-config --all | grep -Eo '\-\-static.*' | cut -d ' ' -f10- | tr -d '\n'"
         OUTPUT_VARIABLE temp
 )
 separate_arguments(netcdf_static UNIX_COMMAND "${temp}")
-- 
GitLab