Fix compilation on CentOS 7 (missing link to libdl) (#2849)

Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
Davide Mancusi 2024-01-23 16:48:21 +01:00 committed by GitHub
parent e6a36ff796
commit 09eb33ac21
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -497,7 +497,7 @@ endif()
# target_link_libraries treats any arguments starting with - but not -l as
# linker flags. Thus, we can pass both linker flags and libraries together.
target_link_libraries(libopenmc ${ldflags} ${HDF5_LIBRARIES} ${HDF5_HL_LIBRARIES}
xtensor gsl::gsl-lite-v1 fmt::fmt)
xtensor gsl::gsl-lite-v1 fmt::fmt ${CMAKE_DL_LIBS})
if(TARGET pugixml::pugixml)
target_link_libraries(libopenmc pugixml::pugixml)