summaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4be86a9..31155a2 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -881,7 +881,7 @@ set (gen_SRCS ${HDF5_BINARY_DIR}/H5Tinit.c ${HDF5_BINARY_DIR}/H5lib_settings.c)
add_library (${HDF5_LIB_TARGET} STATIC ${common_SRCS} ${gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS})
TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} STATIC " " " ")
-target_link_libraries (${HDF5_LIB_TARGET} PUBLIC ${LINK_LIBS})
+target_link_libraries (${HDF5_LIB_TARGET} PRIVATE ${LINK_LIBS} ${LINK_COMP_LIBS})
if (NOT WIN32)
target_link_libraries (${HDF5_LIB_TARGET} PUBLIC dl)
endif ()
@@ -925,7 +925,7 @@ if (BUILD_SHARED_LIBS)
set (shared_gen_SRCS ${HDF5_BINARY_DIR}/shared/H5Tinit.c ${HDF5_BINARY_DIR}/shared/H5lib_settings.c)
add_library (${HDF5_LIBSH_TARGET} SHARED ${common_SRCS} ${shared_gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS})
TARGET_C_PROPERTIES (${HDF5_LIBSH_TARGET} SHARED " " " ")
- target_link_libraries (${HDF5_LIBSH_TARGET} PUBLIC ${LINK_SHARED_LIBS})
+ target_link_libraries (${HDF5_LIBSH_TARGET} PRIVATE ${LINK_LIBS} ${LINK_COMP_LIBS})
if (NOT WIN32)
target_link_libraries (${HDF5_LIBSH_TARGET} PUBLIC dl)
endif ()