More robust handling for installed headers
[alexxy/gromacs.git] / src / gromacs / fileio / CMakeLists.txt
index bf8426890435293c46130870173013a193b000fa..0c638a78a8b7e026bb47f96b48ff3bca28d3bd9b 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2013, by the GROMACS development team, led by
+# Copyright (c) 2013,2014, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
 # the research papers on the package. Check out http://www.gromacs.org.
 
 file(GLOB FILEIO_SOURCES *.cpp *.c)
+
+if(GMX_USE_PLUGINS)
+  set(FILEIO_SOURCES ${FILEIO_SOURCES} ${CMAKE_SOURCE_DIR}/src/external/vmd_molfile/vmddlopen.c)
+else()
+  list(REMOVE_ITEM FILEIO_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/vmdio.c)
+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
-    gmx_system_xdr.h
     gmxfio.h
     matio.h
     mdoutf.h
+    mtxio.h
     pdbio.h
     tpxio.h
     trajectory_writing.h
     trnio.h
     trx.h
     trxio.h
-    xdrf.h
+    xdr_datatype.h
     xtcio.h
+    xvgr.h
     )
-gmx_install_headers(fileio ${FILEIO_PUBLIC_HEADERS})
+
+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)
-#    add_subdirectory(tests)
-endif (BUILD_TESTING)
+     add_subdirectory(tests)
+endif()