$NetBSD: patch-libs_alignment_CMakeLists.txt,v 1.1 2024/05/03 11:17:14 wiz Exp $ Use CMAKE_DL_LIBS for libdl, which does not exist everywhere. --- libs/alignment/CMakeLists.txt.orig 2024-05-03 10:36:05.404763201 +0000 +++ libs/alignment/CMakeLists.txt @@ -32,11 +32,11 @@ add_library(AlignmentDriver SHARED ${Ali set_target_properties(AlignmentDriver PROPERTIES COMPILE_FLAGS "-fPIC") IF(APPLE) - target_link_libraries(AlignmentDriver dl -L/usr/local/lib ${GSL_LIBRARIES}) + target_link_libraries(AlignmentDriver ${CMAKE_DL_LIBS} -L/usr/local/lib ${GSL_LIBRARIES}) ELSE() # Force linking all referenced libraries because of libgsl is not linked against cblas library on Linux SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-as-needed") - target_link_libraries(AlignmentDriver dl ${GSL_LIBRARIES} + target_link_libraries(AlignmentDriver ${CMAKE_DL_LIBS} ${GSL_LIBRARIES} $<$:indidriver> ) ENDIF()