summaryrefslogtreecommitdiff
path: root/cmake/FindJava.cmake
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-09-05 16:05:13 +0200
committerSergei Golubchik <serg@mariadb.org>2016-09-12 17:46:35 +0200
commit6152784cb1fa6981b3d54cf896b0b59ce01410e8 (patch)
treeb3873b2b5e9388a130ce506224f4d634e2f83fec /cmake/FindJava.cmake
parent58f20b0c6e308acd0b95ab0f8924dbb01be325ff (diff)
downloadmariadb-git-6152784cb1fa6981b3d54cf896b0b59ce01410e8.tar.gz
make CONNECT's finding Java and JNI less verbose
Diffstat (limited to 'cmake/FindJava.cmake')
-rw-r--r--cmake/FindJava.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmake/FindJava.cmake b/cmake/FindJava.cmake
new file mode 100644
index 00000000000..95bbf8682cd
--- /dev/null
+++ b/cmake/FindJava.cmake
@@ -0,0 +1,8 @@
+if(DEFINED Java_JAVA_EXECUTABLE)
+ return()
+endif()
+
+set(orig_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
+unset(CMAKE_MODULE_PATH)
+include(FindJava)
+set(CMAKE_MODULE_PATH ${orig_CMAKE_MODULE_PATH})