From eeebf31e54a04eee7a2a91bf80fce5a8fbae7e67 Mon Sep 17 00:00:00 2001 From: Alex Turbov Date: Sun, 21 Aug 2022 09:26:35 +0400 Subject: Build: Use imported target `LibRHash::LibRHash` 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 31dbd5d..2c5af7b 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -756,7 +756,7 @@ target_link_libraries( ZLIB::ZLIB JsonCpp::JsonCpp LibUV::LibUV - ${CMAKE_LIBRHASH_LIBRARIES} + LibRHash::LibRHash ${CMake_KWIML_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ) diff --git a/Source/Modules/CMakeBuildUtilities.cmake b/Source/Modules/CMakeBuildUtilities.cmake index 71dd37f..e420c67 100644 --- a/Source/Modules/CMakeBuildUtilities.cmake +++ b/Source/Modules/CMakeBuildUtilities.cmake @@ -105,10 +105,9 @@ if(CMAKE_USE_SYSTEM_LIBRHASH) message(FATAL_ERROR "CMAKE_USE_SYSTEM_LIBRHASH is ON but LibRHash is not found!") endif() - set(CMAKE_LIBRHASH_LIBRARIES LibRHash::LibRHash) else() - set(CMAKE_LIBRHASH_LIBRARIES cmlibrhash) add_subdirectory(Utilities/cmlibrhash) + add_library(LibRHash::LibRHash ALIAS cmlibrhash) CMAKE_SET_TARGET_FOLDER(cmlibrhash "Utilities/3rdParty") endif() -- cgit v0.12