Skip to content

Commit 5af076e

Browse files
committed
Add all changes made on 10.1
1 parent 26adbb2 commit 5af076e

File tree

14 files changed

+5398
-159
lines changed

14 files changed

+5398
-159
lines changed

storage/connect/CMakeLists.txt

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,32 @@ int main() {
257257
ENDIF(UNIX)
258258
ENDIF(CONNECT_WITH_ODBC)
259259

260+
#
261+
# JDBC
262+
#
263+
264+
OPTION(CONNECT_WITH_JDBC "Compile CONNECT storage engine with JDBC support" ON)
265+
266+
IF(CONNECT_WITH_JDBC)
267+
# TODO: detect Java SDK and the presence of JDBC connectors
268+
# TODO: Find how to compile and install the JdbcInterface.java class
269+
# Find required libraries and include directories
270+
271+
FIND_PACKAGE(Java)
272+
FIND_PACKAGE(JNI)
273+
IF (JAVA_FOUND AND JNI_FOUND)
274+
INCLUDE_DIRECTORIES(${JAVA_INCLUDE_PATH})
275+
INCLUDE_DIRECTORIES(${JAVA_INCLUDE_PATH2})
276+
# SET(JDBC_LIBRARY ${JAVA_JVM_LIBRARY})
277+
SET(CONNECT_SOURCES ${CONNECT_SOURCES}
278+
JdbcInterface.java JdbcInterface.class
279+
jdbconn.cpp tabjdbc.cpp jdbconn.h tabjdbc.h jdbccat.h)
280+
add_definitions(-DJDBC_SUPPORT)
281+
ELSE()
282+
SET(JDBC_LIBRARY "")
283+
ENDIF()
284+
ENDIF(CONNECT_WITH_JDBC)
285+
260286

261287
#
262288
# XMAP
@@ -277,5 +303,5 @@ MYSQL_ADD_PLUGIN(connect ${CONNECT_SOURCES}
277303
COMPONENT connect-engine
278304
RECOMPILE_FOR_EMBEDDED
279305
LINK_LIBRARIES ${ZLIB_LIBRARY} ${XML_LIBRARY} ${ICONV_LIBRARY}
280-
${ODBC_LIBRARY} ${IPHLPAPI_LIBRARY})
306+
${ODBC_LIBRARY} ${JDBC_LIBRARY} ${IPHLPAPI_LIBRARY})
281307

storage/connect/JdbcInterface.class

14.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)