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

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

View File

@@ -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}
)

View File

@@ -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()