When building ANTLR via CMake, do not require javac #6224 (#6225)
authorAndrew V. Jones <andrewvaughanj@gmail.com>
Sat, 27 Mar 2021 19:12:28 +0000 (19:12 +0000)
committerGitHub <noreply@github.com>
Sat, 27 Mar 2021 19:12:28 +0000 (14:12 -0500)
As title; attempts to correct #6224.

Signed-off-by: Andrew V. Jones andrewvaughanj@gmail.com
cmake/FindANTLR3.cmake

index 2ca66ff0b67a7ddaa28424f4faeb9533c6345d08..58ba1cf65f4499bbbc8f0f63587275a48a2dab70 100644 (file)
@@ -95,7 +95,7 @@ if(NOT ANTLR3_FOUND_SYSTEM)
         BUILD_BYPRODUCTS <INSTALL_DIR>/lib/libantlr3c.a
     )
 
-    find_package(Java REQUIRED)
+    find_package(Java COMPONENTS Runtime REQUIRED)
     set(ANTLR3_BINARY ${Java_JAVA_EXECUTABLE}
         -cp "${DEPS_BASE}/share/java/antlr-3.4-complete.jar" org.antlr.Tool)
     set(ANTLR3_INCLUDE_DIR "${DEPS_BASE}/include/")