From c42ec8a647838eceebe09e4c8b73fe33e8b51918 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 19 Jul 2023 18:14:03 -0400 Subject: [PATCH] create toplevel README file when building for static Linux or macOS multiarch --- cmake/CMakeLists.txt | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index f5b04e2165..a4f8c58132 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -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