mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[build] Consume libuv via cmake config instead of via pkg-config (#5438)
The problem is that you have to use a different pkg-config file if you want to use a static variant of libuv, but the buildsystem should not care which variant of libuv should be used. This is not a problem with the cmake config.
This commit is contained in:
@@ -167,8 +167,7 @@ endif()
|
||||
|
||||
if (USE_SYSTEM_LIBUV)
|
||||
set (LIBUV_SYSTEM_REPLACE "
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(libuv REQUIRED IMPORTED_TARGET libuv)
|
||||
find_dependency(libuv CONFIG)
|
||||
")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -146,9 +146,8 @@ if (NOT USE_SYSTEM_LIBUV)
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(libuv REQUIRED IMPORTED_TARGET libuv)
|
||||
target_link_libraries(wpinet PUBLIC PkgConfig::libuv)
|
||||
find_package(libuv CONFIG REQUIRED)
|
||||
target_link_libraries(wpinet PUBLIC $<IF:$<TARGET_EXISTS:libuv::uv_a>,libuv::uv_a,libuv::uv>)
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
|
||||
Reference in New Issue
Block a user