2021-04-20 11:07:05 +00:00
|
|
|
if (NOT USE_INTERNAL_NANODBC_LIBRARY)
|
|
|
|
return ()
|
|
|
|
endif ()
|
|
|
|
|
2021-04-24 19:47:52 +00:00
|
|
|
set (LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/nanodbc")
|
2021-03-22 11:40:29 +00:00
|
|
|
|
|
|
|
if (NOT TARGET unixodbc)
|
|
|
|
message(FATAL_ERROR "Configuration error: unixodbc is not a target")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set (SRCS
|
2021-04-24 19:47:52 +00:00
|
|
|
"${LIBRARY_DIR}/nanodbc/nanodbc.cpp"
|
2021-03-22 11:40:29 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
add_library(nanodbc ${SRCS})
|
|
|
|
|
|
|
|
target_link_libraries (nanodbc PUBLIC unixodbc)
|
2021-04-24 19:47:52 +00:00
|
|
|
target_include_directories (nanodbc SYSTEM PUBLIC "${LIBRARY_DIR}/")
|