diff options
author | Amit Kulkarni <amitkulz@gmail.com> | 2012-12-03 23:23:10 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-12-04 13:35:23 (GMT) |
commit | 6e7a3453b43897006cdd1b2587a3641fe3bd7731 (patch) | |
tree | b18634aa6ab08f3b7894d9fc9b75768cc43047fe /Modules | |
parent | 288f75edee99d6689f6651fe2ad00955d293d665 (diff) | |
download | CMake-6e7a3453b43897006cdd1b2587a3641fe3bd7731.zip CMake-6e7a3453b43897006cdd1b2587a3641fe3bd7731.tar.gz CMake-6e7a3453b43897006cdd1b2587a3641fe3bd7731.tar.bz2 |
OpenBSD: Add paths for Java 1.6.0/1.7.0 JRE/JDK
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeDetermineJavaCompiler.cmake | 2 | ||||
-rw-r--r-- | Modules/FindJNI.cmake | 9 | ||||
-rw-r--r-- | Modules/FindJava.cmake | 7 |
3 files changed, 18 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineJavaCompiler.cmake b/Modules/CMakeDetermineJavaCompiler.cmake index c4217f5..ae9f5fc 100644 --- a/Modules/CMakeDetermineJavaCompiler.cmake +++ b/Modules/CMakeDetermineJavaCompiler.cmake @@ -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) diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake index 0de3f79..9d708ca 100644 --- a/Modules/FindJNI.cmake +++ b/Modules/FindJNI.cmake @@ -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 diff --git a/Modules/FindJava.cmake b/Modules/FindJava.cmake index 1b4593d..2f02b7a 100644 --- a/Modules/FindJava.cmake +++ b/Modules/FindJava.cmake @@ -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") |