apply suggested improvements and clarifications

This commit is contained in:
Axel Kohlmeyer
2021-03-03 21:27:05 -05:00
parent 26086e04a5
commit 897c337e1c
2 changed files with 14 additions and 12 deletions

View File

@ -32,7 +32,7 @@ endif()
# If enabled, no need to use LD_LIBRARY_PATH / DYLD_LIBRARY_PATH when installed # If enabled, no need to use LD_LIBRARY_PATH / DYLD_LIBRARY_PATH when installed
option(LAMMPS_INSTALL_RPATH "Set runtime path for shared libraries linked to LAMMPS binaries" OFF) option(LAMMPS_INSTALL_RPATH "Set runtime path for shared libraries linked to LAMMPS binaries" OFF)
if (LAMMPS_INSTALL_RPATH) if (LAMMPS_INSTALL_RPATH)
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR})
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH ON) set(CMAKE_INSTALL_RPATH_USE_LINK_PATH ON)
endif() endif()

View File

@ -526,17 +526,19 @@ you want to copy files to is protected.
make # perform make after CMake command make # perform make after CMake command
make install # perform the installation into prefix make install # perform the installation into prefix
By default CMake will remove any runtime path settings for shared During the installation process CMake will by default remove any runtime
libraries so you may have to set or modify the ``LD_LIBRARY_PATH`` path settings for loading shared libraries. Because of this you may
(or ``DYLD_LIBRARY_PATH``) environment variable, if you are installing have to set or modify the ``LD_LIBRARY_PATH`` (or ``DYLD_LIBRARY_PATH``)
into a non-system location. If you set the CMake variable environment variable, if you are installing LAMMPS into a non-system
``LAMMPS_INSTALL_RPATH`` to ``on``, however, the paths for any location and/or are linking to libraries in a non-system location that
linked shared libraries and the library installation folder for the depend on such runtime path settings.
LAMMPS library will be embedded and thus avoiding the requirement As an alternative you may set the CMake variable ``LAMMPS_INSTALL_RPATH``
to set environment variables to find shared libraries. The ``off`` to ``on`` and then the runtime paths for any linked shared libraries
setting is usually preferred for packaged binaries or when setting and the library installation folder for the LAMMPS library will be
up environment modules, the ``on`` setting is more convenient for embedded and thus the requirement to set environment variables is avoided.
installation into a non-system or personal folder. The ``off`` setting is usually preferred for packaged binaries or when
setting up environment modules, the ``on`` setting is more convenient
for installing software into a non-system or personal folder.
.. tab:: Traditional make .. tab:: Traditional make