summaryrefslogtreecommitdiff
path: root/cmake/FindJNI.cmake
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2021-05-14 19:55:53 +0200
committerSergei Golubchik <serg@mariadb.org>2021-05-22 21:56:51 +0200
commitf9f8cae9fe22c133f8c92e395ff70c42e287a2f7 (patch)
tree2f22395a81a42df767e257fe99df463b2b9f3bea /cmake/FindJNI.cmake
parent6bf866cc79230cfc3b0305cd8b3cfa187ea01ecd (diff)
downloadmariadb-git-f9f8cae9fe22c133f8c92e395ff70c42e287a2f7.tar.gz
cmake: fix FindJava/FindJNI wrappers for cmake re-runs
when cmake is re-run and include(FindJAVA) is skipped, JAVA_FOUND should still be set. Same for JNI.
Diffstat (limited to 'cmake/FindJNI.cmake')
-rw-r--r--cmake/FindJNI.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmake/FindJNI.cmake b/cmake/FindJNI.cmake
index fb2f4801a70..12305d7c86d 100644
--- a/cmake/FindJNI.cmake
+++ b/cmake/FindJNI.cmake
@@ -1,4 +1,9 @@
+if(JAVA_AWT_LIBRARY)
+ set(JNI_FOUND TRUE)
+ return()
+endif()
if(DEFINED JAVA_AWT_LIBRARY)
+ set(JNI_FOUND FALSE)
return()
endif()