summaryrefslogtreecommitdiffstats
path: root/tools/lib/CMakeLists.txt
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2015-08-27 17:06:54 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2015-08-27 17:06:54 (GMT)
commitc365b9a59fb706f1943edf851586bb6f67688368 (patch)
tree2fbe7d176f9a36bc689a05b11451e8a59daf239b /tools/lib/CMakeLists.txt
parent3c5a088df0afced706a07c92df46494741a2c9ae (diff)
parenta9c28bac4e6822321c8a7a81784526201a2d6b09 (diff)
downloadhdf5-c365b9a59fb706f1943edf851586bb6f67688368.zip
hdf5-c365b9a59fb706f1943edf851586bb6f67688368.tar.gz
hdf5-c365b9a59fb706f1943edf851586bb6f67688368.tar.bz2
[svn-r27593] Merge revisions 27453 through 27592 from trunk to vds branch.
Tested: ummon
Diffstat (limited to 'tools/lib/CMakeLists.txt')
-rw-r--r--tools/lib/CMakeLists.txt36
1 files changed, 29 insertions, 7 deletions
diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt
index a103f3d..38c84a2 100644
--- a/tools/lib/CMakeLists.txt
+++ b/tools/lib/CMakeLists.txt
@@ -37,21 +37,43 @@ set (H5_TOOLS_LIB_HDRS
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5diff.h
)
-add_library (${HDF5_TOOLS_LIB_TARGET} ${LIB_TYPE} ${H5_TOOLS_LIB_SRCS} ${H5_TOOLS_LIB_HDRS})
-TARGET_C_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} ${LIB_TYPE} " " " ")
+add_library (${HDF5_TOOLS_LIB_TARGET} STATIC ${H5_TOOLS_LIB_SRCS} ${H5_TOOLS_LIB_HDRS})
+TARGET_C_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} STATIC " " " ")
target_link_libraries (${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
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}
- ${LIB_TYPE}
+ STATIC
HDF5_TOOLS_LIB_NAME_RELEASE
HDF5_TOOLS_LIB_NAME_DEBUG
)
-#set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES COMPILE_DEFINITIONS H5DIFF_DEBUG)
-set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES
+set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES
FOLDER libraries/tools
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
+#set_property (TARGET ${HDF5_TOOLS_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS H5DIFF_DEBUG)
+set (install_targets ${HDF5_TOOLS_LIB_TARGET})
+
+if (BUILD_SHARED_LIBS)
+ add_library (${HDF5_TOOLS_LIBSH_TARGET} SHARED ${H5_TOOLS_LIB_SRCS} ${H5_TOOLS_LIB_HDRS})
+ TARGET_C_PROPERTIES (${HDF5_TOOLS_LIBSH_TARGET} SHARED " " " ")
+ target_link_libraries (${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIBSH_TARGET}")
+ H5_SET_LIB_OPTIONS (
+ ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_TOOLS_LIB_NAME}
+ SHARED
+ HDF5_TOOLS_LIB_NAME_RELEASE
+ HDF5_TOOLS_LIB_NAME_DEBUG
+ )
+ set_target_properties (${HDF5_TOOLS_LIBSH_TARGET} PROPERTIES
+ FOLDER libraries/tools
+ COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB"
+ INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
+ )
+ #set_property (TARGET ${HDF5_TOOLS_LIBSH_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS H5DIFF_DEBUG)
+ set (install_targets ${install_targets} ${HDF5_TOOLS_LIBSH_TARGET})
+endif (BUILD_SHARED_LIBS)
##############################################################################
##############################################################################
@@ -76,12 +98,12 @@ install (
#-----------------------------------------------------------------------------
if (HDF5_EXPORTED_TARGETS)
if (BUILD_SHARED_LIBS)
- INSTALL_TARGET_PDB (${HDF5_TOOLS_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} toolslibraries)
+ INSTALL_TARGET_PDB (${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} toolslibraries)
endif (BUILD_SHARED_LIBS)
install (
TARGETS
- ${HDF5_TOOLS_LIB_TARGET}
+ ${install_targets}
EXPORT
${HDF5_EXPORTED_TARGETS}
LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT toolslibraries