summaryrefslogtreecommitdiffstats
path: root/java/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'java/CMakeLists.txt')
-rw-r--r--java/CMakeLists.txt24
1 files changed, 11 insertions, 13 deletions
diff --git a/java/CMakeLists.txt b/java/CMakeLists.txt
index 0440d41..706b196 100644
--- a/java/CMakeLists.txt
+++ b/java/CMakeLists.txt
@@ -13,6 +13,12 @@ find_package (JNI)
INCLUDE_DIRECTORIES ( ${JNI_INCLUDE_DIRS} )
+if (WIN32)
+ set (HDF_JRE_DIRECTORY "C:/Program Files/Java/jre8")
+else (WIN32)
+ set (HDF_JRE_DIRECTORY "/usr/lib/jvm/jre")
+endif (WIN32)
+
#-----------------------------------------------------------------------------
# Include the main src and config directories
#-----------------------------------------------------------------------------
@@ -61,17 +67,9 @@ install (
#-----------------------------------------------------------------------------
option (HDF5_JAVA_PACK_JRE "Package a JRE installer directory" OFF)
if (HDF5_JAVA_PACK_JRE)
- if (WIN32)
- install (
- DIRECTORY "C:/Program Files/Java/jre8"
- DESTINATION ${HDF5_INSTALL_BIN_DIR}
- USE_SOURCE_PERMISSIONS
- )
- else (WIN32)
- install (
- DIRECTORY "/usr/lib/jvm/jre"
- DESTINATION ${HDF5_INSTALL_BIN_DIR}
- USE_SOURCE_PERMISSIONS
- )
- endif (WIN32)
+ install (
+ DIRECTORY ${HDF_JRE_DIRECTORY}
+ DESTINATION ${HDF5_INSTALL_BIN_DIR}
+ USE_SOURCE_PERMISSIONS
+ )
endif (HDF5_JAVA_PACK_JRE)