summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-07-27 17:50:58 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-07-27 17:50:58 (GMT)
commit3333acc05a6b3be7ed93c1291b7d4c69ed262f72 (patch)
tree7e618cad0faa94057b00a9a6d5b54d2d8e0dfe25 /tools/lib
parent3a6b7da5f338388d83036ec7f9c3d64c01ff8ed1 (diff)
downloadhdf5-3333acc05a6b3be7ed93c1291b7d4c69ed262f72.zip
hdf5-3333acc05a6b3be7ed93c1291b7d4c69ed262f72.tar.gz
hdf5-3333acc05a6b3be7ed93c1291b7d4c69ed262f72.tar.bz2
Merge of HDFFV-10845, 10529 from develop
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/CMakeLists.txt50
1 files changed, 21 insertions, 29 deletions
diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt
index a03b60a..75ed627 100644
--- a/tools/lib/CMakeLists.txt
+++ b/tools/lib/CMakeLists.txt
@@ -32,25 +32,27 @@ set (H5_TOOLS_LIB_HDRS
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5diff.h
)
-add_library (${HDF5_TOOLS_LIB_TARGET} STATIC ${H5_TOOLS_LIB_SOURCES} ${H5_TOOLS_LIB_HDRS})
-target_include_directories(${HDF5_TOOLS_LIB_TARGET}
- PRIVATE "${HDF5_TOOLS_LIB_SOURCE_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
- INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
-)
-#target_compile_definitions(${HDF5_TOOLS_LIB_TARGET} PRIVATE H5DIFF_DEBUG>)
-TARGET_C_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} STATIC)
-target_link_libraries (${HDF5_TOOLS_LIB_TARGET}
- PUBLIC ${HDF5_LIB_TARGET}
- PRIVATE "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>"
-)
-set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIB_TARGET}")
-H5_SET_LIB_OPTIONS (${HDF5_TOOLS_LIB_TARGET} ${HDF5_TOOLS_LIB_NAME} STATIC 0)
-set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES FOLDER libraries/tools)
-set (install_targets ${HDF5_TOOLS_LIB_TARGET})
+if (NOT ONLY_SHARED_LIBS)
+ add_library (${HDF5_TOOLS_LIB_TARGET} STATIC ${H5_TOOLS_LIB_SOURCES} ${H5_TOOLS_LIB_HDRS})
+ target_include_directories (${HDF5_TOOLS_LIB_TARGET}
+ PRIVATE "${HDF5_TOOLS_LIB_SOURCE_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ )
+ #target_compile_definitions(${HDF5_TOOLS_LIB_TARGET} PRIVATE H5DIFF_DEBUG>)
+ TARGET_C_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} STATIC)
+ target_link_libraries (${HDF5_TOOLS_LIB_TARGET}
+ PUBLIC ${HDF5_LIB_TARGET}
+ PRIVATE "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>"
+ )
+ set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIB_TARGET}")
+ H5_SET_LIB_OPTIONS (${HDF5_TOOLS_LIB_TARGET} ${HDF5_TOOLS_LIB_NAME} STATIC 0)
+ set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES FOLDER libraries/tools)
+ set (install_targets ${HDF5_TOOLS_LIB_TARGET})
+endif ()
if (BUILD_SHARED_LIBS)
add_library (${HDF5_TOOLS_LIBSH_TARGET} SHARED ${H5_TOOLS_LIB_SOURCES} ${H5_TOOLS_LIB_HDRS})
- target_include_directories(${HDF5_TOOLS_LIBSH_TARGET}
+ target_include_directories (${HDF5_TOOLS_LIBSH_TARGET}
PRIVATE "${HDF5_TOOLS_LIB_SOURCE_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
@@ -76,25 +78,15 @@ endif ()
##############################################################################
#-----------------------------------------------------------------------------
-# Add file(s) to CMake Install
-#-----------------------------------------------------------------------------
-install (
- FILES
- ${H5_TOOLS_LIB_HDRS}
- DESTINATION
- ${HDF5_INSTALL_INCLUDE_DIR}
- COMPONENT
- toolsheaders
-)
-
-#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
if (HDF5_EXPORTED_TARGETS)
if (BUILD_SHARED_LIBS)
INSTALL_TARGET_PDB (${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} toolslibraries)
endif ()
- INSTALL_TARGET_PDB (${HDF5_TOOLS_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} toolslibraries)
+ if (NOT ONLY_SHARED_LIBS)
+ INSTALL_TARGET_PDB (${HDF5_TOOLS_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} toolslibraries)
+ endif ()
install (
TARGETS