Skip to content

Commit 6152784

Browse files
committed
make CONNECT's finding Java and JNI less verbose
1 parent 58f20b0 commit 6152784

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

cmake/FindJNI.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
if(DEFINED JAVA_AWT_LIBRARY)
2+
return()
3+
endif()
4+
5+
set(orig_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
6+
unset(CMAKE_MODULE_PATH)
7+
include(FindJava)
8+
set(CMAKE_MODULE_PATH ${orig_CMAKE_MODULE_PATH})

cmake/FindJava.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
if(DEFINED Java_JAVA_EXECUTABLE)
2+
return()
3+
endif()
4+
5+
set(orig_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
6+
unset(CMAKE_MODULE_PATH)
7+
include(FindJava)
8+
set(CMAKE_MODULE_PATH ${orig_CMAKE_MODULE_PATH})

0 commit comments

Comments
 (0)