Skip to content
Permalink
Browse files
MDEV-25777: JAVA_INCLUDE_PATH and JAVA_INCLUDE_PATH2 not found with o…
…ut of source configuration and Ninja generator

- As solution `PLUGIN_CONNECT=NO` use early check to disable plugin:
  Solution suggested by wlad@mariadb.com
- `JNI_FOUND` is a internal result variable and should be set with
cached library and header variables (like `JAVA_INCLUDE_PATH`) defined.
  * Note: wrapper cmake/FindJNI.cmake runs first time and cmake native Find<module> returns only cached variable, like `JAVA_INCLUDE_PATH`, results variable are not cached).

Reviewed by: serg@mariadb.com
  • Loading branch information
an3l committed Jun 4, 2021
1 parent 5c89647 commit 7eed97e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
@@ -1,4 +1,4 @@
if(JAVA_AWT_LIBRARY)
if(JAVA_AWT_LIBRARY AND JAVA_INCLUDE_PATH)
set(JNI_FOUND TRUE)
return()
endif()
@@ -13,6 +13,10 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA

IF(WITHOUT_DYNAMIC_PLUGINS OR WITH_NONE OR ("${PLUGIN_CONNECT}" STREQUAL "NO"))
RETURN()
ENDIF()

SET(CONNECT_PLUGIN_STATIC "connect")
SET(CONNECT_PLUGIN_DYNAMIC "connect")

0 comments on commit 7eed97e

Please sign in to comment.