diff --git a/Projects/patches/szip.config.cmake.SZIP-config.cmake.install.in b/Projects/patches/szip.config.cmake.SZIP-config.cmake.install.in
new file mode 100644
index 0000000000000000000000000000000000000000..f9363f5dff543ff65dc5a3c9c8886cb10c32a3cf
--- /dev/null
+++ b/Projects/patches/szip.config.cmake.SZIP-config.cmake.install.in
@@ -0,0 +1,48 @@
+#-----------------------------------------------------------------------------
+# SZIP Config file for compiling against SZIP install directory
+#-----------------------------------------------------------------------------
+
+GET_FILENAME_COMPONENT (SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+GET_FILENAME_COMPONENT(_IMPORT_PREFIX "${SELF_DIR}" PATH)
+GET_FILENAME_COMPONENT(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
+GET_FILENAME_COMPONENT(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
+
+SET (SZIP_INCLUDE_DIRS "${_IMPORT_PREFIX}/include")
+
+#-----------------------------------------------------------------------------
+# Version Strings
+#-----------------------------------------------------------------------------
+SET (SZIP_VERSION_STRING @SZIP_VERSION_STRING@)
+SET (SZIP_VERSION_MAJOR @SZIP_VERSION_MAJOR@)
+SET (SZIP_VERSION_MINOR @SZIP_VERSION_MINOR@)
+
+#-----------------------------------------------------------------------------
+# Don't include targets if this file is being picked up by another
+# project which has already build SZIP as a subproject
+#-----------------------------------------------------------------------------
+IF (NOT TARGET "SZIP")
+ INCLUDE (${SELF_DIR}/SZIP-targets.cmake)
+ SET (SZIP_LIBRARIES "@SZIP_LIBRARIES_TO_EXPORT@")
+ENDIF (NOT TARGET "SZIP")
+
+#-----------------------------------------------------------------------------
+# Unfinished
+#-----------------------------------------------------------------------------
+
+#
+# To be continued ...
+#
+# XXX_INCLUDE_DIRS The final set of include directories listed in one variable for use by client code. This should not be a cache entry.
+# XXX_LIBRARIES The libraries to link against to use XXX. These should include full paths. This should not be a cache entry.
+# XXX_DEFINITIONS Definitions to use when compiling code that uses XXX. This really shouldn't include options such as (-DHAS_JPEG)that a client source-code file uses to decide whether to #include
+# XXX_EXECUTABLE Where to find the XXX tool.
+# XXX_YYY_EXECUTABLE Where to find the YYY tool that comes with XXX.
+# XXX_LIBRARY_DIRS Optionally, the final set of library directories listed in one variable for use by client code. This should not be a cache entry.
+# XXX_ROOT_DIR Where to find the base directory of XXX.
+# XXX_VERSION_YY Expect Version YY if true. Make sure at most one of these is ever true.
+# XXX_WRAP_YY If False, do not try to use the relevent CMake wrapping command.
+# XXX_YY_FOUND If False, optional YY part of XXX sytem is not available.
+# XXX_FOUND Set to false, or undefined, if we haven't found, or don't want to use XXX.
+# XXX_RUNTIME_LIBRARY_DIRS Optionally, the runtime library search path for use when running an executable linked to shared libraries.
+# The list should be used by user code to create the PATH on windows or LD_LIBRARY_PATH on unix.
+# This should not be a cache entry.
diff --git a/Projects/win32/szip.cmake b/Projects/win32/szip.cmake
index e1082f48fac521ec45701f68c707f77a6a7f4d54..780efb4691819c6b1e802940c566fb7935115e09 100644
--- a/Projects/win32/szip.cmake
+++ b/Projects/win32/szip.cmake
@@ -9,6 +9,16 @@ add_external_project(szip
/src/CMakeLists.txt
)
+# This patch fixes the unnecessary installation rule for the cgns.dll which was incorrect
+# anyways when using MSVC (since the path didn't consider build configuration).
+add_external_project_step(szip-fix-szip-config
+ COMMENT "Fixing Windows install rules for CGNS tools"
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ ${SuperBuild_PROJECTS_DIR}/patches/szip.config.cmake.SZIP-config.cmake.install.in
+ /config/cmake/SZIP-config.cmake.install.in
+ DEPENDEES update
+ DEPENDERS patch)
+
# any project depending on szip, inherits these cmake variables
add_extra_cmake_args(
-DSZIP_LIBRARY:FILEPATH=/lib/szip.lib