Try to unbreak broken android cmake flags

* cmake's built in platforms/Android.cmake for some reason sets
  CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH to OFF which prevents any subsequent
  find_program or find_package from locating any executables in the system PATH.
  This can break finding java among other things.
This commit is contained in:
baldurk
2021-03-23 12:24:54 +00:00
parent 261be0e597
commit 6a0dff050c
+4
View File
@@ -66,6 +66,10 @@ target_link_libraries(renderdoccmd ${libraries})
install (TARGETS renderdoccmd DESTINATION bin)
if(ANDROID)
# Android sets this to off becuase Android is always terrible forever.
# It breaks finding java in the path, so enable it again
set(CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH ON)
#############################
# We need to check that 'java' in PATH is new enough. Temporarily unset the JAVA_HOME env,
# then invoke FindJava.cmake which will search just the PATH, then re-set it.