create toplevel README file when building for static Linux or macOS multiarch

This commit is contained in:
Axel Kohlmeyer
2023-07-19 18:14:03 -04:00
parent f26064d9a5
commit c42ec8a647

View File

@ -808,10 +808,25 @@ endif()
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
)
FILES ${CMAKE_BINARY_DIR}/etc/profile.d/lammps.sh ${CMAKE_BINARY_DIR}/etc/profile.d/lammps.csh
DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/profile.d)
if(CMAKE_SYSTEM_NAME STREQUAL "LinuxMUSL")
file(WRITE ${CMAKE_BINARY_DIR}/README.txt
"Statically linked, portable, serial LAMMPS binary archive for x86_64 Linux\n\n")
endif()
if(APPLE AND CMAKE_OSX_ARCHITECTURES)
file(WRITE ${CMAKE_BINARY_DIR}/README.txt
"Multi-arch, serial LAMMPS binary archive for macOS 11 (Big Sur) and later\n\n")
endif()
if((CMAKE_SYSTEM_NAME STREQUAL "LinuxMUSL") OR (APPLE AND CMAKE_OSX_ARCHITECTURES))
file(APPEND ${CMAKE_BINARY_DIR}/README.txt
"Executables are in 'bin', potential files in 'share/lammps/potentials',\n")
file(APPEND ${CMAKE_BINARY_DIR}/README.txt
"benchmark and simple input examples are in 'share/lammps/bench'.\n")
install(FILES ${CMAKE_BINARY_DIR}/README.txt
DESTINATION ${CMAKE_INSTALL_PREFIX})
endif()
###############################################################################
# Install LAMMPS lib and python module into site-packages folder with