mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
uv: cmake: avoid using full host path
When using OE/Yocto to create a SDK/toolchain, the generated LibwebsocketsTargets.cmake falsely contains the host path (build artifacts) in INTERFACE_LINK_LIBRARIES instead of the actually installed SDK path. This host path originates from LIBUV_LIBRARIES that gives the full path to the openssl library at build time. To avoid propagating full build host specific path to generated LibwebsocketsTargets.cmake, this patch is using pkg_check_modules().
This commit is contained in:
parent
507b4f5a62
commit
eac4bfd322
1 changed files with 3 additions and 1 deletions
|
@ -36,7 +36,9 @@ set(LWS_LIBUV_INCLUDE_DIRS CACHE PATH "Path to the libuv include directory")
|
|||
if ("${LWS_LIBUV_LIBRARIES}" STREQUAL "" OR "${LWS_LIBUV_INCLUDE_DIRS}" STREQUAL "")
|
||||
if (NOT LIBUV_FOUND)
|
||||
find_path(LIBUV_INCLUDE_DIRS NAMES uv.h)
|
||||
find_library(LIBUV_LIBRARIES NAMES uv)
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(LUV REQUIRED IMPORTED_TARGET libuv)
|
||||
set(LIBUV_LIBRARIES ${LUV_LIBRARIES})
|
||||
endif()
|
||||
else()
|
||||
set(LIBUV_LIBRARIES ${LWS_LIBUV_LIBRARIES})
|
||||
|
|
Loading…
Add table
Reference in a new issue