diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2017-08-23 23:29:59 +0000 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2017-08-23 23:29:59 +0000 |
commit | 7b36395ee962e7272d2544c61bf6142df2aba0b4 (patch) | |
tree | 8728590f8670eb696ebe70650cb15c0d1c304670 /storage/connect | |
parent | db51ad1e014c3a67b35adcbb90ec6a38d32a6571 (diff) | |
download | mariadb-git-7b36395ee962e7272d2544c61bf6142df2aba0b4.tar.gz |
MDEV-13630 : dont install connect-specific JAR files if connect is not built.
Diffstat (limited to 'storage/connect')
-rw-r--r-- | storage/connect/CMakeLists.txt | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/storage/connect/CMakeLists.txt b/storage/connect/CMakeLists.txt index 81441892215..8df552505d1 100644 --- a/storage/connect/CMakeLists.txt +++ b/storage/connect/CMakeLists.txt @@ -266,13 +266,6 @@ IF(CONNECT_WITH_JDBC) JdbcInterface.java ApacheInterface.java MariadbInterface.java MysqlInterface.java OracleInterface.java PostgresqlInterface.java JavaWrappers.jar) - # TODO: Find how to compile and install the java wrapper classes - # Find required libraries and include directories - SET (JAVA_SOURCES JdbcInterface.java) - add_jar(JdbcInterface ${JAVA_SOURCES}) - INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/JavaWrappers.jar - ${CMAKE_CURRENT_BINARY_DIR}/JdbcInterface.jar - DESTINATION ${INSTALL_PLUGINDIR} COMPONENT connect-engine) add_definitions(-DJDBC_SUPPORT) ELSE() SET(JDBC_LIBRARY "") @@ -313,3 +306,18 @@ MYSQL_ADD_PLUGIN(connect ${CONNECT_SOURCES} LINK_LIBRARIES ${ZLIB_LIBRARY} ${XML_LIBRARY} ${ICONV_LIBRARY} ${ODBC_LIBRARY} ${JDBC_LIBRARY} ${IPHLPAPI_LIBRARY}) +IF(NOT TARGET connect) + RETURN() +ENDIF() + +IF(CONNECT_WITH_JDBC AND JAVA_FOUND AND JNI_FOUND) + # TODO: Find how to compile and install the java wrapper classes + # Find required libraries and include directories + SET (JAVA_SOURCES JdbcInterface.java) + add_jar(JdbcInterface ${JAVA_SOURCES}) + INSTALL(FILES + ${CMAKE_CURRENT_SOURCE_DIR}/JavaWrappers.jar + ${CMAKE_CURRENT_BINARY_DIR}/JdbcInterface.jar + DESTINATION ${INSTALL_PLUGINDIR} COMPONENT connect-engine) +ENDIF() + |