Skip to content

Commit

Permalink
Error early on CMake when Java is built w/o shared (#571)
Browse files Browse the repository at this point in the history
  • Loading branch information
derobins authored Feb 20, 2024
1 parent ed45b86 commit 07cbe19
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -571,9 +571,13 @@ add_subdirectory (mfhdf)
# Option to build HDF4 Java Library
#-----------------------------------------------------------------------------
if (EXISTS "${HDF4_SOURCE_DIR}/java" AND IS_DIRECTORY "${HDF4_SOURCE_DIR}/java")
option (HDF4_BUILD_JAVA "Build Java HDF Library" OFF)
option (HDF4_BUILD_JAVA "Build Java HDF Library" OFF)
if (HDF4_BUILD_JAVA)
add_subdirectory (java)
if (NOT BUILD_SHARED_LIBS)
message (FATAL_ERROR "\nJava requires shared libraries!\n")
else ()
add_subdirectory (java)
endif ()
endif ()
endif ()

Expand Down

0 comments on commit 07cbe19

Please sign in to comment.