Skip to content

Commit 2675092

Browse files
authored
[cmake] Fix building on OpenBSD (#296)
OpenBSD does not have libdl. CMake provides a variable which determines whether libdl is necessary or not called CMAKE_DL_LIBS.
1 parent 22da087 commit 2675092

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

CMakeLists.txt

+1-4
Original file line numberDiff line numberDiff line change
@@ -360,11 +360,8 @@ target_link_libraries(libneko ${GC_LIBRARIES})
360360
target_link_libraries(nekovm libneko)
361361

362362
if(UNIX)
363-
if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
364-
set(DL_LIB "dl")
365-
endif()
366363
find_package(Threads)
367-
target_link_libraries(libneko ${DL_LIB} m ${CMAKE_THREAD_LIBS_INIT})
364+
target_link_libraries(libneko ${CMAKE_DL_LIBS} m ${CMAKE_THREAD_LIBS_INIT})
368365
endif()
369366

370367
set_target_properties(nekovm libneko

0 commit comments

Comments
 (0)