summaryrefslogtreecommitdiff
path: root/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
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')
-rw-r--r--cmake/FindJNI.cmake5
-rw-r--r--cmake/FindJava.cmake5
2 files changed, 10 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()
diff --git a/cmake/FindJava.cmake b/cmake/FindJava.cmake
index 95bbf8682cd..714f56b1f72 100644
--- a/cmake/FindJava.cmake
+++ b/cmake/FindJava.cmake
@@ -1,4 +1,9 @@
+if(Java_JAVA_EXECUTABLE)
+ set(JAVA_FOUND TRUE)
+ return()
+endif()
if(DEFINED Java_JAVA_EXECUTABLE)
+ set(JAVA_FOUND FALSE)
return()
endif()