summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-12-13 21:15:48 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-12-13 21:15:48 (GMT)
commitd88040edb37961fd4e68178fbc93578bd680b449 (patch)
treeee57633d9f7692674932d2916d38ece7dea210c8
parentc1eca48305f2676a12bff5cadfb2327e770bc017 (diff)
parent248442eb00ec254bf632ddf6a0f62ed5f442a3f0 (diff)
downloadhdf5-d88040edb37961fd4e68178fbc93578bd680b449.zip
hdf5-d88040edb37961fd4e68178fbc93578bd680b449.tar.gz
hdf5-d88040edb37961fd4e68178fbc93578bd680b449.tar.bz2
Merge pull request #1374 in HDFFV/hdf5 from ~BYRN/hdf5_merge_adb:develop to develop
* commit '248442eb00ec254bf632ddf6a0f62ed5f442a3f0': If MPI is enabled java will not compile because of include.
-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)