I thought this directive includes the necessary runtime libraries in my NSIS installer generated by CPack:
include(InstallRequiredSystemLibraries)
But it doesn't. When I install my application with this installer on another PC, it complains that mfc100.dll
is missing - it isn't included in the installer. Trying to set MFC linking to static leads to a myriad of errors when compiling, so this isn't an option.
Can I manually figure out the path where I can get mfc100.dll
from and copy it to the install directory in the CMake script, so that it will be included in the NSIS installer? Are there other options to include it?
The trick is to tell CPack to include them:
set(CMAKE_INSTALL_MFC_LIBRARIES ON)
include(InstallRequiredSystemLibraries)