Unverified Commit 52f9e4a9 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

allow overriding the location of the molfile plugin headers with CMake

parent cd6b23d1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -613,8 +613,9 @@ if(PKG_USER-PLUMED)
endif()

if(PKG_USER-MOLFILE)
  set(MOLFILE_INCLUDE_DIRS "${LAMMPS_LIB_SOURCE_DIR}/molfile" CACHE STRING "Path to VMD molfile plugin headers")
  add_library(molfile INTERFACE)
  target_include_directories(molfile INTERFACE ${LAMMPS_LIB_SOURCE_DIR}/molfile)
  target_include_directories(molfile INTERFACE ${MOLFILE_INCLUDE_DIRS})
  target_link_libraries(molfile INTERFACE ${CMAKE_DL_LIBS})
  list(APPEND LAMMPS_LINK_LIBS molfile)
endif()
@@ -626,7 +627,6 @@ if(PKG_USER-NETCDF)
  add_definitions(-DLMP_HAS_NETCDF -DNC_64BIT_DATA=0x0020)
endif()


if(PKG_USER-SMD)
  option(DOWNLOAD_EIGEN3 "Download Eigen3 instead of using an already installed one)" OFF)
  if(DOWNLOAD_EIGEN3)
+16 −2
Original line number Diff line number Diff line
@@ -893,7 +893,17 @@ USER-MOLFILE package :h4,link(user-molfile)

[CMake build]:

No additional settings are needed besides "-D PKG_USER-MOLFILE=yes".
-D MOLFILE_INCLUDE_DIRS=path   # (optional) path where VMD molfile plugin headers are installed
-D PKG_USER-MOLFILE=yes     :pre


Using "-D PKG_USER-MOLFILE=yes" enables the package, and setting
"-D MOLFILE_INCLUDE DIRS" allows to provide a custom location for
the molfile plugin header files. These should match the ABI of the
plugin files used, and thus one typically sets them to include
folder of the local VMD installation in use. LAMMPS ships with a
couple of default header files that correspond to a popular VMD
version, usually the latest release.

[Traditional make]:

@@ -902,7 +912,11 @@ loading library libdl.a that is typically present on all systems. It
is required for LAMMPS to link with this package.  If the setting is
not valid for your system, you will need to edit the Makefile.lammps
file.  See lib/molfile/README and lib/molfile/Makefile.lammps for
details.
details. It is also possible to configure a different folder with
the VMD molfile plugin header files. LAMMPS ships with a couple of
default headers, but these are not compatible with all VMD versions,
so it is often best to change this setting to the location of the
same include files of the local VMD installation in use.

:line