summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindJNI.cmake8
-rw-r--r--cmake/FindJava.cmake8
2 files changed, 16 insertions, 0 deletions
diff --git a/cmake/FindJNI.cmake b/cmake/FindJNI.cmake
new file mode 100644
index 00000000000..3db9198d9c8
--- /dev/null
+++ b/cmake/FindJNI.cmake
@@ -0,0 +1,8 @@
+if(DEFINED JAVA_AWT_LIBRARY)
+ return()
+endif()
+
+set(orig_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
+unset(CMAKE_MODULE_PATH)
+include(FindJava)
+set(CMAKE_MODULE_PATH ${orig_CMAKE_MODULE_PATH})
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})