mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-21 14:57:49 +08:00
114 lines
4.8 KiB
Diff
114 lines
4.8 KiB
Diff
--- a/hl/src/CMakeLists.txt Thu Apr 13 18:26:10 2017
|
|
+++ b/hl/src/CMakeLists.txt Wed Jan 03 13:13:06 2018
|
|
@@ -29,16 +29,20 @@
|
|
${HDF5_HL_SRC_SOURCE_DIR}/hdf5_hl.h
|
|
)
|
|
|
|
-add_library (${HDF5_HL_LIB_TARGET} STATIC ${HL_SOURCES} ${HL_HEADERS})
|
|
-TARGET_C_PROPERTIES (${HDF5_HL_LIB_TARGET} STATIC " " " ")
|
|
-target_link_libraries (${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
|
|
-H5_SET_LIB_OPTIONS (${HDF5_HL_LIB_TARGET} ${HDF5_HL_LIB_NAME} STATIC)
|
|
-set_target_properties (${HDF5_HL_LIB_TARGET} PROPERTIES
|
|
- FOLDER libraries/hl
|
|
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
|
|
-)
|
|
-set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_LIB_TARGET}")
|
|
-set (install_targets ${HDF5_HL_LIB_TARGET})
|
|
+set (install_targets)
|
|
+
|
|
+if (NOT DISABLE_STATIC_LIBS)
|
|
+ add_library (${HDF5_HL_LIB_TARGET} STATIC ${HL_SOURCES} ${HL_HEADERS})
|
|
+ TARGET_C_PROPERTIES (${HDF5_HL_LIB_TARGET} STATIC " " " ")
|
|
+ target_link_libraries (${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
|
|
+ H5_SET_LIB_OPTIONS (${HDF5_HL_LIB_TARGET} ${HDF5_HL_LIB_NAME} STATIC)
|
|
+ set_target_properties (${HDF5_HL_LIB_TARGET} PROPERTIES
|
|
+ FOLDER libraries/hl
|
|
+ INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
|
|
+ )
|
|
+ set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_LIB_TARGET}")
|
|
+ set (install_targets ${HDF5_HL_LIB_TARGET})
|
|
+endif ()
|
|
|
|
if (BUILD_SHARED_LIBS)
|
|
add_library (${HDF5_HL_LIBSH_TARGET} SHARED ${HL_SOURCES} ${HL_HEADERS})
|
|
@@ -73,8 +77,9 @@
|
|
if (HDF5_EXPORTED_TARGETS)
|
|
if (BUILD_SHARED_LIBS)
|
|
INSTALL_TARGET_PDB (${HDF5_HL_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hllibraries)
|
|
+ else ()
|
|
+ INSTALL_TARGET_PDB (${HDF5_HL_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hllibraries)
|
|
endif ()
|
|
- INSTALL_TARGET_PDB (${HDF5_HL_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hllibraries)
|
|
|
|
install (
|
|
TARGETS
|
|
--- a/src/CMakeLists.txt Thu Apr 13 18:26:11 2017
|
|
+++ b/src/CMakeLists.txt Wed Jan 03 13:03:05 2018
|
|
@@ -876,30 +876,33 @@
|
|
#-----------------------------------------------------------------------------
|
|
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} ${LINK_LIBS})
|
|
-if (NOT WIN32)
|
|
- target_link_libraries (${HDF5_LIB_TARGET} dl)
|
|
-endif ()
|
|
-if (H5_HAVE_PARALLEL AND MPI_C_FOUND)
|
|
- target_link_libraries (${HDF5_LIB_TARGET} ${MPI_C_LIBRARIES})
|
|
-endif ()
|
|
-set_global_variable (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET})
|
|
-H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} STATIC)
|
|
-set_target_properties (${HDF5_LIB_TARGET} PROPERTIES
|
|
- FOLDER libraries
|
|
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
|
|
-)
|
|
-
|
|
-option (HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF)
|
|
-if (HDF5_ENABLE_DEBUG_APIS)
|
|
+set (install_targets)
|
|
+if (NOT DISABLE_STATIC_LIBS)
|
|
+ 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} ${LINK_LIBS})
|
|
+ if (NOT WIN32)
|
|
+ target_link_libraries (${HDF5_LIB_TARGET} dl)
|
|
+ endif ()
|
|
+ if (H5_HAVE_PARALLEL AND MPI_C_FOUND)
|
|
+ target_link_libraries (${HDF5_LIB_TARGET} ${MPI_C_LIBRARIES})
|
|
+ endif ()
|
|
+ set_global_variable (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET})
|
|
+ H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} STATIC)
|
|
set_target_properties (${HDF5_LIB_TARGET} PROPERTIES
|
|
- COMPILE_DEFINITIONS
|
|
- "H5Z_DEBUG;H5T_DEBUG;H5ST_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5D_DEBUG;H5B2_DEBUG;H5AC_DEBUG"
|
|
+ FOLDER libraries
|
|
+ INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
|
|
)
|
|
+
|
|
+ option (HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF)
|
|
+ if (HDF5_ENABLE_DEBUG_APIS)
|
|
+ set_target_properties (${HDF5_LIB_TARGET} PROPERTIES
|
|
+ COMPILE_DEFINITIONS
|
|
+ "H5Z_DEBUG;H5T_DEBUG;H5ST_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5D_DEBUG;H5B2_DEBUG;H5AC_DEBUG"
|
|
+ )
|
|
+ endif ()
|
|
+ set (install_targets ${HDF5_LIB_TARGET})
|
|
endif ()
|
|
-set (install_targets ${HDF5_LIB_TARGET})
|
|
|
|
if (BUILD_SHARED_LIBS)
|
|
file (MAKE_DIRECTORY "${HDF5_BINARY_DIR}/shared")
|
|
@@ -975,8 +978,10 @@
|
|
if (HDF5_EXPORTED_TARGETS)
|
|
if (BUILD_SHARED_LIBS)
|
|
INSTALL_TARGET_PDB (${HDF5_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} libraries)
|
|
+ else ()
|
|
+ INSTALL_TARGET_PDB (${HDF5_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} libraries)
|
|
endif ()
|
|
- INSTALL_TARGET_PDB (${HDF5_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} libraries)
|
|
+
|
|
|
|
install (
|
|
TARGETS
|