vcpkg/ports/hdf5/szip.patch
Kai Pastor c867e68ca8
[szip, hdf5] Fix mingw import lib names, control linkage (#17941)
* 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
2021-06-09 15:17:07 -07:00

17 lines
848 B
Diff

diff -urN a/CMakeFilters.cmake b/CMakeFilters.cmake
--- a/CMakeFilters.cmake 2021-05-15 19:07:48.160044927 +0200
+++ b/CMakeFilters.cmake 2021-05-15 19:22:56.993970332 +0200
@@ -104,7 +104,11 @@
find_package (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared)
if (NOT SZIP_FOUND)
find_package (SZIP) # Legacy find
- if (SZIP_FOUND)
+ if (DEFINED SZIP_SHARED_LIBRARY AND NOT DEFINED SZIP_STATIC_LIBRARY)
+ set (SZIP_STATIC_LIBRARY "${SZIP_SHARED_LIBRARY}")
+ elseif (DEFINED SZIP_STATIC_LIBRARY AND NOT DEFINED SZIP_SHARED_LIBRARY)
+ set (SZIP_SHARED_LIBRARY "${SZIP_STATIC_LIBRARY}")
+ elseif (SZIP_FOUND)
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_LIBRARIES})
set (LINK_COMP_SHARED_LIBS ${LINK_COMP_SHARED_LIBS} ${SZIP_LIBRARIES})
endif ()