apply suggested improvements and clarifications
This commit is contained in:
@ -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()
|
||||||
|
|
||||||
|
|||||||
@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user