Tom Murphy writes:

> Hi,
>
>   I've redone the diff to match what you recommend upstream. I've also
> added logic so that if system is UNIX but not OpenBSD, then link in dl
> (which allows it to build for other platforms upstream). Once this is
> committed upstream I can remove the CMakeLists.txt patch.

Thanks. I've committed this with a tweak of changing the
CMAKE_SYSTEM_NAME line (commented inline). The !OpenBSD did not work in
my testing; when I tested with !FreeBSD it would omit dl anyways. Using
NOT seems to detect platform.

> + # Check build target, and included sources and libs
> + if(UNIX)
> +     target_link_libraries(${PROJECT_NAME} m)
> ++if(CMAKE_SYSTEM_NAME MATCHES !OpenBSD)

if(NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")

> +     target_link_libraries(${PROJECT_NAME} dl)
> ++endif()
> + else()
> +     target_link_libraries(${PROJECT_NAME} ws2_32)
> +     target_link_libraries(${PROJECT_NAME} winmm)
> +@@ -147,6 +164,9 @@ if(CURL_FOUND)
> +     target_link_libraries(${PROJECT_NAME} ${CURL_LIBRARIES})
> + endif()

Reply via email to