More robust handling for installed headers
[alexxy/gromacs.git] / src / gromacs / fileio / CMakeLists.txt
index 18078dee8149bf6f8e5f3ee7d912ef2c39c04f73..0c638a78a8b7e026bb47f96b48ff3bca28d3bd9b 100644 (file)
@@ -42,14 +42,14 @@ endif()
 
 set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${FILEIO_SOURCES} PARENT_SCOPE)
 
-set(FILEIO_PUBLIC_HEADERS
+gmx_install_headers(
     confio.h
     enxio.h
     filenm.h
-    futil.h
     gmxfio.h
     matio.h
     mdoutf.h
+    mtxio.h
     pdbio.h
     tpxio.h
     trajectory_writing.h
@@ -58,16 +58,14 @@ set(FILEIO_PUBLIC_HEADERS
     trxio.h
     xdr_datatype.h
     xtcio.h
+    xvgr.h
     )
-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)