mirror of
https://github.com/libuv/libuv
synced 2025-03-28 21:13:16 +00:00
build: fix uv_test shared uv Windows cmake build
This commit fixes a linker error when building tests via cmake on Windows by adding the proper USING_UV_SHARED=1 define when linking to the shared libuv. Fixes: https://github.com/libuv/libuv/issues/2188 PR-URL: https://github.com/libuv/libuv/pull/2187 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
90415a3394
commit
c4a77f5bc7
@ -352,7 +352,8 @@ target_link_libraries(uv_a ${uv_libraries})
|
||||
if(BUILD_TESTING)
|
||||
include(CTest)
|
||||
add_executable(uv_run_tests ${uv_test_sources})
|
||||
target_compile_definitions(uv_run_tests PRIVATE ${uv_defines})
|
||||
target_compile_definitions(uv_run_tests
|
||||
PRIVATE ${uv_defines} USING_UV_SHARED=1)
|
||||
target_compile_options(uv_run_tests PRIVATE ${uv_cflags})
|
||||
target_include_directories(uv_run_tests PRIVATE include)
|
||||
target_link_libraries(uv_run_tests uv ${uv_test_libraries})
|
||||
|
Loading…
x
Reference in New Issue
Block a user