Skip to content

Commit

Permalink
Prevent linking both static/shared libs
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjala committed Aug 30, 2023
1 parent bf7cd4c commit 01cfe79
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions CMakeVOL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,14 @@ if (HDF5_VOL_ALLOW_EXTERNAL)
message (FATAL_ERROR "HDF5_ALLOW_EXTERNAL_SUPPORT must be set to 'GIT' to allow building of external HDF5 VOL connectors")
endif ()

set (HDF5_LIB_TARGETS "")
set (HDF5_HL_LIB_TARGETS "")

if (BUILD_STATIC_LIBS)
list(APPEND HDF5_LIB_TARGETS ${HDF5_LIB_TARGET})
list(APPEND HDF5_HL_LIB_TARGETS ${HDF5_HL_LIB_TARGET})
endif()

if (BUILD_SHARED_LIBS)
list(APPEND HDF5_LIB_TARGETS ${HDF5_LIBSH_TARGET})
list(APPEND HDF5_HL_LIB_TARGETS ${HDF5_HL_LIBSH_TARGET})
set(HDF5_LIB_TARGETS ${HDF5_LIBSH_TARGET})
set(HDF5_HL_LIB_TARGETS ${HDF5_HL_LIBSH_TARGET})
else ()
if (BUILD_STATIC_LIBS)
set(HDF5_LIB_TARGETS ${HDF5_LIB_TARGET})
set(HDF5_HL_LIB_TARGETS ${HDF5_HL_LIB_TARGET})
endif()
endif()

# For compatibility, set some variables that projects would
Expand Down

0 comments on commit 01cfe79

Please sign in to comment.