summaryrefslogtreecommitdiffstats
path: root/java/src/jni
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-12-13 20:10:30 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-12-13 20:10:38 (GMT)
commit248442eb00ec254bf632ddf6a0f62ed5f442a3f0 (patch)
tree49785a5ca63cebc42e41d8a0e6e16ef1a2a97c25 /java/src/jni
parent1dd81af5a28125a3a6c5e12f28e3c95458efb0f1 (diff)
downloadhdf5-248442eb00ec254bf632ddf6a0f62ed5f442a3f0.zip
hdf5-248442eb00ec254bf632ddf6a0f62ed5f442a3f0.tar.gz
hdf5-248442eb00ec254bf632ddf6a0f62ed5f442a3f0.tar.bz2
If MPI is enabled java will not compile because of include.
Diffstat (limited to 'java/src/jni')
-rw-r--r--java/src/jni/CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/java/src/jni/CMakeLists.txt b/java/src/jni/CMakeLists.txt
index 7b95e0b..50e76e1 100644
--- a/java/src/jni/CMakeLists.txt
+++ b/java/src/jni/CMakeLists.txt
@@ -48,7 +48,9 @@ set (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
########### JNI libraries always must be built shared ###############
add_library (${HDF5_JAVA_JNI_LIB_TARGET} SHARED ${HDF5_JAVA_JNI_CSRCS} ${HDF5_JAVA_JNI_CHDRS})
-target_include_directories(${HDF5_JAVA_JNI_LIB_TARGET} PRIVATE ${HDF5_BINARY_DIR} ${HDF5_JAVA_JNI_SOURCE_DIR})
+target_include_directories(${HDF5_JAVA_JNI_LIB_TARGET}
+ PRIVATE "${HDF5_BINARY_DIR};${HDF5_JAVA_JNI_SOURCE_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+)
TARGET_C_PROPERTIES (${HDF5_JAVA_JNI_LIB_TARGET} SHARED)
target_link_libraries (${HDF5_JAVA_JNI_LIB_TARGET} PUBLIC ${HDF5_LIBSH_TARGET})
set_target_properties (${HDF5_JAVA_JNI_LIB_TARGET} PROPERTIES FOLDER libraries/jni)