summaryrefslogtreecommitdiffstats
path: root/Modules/FindJava.cmake
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2009-11-02 14:23:11 (GMT)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2009-11-02 14:23:11 (GMT)
commitff0ff689671d603ee3487e87bdc2b3ea03312967 (patch)
treea06b8125b33f3021613b2f7bae30b5b7fade7355 /Modules/FindJava.cmake
parentd4b8945301b52acf9f64cdd6f75757588fc223a0 (diff)
downloadCMake-ff0ff689671d603ee3487e87bdc2b3ea03312967.zip
CMake-ff0ff689671d603ee3487e87bdc2b3ea03312967.tar.gz
CMake-ff0ff689671d603ee3487e87bdc2b3ea03312967.tar.bz2
BUG: To be able to use ENV and at the same time allow /usr/loca/bin to override /usr/bin, apply patch suggested by Hendrik Sattler (thanks)
Diffstat (limited to 'Modules/FindJava.cmake')
-rw-r--r--Modules/FindJava.cmake11
1 files changed, 3 insertions, 8 deletions
diff --git a/Modules/FindJava.cmake b/Modules/FindJava.cmake
index b6cac88..af6e999 100644
--- a/Modules/FindJava.cmake
+++ b/Modules/FindJava.cmake
@@ -38,10 +38,8 @@ SET(JAVA_BIN_PATH
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.4;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.3;JavaHome]/bin"
$ENV{JAVA_HOME}/bin
- /usr/bin
/usr/lib/java/bin
/usr/share/java/bin
- /usr/local/bin
/usr/local/java/bin
/usr/local/java/share/bin
/usr/java/j2sdk1.4.2_04
@@ -52,8 +50,7 @@ SET(JAVA_BIN_PATH
)
FIND_PROGRAM(Java_JAVA_EXECUTABLE
NAMES java
- PATHS ${JAVA_BIN_PATH}
- NO_DEFAULT_PATH
+ HINTS ${JAVA_BIN_PATH}
)
IF(Java_JAVA_EXECUTABLE)
@@ -115,14 +112,12 @@ ENDIF(Java_JAVA_EXECUTABLE)
FIND_PROGRAM(Java_JAR_EXECUTABLE
NAMES jar
- PATHS ${JAVA_BIN_PATH}
- NO_DEFAULT_PATH
+ HINTS ${JAVA_BIN_PATH}
)
FIND_PROGRAM(Java_JAVAC_EXECUTABLE
NAMES javac
- PATHS ${JAVA_BIN_PATH}
- NO_DEFAULT_PATH
+ HINTS ${JAVA_BIN_PATH}
)
include(FindPackageHandleStandardArgs)