Commit 6e7a3453 authored by Amit Kulkarni's avatar Amit Kulkarni Committed by Brad King

OpenBSD: Add paths for Java 1.6.0/1.7.0 JRE/JDK

parent 288f75ed
......@@ -63,6 +63,8 @@ if(NOT CMAKE_Java_COMPILER)
/usr/java/j2sdk1.4.2_09/bin
/usr/lib/j2sdk1.5-sun/bin
/opt/sun-jdk-1.5.0.04/bin
/usr/local/jdk-1.7.0/bin
/usr/local/jdk-1.6.0/bin
)
# if no compiler has been specified yet, then look for one
if(CMAKE_Java_COMPILER_INIT)
......
......@@ -120,6 +120,11 @@ JAVA_APPEND_LIBRARY_DIRECTORIES(JAVA_AWT_LIBRARY_DIRECTORIES
/usr/lib/jvm/default-java/jre/lib/{libarch}
/usr/lib/jvm/default-java/jre/lib
/usr/lib/jvm/default-java/lib
# OpenBSD specific paths for default JVM
/usr/local/jdk-1.7.0/jre/lib/{libarch}
/usr/local/jre-1.7.0/lib/{libarch}
/usr/local/jdk-1.6.0/jre/lib/{libarch}
/usr/local/jre-1.6.0/lib/{libarch}
)
set(JAVA_JVM_LIBRARY_DIRECTORIES)
......@@ -153,6 +158,9 @@ set(JAVA_AWT_INCLUDE_DIRECTORIES
/opt/sun-jdk-1.5.0.04/include
# Debian specific path for default JVM
/usr/lib/jvm/default-java/include
# OpenBSD specific path for default JVM
/usr/local/jdk-1.7.0/include
/usr/local/jdk-1.6.0/include
)
foreach(JAVA_PROG "${JAVA_RUNTIME}" "${JAVA_COMPILE}" "${JAVA_ARCHIVE}")
......@@ -227,6 +235,7 @@ find_path(JAVA_INCLUDE_PATH2 jni_md.h
${JAVA_INCLUDE_PATH}/win32
${JAVA_INCLUDE_PATH}/linux
${JAVA_INCLUDE_PATH}/freebsd
${JAVA_INCLUDE_PATH}/openbsd
${JAVA_INCLUDE_PATH}/solaris
${JAVA_INCLUDE_PATH}/hp-ux
${JAVA_INCLUDE_PATH}/alpha
......
......@@ -80,6 +80,8 @@ set(_JAVA_PATHS
/usr/java/j2sdk1.4.2_09/bin
/usr/lib/j2sdk1.5-sun/bin
/opt/sun-jdk-1.5.0.04/bin
/usr/local/jdk-1.7.0/bin
/usr/local/jdk-1.6.0/bin
)
find_program(Java_JAVA_EXECUTABLE
NAMES java
......@@ -107,6 +109,7 @@ if(Java_JAVA_EXECUTABLE)
# 2. OpenJDK 1.6
# 3. GCJ 1.5
# 4. Kaffe 1.4.2
# 5. OpenJDK 1.7.x on OpenBSD
if(var MATCHES "java version \"[0-9]+\\.[0-9]+\\.[0-9_.]+.*\".*")
# This is most likely Sun / OpenJDK, or maybe GCJ-java compat layer
string( REGEX REPLACE ".* version \"([0-9]+\\.[0-9]+\\.[0-9_.]+.*)\".*"
......@@ -115,6 +118,10 @@ if(Java_JAVA_EXECUTABLE)
# Kaffe style
string( REGEX REPLACE "java full version \"kaffe-([0-9]+\\.[0-9]+\\.[0-9_]+).*"
"\\1" Java_VERSION_STRING "${var}" )
elseif(var MATCHES "openjdk version \"[0-9]+\\.[0-9]+\\.[0-9_]+\".*")
# OpenJDK ver 1.7.x on OpenBSD
string( REGEX REPLACE "openjdk version \"([0-9]+\\.[0-9]+\\.[0-9_]+).*"
"\\1" Java_VERSION_STRING "${var}" )
else()
if(NOT Java_FIND_QUIETLY)
message(WARNING "regex not supported: ${var}. Please report")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment