From 08be01a1813c497c03240e302efb900e2663532b Mon Sep 17 00:00:00 2001 From: Alex Turbov Date: Sun, 21 Aug 2022 09:23:57 +0400 Subject: Build: Use imported target `LibUV::LibUV` instead of variables --- Source/CMakeLists.txt | 2 +- Source/Modules/CMakeBuildUtilities.cmake | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 31d514d..31dbd5d 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -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} diff --git a/Source/Modules/CMakeBuildUtilities.cmake b/Source/Modules/CMakeBuildUtilities.cmake index b17c7ce..71dd37f 100644 --- a/Source/Modules/CMakeBuildUtilities.cmake +++ b/Source/Modules/CMakeBuildUtilities.cmake @@ -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() -- cgit v0.12