diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2023-03-14 01:37:36 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-14 01:37:36 (GMT) |
commit | 9a5bde57bd216a08d6a66c1702fd87a0b559fada (patch) | |
tree | b88114eae044446cd8a7b5d6a0bcf2383e0fa2e4 /c++ | |
parent | 1e8ce8767a991f269eb5101fbee700db03b09398 (diff) | |
download | hdf5-9a5bde57bd216a08d6a66c1702fd87a0b559fada.zip hdf5-9a5bde57bd216a08d6a66c1702fd87a0b559fada.tar.gz hdf5-9a5bde57bd216a08d6a66c1702fd87a0b559fada.tar.bz2 |
Make sure that ONLY_SHARED_LIBS option is correctly set (#2546)
Diffstat (limited to 'c++')
-rw-r--r-- | c++/src/CMakeLists.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt index b437457..656f4bf 100644 --- a/c++/src/CMakeLists.txt +++ b/c++/src/CMakeLists.txt @@ -77,7 +77,7 @@ set (CPP_HDRS ${HDF5_CPP_SRC_SOURCE_DIR}/H5VarLenType.h ) -if (NOT ONLY_SHARED_LIBS) +if (BUILD_STATIC_LIBS) add_library (${HDF5_CPP_LIB_TARGET} STATIC ${CPP_SOURCES} ${CPP_HDRS}) target_include_directories (${HDF5_CPP_LIB_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>" @@ -125,7 +125,7 @@ endif () # Add Target to clang-format #----------------------------------------------------------------------------- if (HDF5_ENABLE_FORMATTERS) - if (NOT ONLY_SHARED_LIBS) + if (BUILD_STATIC_LIBS) clang_format (HDF5_CPP_SRC_FORMAT ${HDF5_CPP_LIB_TARGET}) else () clang_format (HDF5_CPP_SRC_FORMAT ${HDF5_CPP_LIBSH_TARGET}) @@ -151,7 +151,7 @@ if (HDF5_EXPORTED_TARGETS) if (BUILD_SHARED_LIBS) INSTALL_TARGET_PDB (${HDF5_CPP_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} cpplibraries) endif () - if (NOT ONLY_SHARED_LIBS) + if (BUILD_STATIC_LIBS) INSTALL_TARGET_PDB (${HDF5_CPP_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} cpplibraries) endif () @@ -184,7 +184,7 @@ endif () set (_PKG_CONFIG_LIBS_PRIVATE) -if (NOT ONLY_SHARED_LIBS) +if (BUILD_STATIC_LIBS) set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${PKG_CONFIG_LIBNAME}") endif () if (BUILD_SHARED_LIBS) |