2018-09-14 19:48:51 +00:00
|
|
|
add_library (clickhouse-odbc-bridge-lib ${LINK_MODE}
|
2018-08-19 17:09:54 +00:00
|
|
|
PingHandler.cpp
|
|
|
|
MainHandler.cpp
|
|
|
|
ColumnInfoHandler.cpp
|
2018-09-28 02:46:33 +00:00
|
|
|
IdentifierQuoteHandler.cpp
|
2018-08-08 16:15:29 +00:00
|
|
|
HandlerFactory.cpp
|
2018-08-07 17:57:44 +00:00
|
|
|
ODBCBridge.cpp
|
2018-09-28 02:46:33 +00:00
|
|
|
getIdentifierQuote.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-11-21 19:20:27 +00:00
|
|
|
target_link_libraries (clickhouse-odbc-bridge-lib PRIVATE 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)
|
2018-11-21 19:20:27 +00:00
|
|
|
target_link_libraries (clickhouse-odbc-bridge-lib PRIVATE ${Poco_SQLODBC_LIBRARY})
|
2018-09-14 19:48:51 +00:00
|
|
|
target_include_directories (clickhouse-odbc-bridge-lib SYSTEM PRIVATE ${ODBC_INCLUDE_DIRECTORIES} ${Poco_SQLODBC_INCLUDE_DIR})
|
|
|
|
endif ()
|
|
|
|
if (Poco_SQL_FOUND)
|
2018-11-21 19:20:27 +00:00
|
|
|
target_link_libraries (clickhouse-odbc-bridge-lib PRIVATE ${Poco_SQL_LIBRARY})
|
2018-08-19 17:09:54 +00:00
|
|
|
endif ()
|
|
|
|
|
|
|
|
if (USE_POCO_DATAODBC)
|
2018-11-21 19:20:27 +00:00
|
|
|
target_link_libraries (clickhouse-odbc-bridge-lib PRIVATE ${Poco_DataODBC_LIBRARY})
|
2018-09-14 19:48:51 +00:00
|
|
|
target_include_directories (clickhouse-odbc-bridge-lib SYSTEM PRIVATE ${ODBC_INCLUDE_DIRECTORIES} ${Poco_DataODBC_INCLUDE_DIR})
|
2018-08-19 17:09:54 +00:00
|
|
|
endif()
|
2018-09-14 19:48:51 +00:00
|
|
|
if (Poco_Data_FOUND)
|
2018-11-21 19:20:27 +00:00
|
|
|
target_link_libraries (clickhouse-odbc-bridge-lib PRIVATE ${Poco_Data_LIBRARY})
|
2018-09-14 19:48:51 +00:00
|
|
|
endif ()
|
2018-08-19 17:09:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
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)
|
2018-11-21 19:20:27 +00:00
|
|
|
target_link_libraries (clickhouse-odbc-bridge PRIVATE clickhouse-odbc-bridge-lib)
|
2018-08-07 17:57:44 +00:00
|
|
|
endif ()
|