Merge release-5-0 into master
[alexxy/gromacs.git] / src / gromacs / fileio / CMakeLists.txt
index f30ea7d94cb3772feeb5ecf140cfc0d337674bfd..99955060a2e3ee9fc4e137c9656f93e605422d1e 100644 (file)
@@ -62,13 +62,11 @@ set(FILEIO_PUBLIC_HEADERS
     )
 gmx_install_headers(fileio ${FILEIO_PUBLIC_HEADERS})
 
-# These files include tng_io.h from the TNG library. That header needs to know
-# whether inttypes.h exists or not.
-include(CheckIncludeFiles)
-check_include_file(inttypes.h   HAVE_INTTYPES_H)
-if(HAVE_INTTYPES_H)
-  set_property(SOURCE tngio.cpp APPEND PROPERTY COMPILE_DEFINITIONS USE_STD_INTTYPES_H)
-  set_property(SOURCE tngio_for_tools.cpp APPEND PROPERTY COMPILE_DEFINITIONS USE_STD_INTTYPES_H)
+if (GMX_USE_TNG AND TNG_IO_DEFINITIONS)
+    set_property(SOURCE tngio.cpp
+                 APPEND PROPERTY COMPILE_DEFINITIONS ${TNG_IO_DEFINITIONS})
+    set_property(SOURCE tngio_for_tools.cpp
+                 APPEND PROPERTY COMPILE_DEFINITIONS ${TNG_IO_DEFINITIONS})
 endif()
 
 if (BUILD_TESTING)