Fix build without submodules

This commit is contained in:
proller 2018-12-19 18:37:55 +03:00
parent ca75d18414
commit b56dea9f84
3 changed files with 5 additions and 3 deletions

View File

@ -16,7 +16,7 @@ endif ()
if (HDFS3_LIBRARY AND HDFS3_INCLUDE_DIR) if (HDFS3_LIBRARY AND HDFS3_INCLUDE_DIR)
set(USE_HDFS 1) set(USE_HDFS 1)
elseif (LIBGSASL_LIBRARY) elseif (LIBGSASL_LIBRARY AND LIBXML2_LIBRARY)
set(HDFS3_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/libhdfs3/include") set(HDFS3_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/libhdfs3/include")
set(HDFS3_LIBRARY hdfs3) set(HDFS3_LIBRARY hdfs3)
set(USE_HDFS 1) set(USE_HDFS 1)

View File

@ -5,6 +5,7 @@ endif ()
if (USE_INTERNAL_LIBGSASL_LIBRARY AND NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libgsasl/src/gsasl.h") if (USE_INTERNAL_LIBGSASL_LIBRARY AND NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libgsasl/src/gsasl.h")
message (WARNING "submodule contrib/libgsasl is missing. to fix try run: \n git submodule update --init --recursive") message (WARNING "submodule contrib/libgsasl is missing. to fix try run: \n git submodule update --init --recursive")
set (USE_INTERNAL_LIBGSASL_LIBRARY 0) set (USE_INTERNAL_LIBGSASL_LIBRARY 0)
set (MISSING_INTERNAL_LIBGSASL_LIBRARY 1)
endif () endif ()
if (NOT USE_INTERNAL_LIBGSASL_LIBRARY) if (NOT USE_INTERNAL_LIBGSASL_LIBRARY)
@ -13,7 +14,7 @@ if (NOT USE_INTERNAL_LIBGSASL_LIBRARY)
endif () endif ()
if (LIBGSASL_LIBRARY AND LIBGSASL_INCLUDE_DIR) if (LIBGSASL_LIBRARY AND LIBGSASL_INCLUDE_DIR)
elseif (NOT APPLE AND NOT ARCH_32) elseif (NOT MISSING_INTERNAL_LIBGSASL_LIBRARY AND NOT APPLE AND NOT ARCH_32)
set (LIBGSASL_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/libgsasl/src ${ClickHouse_SOURCE_DIR}/contrib/libgsasl/linux_x86_64/include) set (LIBGSASL_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/libgsasl/src ${ClickHouse_SOURCE_DIR}/contrib/libgsasl/linux_x86_64/include)
set (USE_INTERNAL_LIBGSASL_LIBRARY 1) set (USE_INTERNAL_LIBGSASL_LIBRARY 1)
set (LIBGSASL_LIBRARY libgsasl) set (LIBGSASL_LIBRARY libgsasl)

View File

@ -3,6 +3,7 @@ option (USE_INTERNAL_LIBXML2_LIBRARY "Set to FALSE to use system libxml2 library
if (USE_INTERNAL_LIBXML2_LIBRARY AND NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libxml2/libxml.h") if (USE_INTERNAL_LIBXML2_LIBRARY AND NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libxml2/libxml.h")
message (WARNING "submodule contrib/libxml2 is missing. to fix try run: \n git submodule update --init --recursive") message (WARNING "submodule contrib/libxml2 is missing. to fix try run: \n git submodule update --init --recursive")
set (USE_INTERNAL_LIBXML2_LIBRARY 0) set (USE_INTERNAL_LIBXML2_LIBRARY 0)
set (MISSING_INTERNAL_LIBXML2_LIBRARY 1)
endif () endif ()
if (NOT USE_INTERNAL_LIBXML2_LIBRARY) if (NOT USE_INTERNAL_LIBXML2_LIBRARY)
@ -11,7 +12,7 @@ if (NOT USE_INTERNAL_LIBXML2_LIBRARY)
endif () endif ()
if (LIBXML2_LIBRARY AND LIBXML2_INCLUDE_DIR) if (LIBXML2_LIBRARY AND LIBXML2_INCLUDE_DIR)
else () elseif (NOT MISSING_INTERNAL_LIBXML2_LIBRARY)
set (LIBXML2_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/libxml2/include ${ClickHouse_SOURCE_DIR}/contrib/libxml2-cmake/linux_x86_64/include) set (LIBXML2_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/libxml2/include ${ClickHouse_SOURCE_DIR}/contrib/libxml2-cmake/linux_x86_64/include)
set (USE_INTERNAL_LIBXML2_LIBRARY 1) set (USE_INTERNAL_LIBXML2_LIBRARY 1)
set (LIBXML2_LIBRARY libxml2) set (LIBXML2_LIBRARY libxml2)