forked from lijiext/lammps
Add profile.d files to set LAMMPS_POTENTIALS environment variable
This commit is contained in:
parent
06335e77cb
commit
99985a1d5b
|
@ -961,7 +961,16 @@ endif()
|
|||
###############################################################################
|
||||
# Install potential files in data directory
|
||||
###############################################################################
|
||||
install(DIRECTORY ${LAMMPS_SOURCE_DIR}/../potentials DESTINATION ${CMAKE_INSTALL_DATADIR}/lammps)
|
||||
set(LAMMPS_POTENTIALS_DIR ${CMAKE_INSTALL_FULL_DATADIR}/lammps/potentials)
|
||||
install(DIRECTORY ${LAMMPS_SOURCE_DIR}/../potentials DESTINATION ${CMAKE_INSTALL_DATADIR}/lammps/potentials)
|
||||
|
||||
configure_file(etc/profile.d/lammps.sh.in ${CMAKE_BINARY_DIR}/etc/profile.d/lammps.sh @ONLY)
|
||||
configure_file(etc/profile.d/lammps.csh.in ${CMAKE_BINARY_DIR}/etc/profile.d/lammps.csh @ONLY)
|
||||
install(
|
||||
FILES ${CMAKE_BINARY_DIR}/etc/profile.d/lammps.sh
|
||||
${CMAKE_BINARY_DIR}/etc/profile.d/lammps.csh
|
||||
DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/profile.d
|
||||
)
|
||||
|
||||
###############################################################################
|
||||
# Testing
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
# set environment for LAMMPS executables to find potential files
|
||||
if ( "$?LAMMPS_POTENTIALS" == 0 ) setenv LAMMPS_POTENTIALS @LAMMPS_POTENTIALS_DIR@
|
|
@ -0,0 +1,2 @@
|
|||
# set environment for LAMMPS executables to find potential files
|
||||
export LAMMPS_POTENTIALS=${LAMMPS_POTENTIALS-@LAMMPS_POTENTIALS_DIR@}
|
Loading…
Reference in New Issue