summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorAnel Husakovic <anel@mariadb.org>2021-05-26 14:15:26 +0200
committerAnel Husakovic <anel@mariadb.org>2021-06-04 10:52:18 +0200
commit7eed97ed9fe2b0c1e69167576be12759dffcd926 (patch)
treec0eb452c15c3da7194cbb6a87ae787e1292421a0 /cmake
parent5c896472b6cb315fc54091a342ec37a7c4b5421d (diff)
downloadmariadb-git-7eed97ed9fe2b0c1e69167576be12759dffcd926.tar.gz
MDEV-25777: JAVA_INCLUDE_PATH and JAVA_INCLUDE_PATH2 not found with out 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
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindJNI.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/FindJNI.cmake b/cmake/FindJNI.cmake
index 12305d7c86d..b2c6f849c87 100644
--- a/cmake/FindJNI.cmake
+++ b/cmake/FindJNI.cmake
@@ -1,4 +1,4 @@
-if(JAVA_AWT_LIBRARY)
+if(JAVA_AWT_LIBRARY AND JAVA_INCLUDE_PATH)
set(JNI_FOUND TRUE)
return()
endif()