Skip to content

Commit 042134c

Browse files
authored
Merge pull request #171 from brad0/cmake_dl
CMake: Fix linking on *BSD systems
2 parents 7121910 + ee798cb commit 042134c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ if(NOT VOLK_HEADERS_ONLY OR VOLK_INSTALL)
4141
target_compile_definitions(volk PUBLIC ${VOLK_STATIC_DEFINES})
4242
endif()
4343
if (NOT WIN32)
44-
target_link_libraries(volk PUBLIC dl)
44+
target_link_libraries(volk PUBLIC ${CMAKE_DL_LIBS})
4545
endif()
4646
endif()
4747

@@ -55,7 +55,7 @@ target_include_directories(volk_headers INTERFACE
5555
$<INSTALL_INTERFACE:include>
5656
)
5757
if (NOT WIN32)
58-
target_link_libraries(volk_headers INTERFACE dl)
58+
target_link_libraries(volk_headers INTERFACE ${CMAKE_DL_LIBS})
5959
endif()
6060

6161
# -----------------------------------------------------

0 commit comments

Comments
 (0)