mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +08:00
c867e68ca8
* Format manifest, make port version explicit * Use standard mingw import lib names * Choose either static or shared binaries * Insert macro for dynamic linkage * Add szip pc file * Quote path expressions * Port away from deprecated cmake functions * x-add-version * Begin of hdf5 changes * Remove obsolete variables (complements 23eadeae) * Fix indentation and quoting expressions * Handle single-linkage szip configuration * Use mingw import lib names for hdf5 * Move dependencies to Requires in pc file * Port away from deprecated cmake functions * x-add-version hdf5 * Apply szip review comments * Update version * Improve pkgconfig patch to handle lists * Update git-tree
48 lines
1.7 KiB
Diff
48 lines
1.7 KiB
Diff
diff -urN a/config/cmake/szip-config.cmake.in b/config/cmake/szip-config.cmake.in
|
|
--- a/config/cmake/szip-config.cmake.in 2017-01-09 16:14:35.000000000 +0100
|
|
+++ b/config/cmake/szip-config.cmake.in 2021-05-14 21:26:09.490134839 +0200
|
|
@@ -39,8 +39,13 @@
|
|
|
|
# Handle default component(static) :
|
|
if (NOT ${SZIP_PACKAGE_NAME}_FIND_COMPONENTS)
|
|
+ if(@BUILD_SHARED_LIBS@)
|
|
+ set (${SZIP_PACKAGE_NAME}_FIND_COMPONENTS shared)
|
|
+ set (${SZIP_PACKAGE_NAME}_FIND_REQUIRED_shared true)
|
|
+ else()
|
|
set (${SZIP_PACKAGE_NAME}_FIND_COMPONENTS static)
|
|
set (${SZIP_PACKAGE_NAME}_FIND_REQUIRED_static true)
|
|
+ endif()
|
|
endif ()
|
|
|
|
# Handle requested components:
|
|
diff -urN a/src/CMakeLists.txt b/src/CMakeLists.txt
|
|
--- a/src/CMakeLists.txt 2017-02-03 20:42:43.000000000 +0100
|
|
+++ b/src/CMakeLists.txt 2021-05-14 22:20:28.237632925 +0200
|
|
@@ -22,6 +22,7 @@
|
|
${SZIP_SRC_SOURCE_DIR}/szlib.h
|
|
)
|
|
|
|
+if(NOT BUILD_SHARED_LIBS)
|
|
add_library (${SZIP_LIB_TARGET} STATIC ${SZIP_SRCS} ${SZIP_PUBLIC_HEADERS})
|
|
#set_target_properties (${SZIP_LIB_TARGET}
|
|
# PROPERTIES
|
|
@@ -36,6 +37,7 @@
|
|
set_global_variable (SZIP_LIBRARIES_TO_EXPORT ${SZIP_LIB_TARGET})
|
|
SZIP_SET_LIB_OPTIONS (${SZIP_LIB_TARGET} ${SZIP_LIB_NAME} STATIC)
|
|
set (install_targets ${SZIP_LIB_TARGET})
|
|
+endif(NOT BUILD_SHARED_LIBS)
|
|
|
|
if (BUILD_SHARED_LIBS)
|
|
add_library (${SZIP_LIBSH_TARGET} SHARED ${SZIP_SRCS} ${SZIP_PUBLIC_HEADERS})
|
|
@@ -62,8 +64,9 @@
|
|
if (SZIP_EXPORTED_TARGETS)
|
|
if (BUILD_SHARED_LIBS)
|
|
INSTALL_TARGET_PDB (${SZIP_LIBSH_TARGET} ${SZIP_INSTALL_BIN_DIR} libraries)
|
|
- endif (BUILD_SHARED_LIBS)
|
|
+ else()
|
|
INSTALL_TARGET_PDB (${SZIP_LIB_TARGET} ${SZIP_INSTALL_BIN_DIR} libraries)
|
|
+ endif()
|
|
|
|
install (
|
|
TARGETS
|