[CMake] Don't show components page in NSIS installer (CPack)
Alexander Shaduri
ashaduri at gmail.com
Thu Feb 8 11:44:41 EST 2018
Hi,
I need to install only certain components, but avoid showing
the components page in cpack-generated NSIS installer.
I have:
# Only install the main program and vcredist.
set(CPACK_COMPONENTS_ALL core vcredist)
set(CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT "system_dlls")
# This installs dlls as "system_dlls" component and sets *MSVC* variables
include(InstallRequiredSystemLibraries)
install(PROGRAMS "${MSVC_REDIST_DIR}/vcredist_${CMAKE_MSVC_ARCH}.exe"
COMPONENT vcredist)
The main problem is that InstallRequiredSystemLibraries unconditionally
installs the dlls which should not be installed in case of NSIS.
However, I need to include it because it provides the vcredist
location.
So, using CPACK_COMPONENTS_ALL, I avoid installing "system_dlls"
component. However, NSIS installer shows a "Components" page which
should not be shown. So, is there any way to disable it?
So far I've only found CPACK_MONOLITHIC_INSTALL, but it causes
all the components to install.
Thanks,
Alexander
More information about the CMake
mailing list