Build: Use imported target LibUV::LibUV instead of variables

This commit is contained in:
Alex Turbov 2022-08-21 09:23:57 +04:00 committed by Brad King
parent ddac6dcbe8
commit 08be01a181
2 changed files with 2 additions and 3 deletions

View File

@ -755,7 +755,7 @@ target_link_libraries(
LibArchive::LibArchive
ZLIB::ZLIB
JsonCpp::JsonCpp
${CMAKE_LIBUV_LIBRARIES}
LibUV::LibUV
${CMAKE_LIBRHASH_LIBRARIES}
${CMake_KWIML_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}

View File

@ -336,10 +336,9 @@ if(CMAKE_USE_SYSTEM_LIBUV)
message(FATAL_ERROR
"CMAKE_USE_SYSTEM_LIBUV is ON but a libuv is not found!")
endif()
set(CMAKE_LIBUV_LIBRARIES LibUV::LibUV)
else()
set(CMAKE_LIBUV_LIBRARIES cmlibuv)
add_subdirectory(Utilities/cmlibuv)
add_library(LibUV::LibUV ALIAS cmlibuv)
CMAKE_SET_TARGET_FOLDER(cmlibuv "Utilities/3rdParty")
endif()