make PLUGIN package compatible with static linkage of LAMMPS

This commit is contained in:
Axel Kohlmeyer
2024-02-26 06:59:43 -05:00
parent 6203c18ef0
commit a9eaa71f8c

View File

@ -225,6 +225,10 @@ endif()
add_executable(lmp ${MAIN_SOURCES})
target_link_libraries(lmp PRIVATE lammps)
set_target_properties(lmp PROPERTIES OUTPUT_NAME ${LAMMPS_BINARY})
# re-export all symbols for plugins
if(PKG_PLUGIN AND (NOT ((CMAKE_SYSTEM_NAME STREQUAL "Windows"))))
set_target_properties(lmp PROPERTIES ENABLE_EXPORTS TRUE)
endif()
install(TARGETS lmp EXPORT LAMMPS_Targets DESTINATION ${CMAKE_INSTALL_BINDIR})
option(CMAKE_VERBOSE_MAKEFILE "Generate verbose Makefiles" OFF)