summaryrefslogtreecommitdiffstats
path: root/hl/c++
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2023-03-13 21:24:49 (GMT)
committerGitHub <noreply@github.com>2023-03-13 21:24:49 (GMT)
commitcb679af19d170982f522f57beaf72888da324105 (patch)
treefbefdae6dafa450fe799841c1c881b813569fcf0 /hl/c++
parent3d8dc012a4353336652479541388b8530accb11c (diff)
downloadhdf5-cb679af19d170982f522f57beaf72888da324105.zip
hdf5-cb679af19d170982f522f57beaf72888da324105.tar.gz
hdf5-cb679af19d170982f522f57beaf72888da324105.tar.bz2
Make sure that ONLY_SHARED_LIBS option is correctly set (#2544)
Diffstat (limited to 'hl/c++')
-rw-r--r--hl/c++/src/CMakeLists.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt
index 5e1db57..c6e43c0 100644
--- a/hl/c++/src/CMakeLists.txt
+++ b/hl/c++/src/CMakeLists.txt
@@ -8,7 +8,7 @@ project (HDF5_HL_CPP_SRC CXX)
set (HDF5_HL_CPP_SOURCES ${HDF5_HL_CPP_SRC_SOURCE_DIR}/H5PacketTable.cpp)
set (HDF5_HL_CPP_HDRS ${HDF5_HL_CPP_SRC_SOURCE_DIR}/H5PacketTable.h)
-if (NOT ONLY_SHARED_LIBS)
+if (BUILD_STATIC_LIBS)
add_library (${HDF5_HL_CPP_LIB_TARGET} STATIC ${HDF5_HL_CPP_SOURCES} ${HDF5_HL_CPP_HDRS})
target_include_directories (${HDF5_HL_CPP_LIB_TARGET}
PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
@@ -43,7 +43,7 @@ endif ()
# Add Target to clang-format
#-----------------------------------------------------------------------------
if (HDF5_ENABLE_FORMATTERS)
- if (NOT ONLY_SHARED_LIBS)
+ if (BUILD_STATIC_LIBS)
clang_format (HDF5_HL_CPP_SRC_FORMAT ${HDF5_HL_CPP_LIB_TARGET})
else ()
clang_format (HDF5_HL_CPP_SRC_FORMAT ${HDF5_HL_CPP_LIBSH_TARGET})
@@ -69,7 +69,7 @@ if (HDF5_EXPORTED_TARGETS)
if (BUILD_SHARED_LIBS)
INSTALL_TARGET_PDB (${HDF5_HL_CPP_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hlcpplibraries)
endif ()
- if (NOT ONLY_SHARED_LIBS)
+ if (BUILD_STATIC_LIBS)
INSTALL_TARGET_PDB (${HDF5_HL_CPP_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} hlcpplibraries)
endif ()
@@ -102,7 +102,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)