[Insight-users] Re: volview plugin DLL post-build
error (clarification)
Bill Hoffman
bill.hoffman at kitware.com
Thu Dec 6 12:12:19 EST 2007
Wes Turner wrote:
> Newer versions of the VS compiler are more touchy about this. If you
> are using VS 8, you may need to run the program vcredist.exe on the
> target machine. Check out your VS 8 installation directory under
> subdirectory SDK/v2.0/BootStrapper/Packages. Just look around until you
> find the version you need for your target installation.
>
There is a simpler way to do that, that does not require your users to
run an executable. If you copy the dll's and side-by-side manifest
files right next to your executable it will work. This is done now by
CVS CMake if you include InstallRequiredSystemLibraries.cmake. If you
want debug libraries you have to set CMAKE_INSTALL_DEBUG_LIBRARIES
before you include the file. You can do it by hand if you just copy
the files, here is the cmake code:
IF(MSVC80)
# Find the runtime library redistribution directory.
FIND_PATH(MSVC80_REDIST_DIR NAMES
x86/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest
PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0;InstallDir]/../../VC/redist"
)
MARK_AS_ADVANCED(MSVC80_REDIST_DIR)
SET(MSVC80_CRT_DIR "${MSVC80_REDIST_DIR}/x86/Microsoft.VC80.CRT")
# Install the manifest that allows DLLs to be loaded from the
# directory containing the executable.
SET(__install__libs
"${MSVC80_CRT_DIR}/Microsoft.VC80.CRT.manifest"
"${MSVC80_CRT_DIR}/msvcm80.dll"
"${MSVC80_CRT_DIR}/msvcp80.dll"
"${MSVC80_CRT_DIR}/msvcr80.dll"
)
IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
SET(MSVC80_CRT_DIR
"${MSVC80_REDIST_DIR}/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT")
SET(__install__libs ${__install__libs}
"${MSVC80_CRT_DIR}/Microsoft.VC80.DebugCRT.manifest"
"${MSVC80_CRT_DIR}/msvcm80d.dll"
"${MSVC80_CRT_DIR}/msvcp80d.dll"
"${MSVC80_CRT_DIR}/msvcr80d.dll"
)
ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
ENDIF(MSVC80)
-Bill
More information about the Insight-users
mailing list