2018-08-07 17:57:44 +00:00
|
|
|
add_library (clickhouse-odbc-bridge-lib
|
2018-08-19 17:09:54 +00:00
|
|
|
PingHandler.cpp
|
|
|
|
MainHandler.cpp
|
|
|
|
ColumnInfoHandler.cpp
|
2018-08-08 16:15:29 +00:00
|
|
|
HandlerFactory.cpp
|
2018-08-07 17:57:44 +00:00
|
|
|
ODBCBridge.cpp
|
2018-08-19 17:09:54 +00:00
|
|
|
validateODBCConnectionString.cpp
|
2018-08-15 22:00:28 +00:00
|
|
|
)
|
2018-08-07 17:57:44 +00:00
|
|
|
|
2018-08-15 22:00:28 +00:00
|
|
|
target_link_libraries (clickhouse-odbc-bridge-lib clickhouse_common_io daemon dbms)
|
2018-08-07 17:57:44 +00:00
|
|
|
target_include_directories (clickhouse-odbc-bridge-lib PUBLIC ${ClickHouse_SOURCE_DIR}/libs/libdaemon/include)
|
|
|
|
|
2018-08-19 17:09:54 +00:00
|
|
|
if (USE_POCO_SQLODBC)
|
|
|
|
target_link_libraries (clickhouse-odbc-bridge-lib ${Poco_SQLODBC_LIBRARY})
|
|
|
|
target_include_directories (clickhouse-odbc-bridge-lib SYSTEM PRIVATE ${ODBC_INCLUDE_DIRECTORIES} ${Poco_SQLODBC_INCLUDE_DIRS})
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
if (USE_POCO_DATAODBC)
|
|
|
|
target_link_libraries (clickhouse-odbc-bridge-lib ${Poco_DataODBC_LIBRARY})
|
|
|
|
target_include_directories (clickhouse-odbc-bridge-lib SYSTEM PRIVATE ${ODBC_INCLUDE_DIRECTORIES} ${Poco_DataODBC_INCLUDE_DIRS})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
if (ENABLE_TESTS)
|
|
|
|
add_subdirectory (tests)
|
|
|
|
endif ()
|
|
|
|
|
2018-08-07 17:57:44 +00:00
|
|
|
if (CLICKHOUSE_SPLIT_BINARY)
|
|
|
|
add_executable (clickhouse-odbc-bridge odbc-bridge.cpp)
|
|
|
|
target_link_libraries (clickhouse-odbc-bridge clickhouse-odbc-bridge-lib)
|
|
|
|
endif ()
|