2021-03-22 11:40:29 +00:00
|
|
|
if (NOT ENABLE_ODBC)
|
2021-04-20 11:07:05 +00:00
|
|
|
return ()
|
|
|
|
endif ()
|
2021-03-22 11:40:29 +00:00
|
|
|
|
2021-04-20 11:07:05 +00:00
|
|
|
if (NOT USE_INTERNAL_NANODBC_LIBRARY)
|
|
|
|
message (FATAL_ERROR "Only the bundled nanodbc library can be used")
|
|
|
|
endif ()
|
2021-03-22 11:40:29 +00:00
|
|
|
|
2021-04-20 11:07:05 +00:00
|
|
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/nanodbc/CMakeLists.txt")
|
2021-10-17 23:29:04 +00:00
|
|
|
message (FATAL_ERROR "submodule contrib/nanodbc is missing. to fix try run: \n git submodule update --init")
|
2021-03-22 11:40:29 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
set (NANODBC_LIBRARY nanodbc)
|
2021-04-20 11:07:05 +00:00
|
|
|
set (NANODBC_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/nanodbc/nanodbc")
|
2021-03-22 11:40:29 +00:00
|
|
|
|
2021-04-20 11:07:05 +00:00
|
|
|
message (STATUS "Using nanodbc: ${NANODBC_INCLUDE_DIR} : ${NANODBC_LIBRARY}")
|