diff --git a/CMakeLists.txt b/CMakeLists.txt
index a5702e1f02f6c3db6e269d38eed381d57a12e7ec..82a34d3b7ae625813dc2b1de4da1dae6b8698101 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -298,6 +298,10 @@ macro (CMAKE_BUILD_UTILITIES)
     add_subdirectory(Utilities/KWIML)
   endif()
 
+  set(CMAKE_LIBRHASH_LIBRARIES cmlibrhash)
+  add_subdirectory(Utilities/cmlibrhash)
+  CMAKE_SET_TARGET_FOLDER(cmlibrhash "Utilities/3rdParty")
+
   #---------------------------------------------------------------------
   # Build zlib library for Curl, CMake, and CTest.
   set(CMAKE_ZLIB_HEADER "cm_zlib.h")
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index cf9dbb8a9ba003c7bfcd94d44a1aa2923d04e565..879272cfa06fce9a14dce15879cbe8fb47695dd9 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -788,6 +788,7 @@ target_link_libraries(CMakeLib cmsys
   ${CMAKE_CURL_LIBRARIES}
   ${CMAKE_JSONCPP_LIBRARIES}
   ${CMAKE_LIBUV_LIBRARIES}
+  ${CMAKE_LIBRHASH_LIBRARIES}
   ${CMake_KWIML_LIBRARIES}
   )
 
diff --git a/Utilities/cm_rhash.h b/Utilities/cm_rhash.h
new file mode 100644
index 0000000000000000000000000000000000000000..23d5409d1e467f49960a9a41a3557cdbb5c24684
--- /dev/null
+++ b/Utilities/cm_rhash.h
@@ -0,0 +1,8 @@
+/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
+   file Copyright.txt or https://cmake.org/licensing for details.  */
+#ifndef cm_rhash_h
+#define cm_rhash_h
+
+#include <cmlibrhash/librhash/rhash.h>
+
+#endif
diff --git a/Utilities/cmlibrhash/CMakeLists.txt b/Utilities/cmlibrhash/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..47d069ae0b002d95613a31c901c2932fa81b7272
--- /dev/null
+++ b/Utilities/cmlibrhash/CMakeLists.txt
@@ -0,0 +1,28 @@
+project(librhash C)
+
+set(librhash_sources
+  librhash/algorithms.c
+  librhash/algorithms.h
+  librhash/byte_order.c
+  librhash/byte_order.h
+  librhash/hex.c
+  librhash/hex.h
+  librhash/md5.c
+  librhash/md5.h
+  librhash/rhash.c
+  librhash/rhash.h
+  librhash/sha1.c
+  librhash/sha1.h
+  librhash/sha256.c
+  librhash/sha256.h
+  librhash/sha512.c
+  librhash/sha512.h
+  librhash/ustd.h
+  librhash/util.h
+  )
+
+include_directories(
+  ${KWSYS_HEADER_ROOT}
+  )
+
+add_library(cmlibrhash ${librhash_sources})
diff --git a/Utilities/cmlibrhash/librhash/ustd.h b/Utilities/cmlibrhash/librhash/ustd.h
index 94f1ae2601ca258d205192c5eec1faf7633bd234..38c4e3e20fadd09d807793041fb2b615848f68de 100644
--- a/Utilities/cmlibrhash/librhash/ustd.h
+++ b/Utilities/cmlibrhash/librhash/ustd.h
@@ -2,6 +2,9 @@
 #ifndef LIBRHASH_USTD_H
 #define LIBRHASH_USTD_H
 
+/* Include KWSys Large File Support configuration. */
+#include <cmsys/Configure.h>
+
 #if _MSC_VER >= 1300
 
 # define int64_t __int64