diff options
Diffstat (limited to 'java/src/jni')
-rw-r--r-- | java/src/jni/CMakeLists.txt | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/java/src/jni/CMakeLists.txt b/java/src/jni/CMakeLists.txt index 21e9d22..a0228e1 100644 --- a/java/src/jni/CMakeLists.txt +++ b/java/src/jni/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_JAVA_JNI C CXX) +project (HDF5_JAVA_JNI C) set (HDF5_JAVA_JNI_CSRCS ${HDF5_JAVA_JNI_SOURCE_DIR}/exceptionImp.c @@ -44,13 +44,12 @@ set (HDF5_JAVA_JNI_CHDRS ${HDF5_JAVA_JNI_SOURCE_DIR}/nativeData.h ) -INCLUDE_DIRECTORIES( ${HDF5_JAVA_JNI_SOURCE_DIR} ) - 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_C_PROPERTIES (${HDF5_JAVA_JNI_LIB_TARGET} SHARED " " " ") +target_include_directories(${HDF5_JAVA_JNI_LIB_TARGET} PRIVATE ${HDF5_BINARY_DIR} ${HDF5_JAVA_JNI_SOURCE_DIR}) +TARGET_C_PROPERTIES (${HDF5_JAVA_JNI_LIB_TARGET} SHARED) target_link_libraries (${HDF5_JAVA_JNI_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET}) set_target_properties (${HDF5_JAVA_JNI_LIB_TARGET} PROPERTIES FOLDER libraries/jni) SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_JAVA_JNI_LIB_TARGET}") |