mariadb/cmake/FindJava.cmake
Sergei Golubchik f9f8cae9fe 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.
2021-05-22 21:56:51 +02:00

13 lines
285 B
CMake

if(Java_JAVA_EXECUTABLE)
set(JAVA_FOUND TRUE)
return()
endif()
if(DEFINED Java_JAVA_EXECUTABLE)
set(JAVA_FOUND FALSE)
return()
endif()
set(orig_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
unset(CMAKE_MODULE_PATH)
include(FindJava)
set(CMAKE_MODULE_PATH ${orig_CMAKE_MODULE_PATH})