Do not force manifest selection for vtkhdf5 libraries

Following e16fac17, hdf5 libraries are build with -D_BIND_TO_CURRENT_VCLIBS_VERSION=1.

When building VTK using VS2008, the result of this is that
(1) VTK libraries all reference "9.0.21022.8" manifest expect the hdf5
ones that reference "9.0.30729.1" and (2) in some case prevent application
built against VTK from starting.

The problem can also be detected when running CMakeVerifyManifest.cmake
against the application install tree. It basically returns a message
similar to the following one:

8<----8<----8<----8<----8<----8<----8<----
ERROR: C:/Program Files/AwesomeApp 1.0.0/bin/vtkhdf5_hl-6.2.dll uses 9.0.30729.6161 not found in shipped manifests:[9.0.21022.8].
CMake Error at C:/D/Support/cmake-3.2.2-win32-x86/share/cmake-3.2/Modules/CMakeVerifyManifest.cmake:118 (message):
  This distribution embeds dll versions that it does not ship, and may not
  work on other machines.
8<----8<----8<----8<----8<----8<----8<----

Here are some more information copied from the convenience script allowing
to patch the manifest from VS2008.

Source:  https://gist.github.com/jcfr/3c7bef3f8b32f9f6ad4b

8<----8<----8<----8<----8<----8<----8<----8<----

.SYNOPSIS
    Patch manifests in the redist folder of Visual Studio 9 (2008)
.DESCRIPTION
    To avoid the dll hell associated with runtime libraries distribution. There are
    two approaches:
     (1) edit the manifest file to have "9.0.21022.8" from the "9.0.30729.XXX" that is there, you "trick"
         your executable into using the newer dlls.  There appears to be no ill effects from this.
         The executables work, and you are using a newer version of the run time library.
     (2) add -D_BIND_TO_CURRENT_VCLIBS=1 to ALL files being compiled, then all of your executable files
         and dll files will refer to "9.0.30729.XXX" and you can use the redist files without any edits.
         However, you have to be careful here to recompile everything with this.  By default the compiler
         will build for "9.0.21022.8".

    This script will consider approach (1). If not already done, this script will first backup the
    manifest files and then patch them.

    See:
      * http://www.kitware.com/blog/home/post/4
      * http://stackoverflow.com/questions/8097733/how-to-distribute-c-run-time-crt-libraries

8<----8<----8<----8<----8<----8<----8<----8<----
parent 922d08c0
......@@ -353,7 +353,6 @@ set (EXE_EXT "")
if (WIN32)
set (EXE_EXT ".exe")
if (NOT CYGWIN)
add_definitions (-D_BIND_TO_CURRENT_VCLIBS_VERSION=1)
add_definitions (-D_CRT_SECURE_NO_WARNINGS)
add_definitions (-D_CONSOLE)
endif (NOT CYGWIN)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment