Don't show components page in NSIS installer (CPack)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Don't show components page in NSIS installer (CPack)

Alexander Shaduri

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)


# This installs dlls as "system_dlls" component and sets *MSVC* variables

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

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.



Powered by

Please keep messages on-topic and check the CMake FAQ at:

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support:
CMake Consulting:
CMake Training Courses:

Visit other Kitware open-source projects at

Follow this link to subscribe/unsubscribe: