include(ExternalProject)

set(URIPARSER_VERSION "1.0.2")

ExternalProject_Add(
  uriparser
  DOWNLOAD_EXTRACT_TIMESTAMP OFF
  SOURCE_DIR ${CMAKE_SOURCE_DIR}/external/uriparser
  URL https://github.com/uriparser/uriparser/releases/download/uriparser-${URIPARSER_VERSION}/uriparser-${URIPARSER_VERSION}.tar.xz
  URL_HASH SHA256=7b2496f9622b4b201186a3d159d278605f1fb7262402a10cc1c0824889798b00
  CMAKE_ARGS ${ANDROID_CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=${DEPS_INSTALL_DIR}
             -DCMAKE_INSTALL_LIBDIR:STRING=${CMAKE_INSTALL_LIBDIR} -DURIPARSER_BUILD_DOCS:BOOL=OFF
             -DURIPARSER_BUILD_TESTS:BOOL=OFF -DURIPARSER_BUILD_TOOLS:BOOL=OFF
)
