From 6959dc3b335790904ba28f19694449ebb0fcd7d6 Mon Sep 17 00:00:00 2001 From: proller Date: Wed, 19 Dec 2018 19:25:38 +0300 Subject: [PATCH] Fix build without submodules --- cmake/find_base64.cmake | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cmake/find_base64.cmake b/cmake/find_base64.cmake index ad71d11c1b4..9b6e28a8ccf 100644 --- a/cmake/find_base64.cmake +++ b/cmake/find_base64.cmake @@ -1,4 +1,11 @@ -option (ENABLE_BASE64 "Enable base64" ON) +if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/base64/lib/lib.c") + set (MISSING_INTERNAL_BASE64_LIBRARY 1) + message (WARNING "submodule contrib/base64 is missing. to fix try run: \n git submodule update --init --recursive") +endif () + +if (NOT MISSING_INTERNAL_BASE64_LIBRARY) + option (ENABLE_BASE64 "Enable base64" ON) +endif () if (ENABLE_BASE64) if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/base64") @@ -9,4 +16,3 @@ if (ENABLE_BASE64) set (USE_BASE64 1) endif() endif () -