windows - Can CMake/CPack generate multiple NSIS installers for a single project? -
i have single project (with sub-projects) generate multiple nsis installer executables, instead of having multiple components listed in single nsis installer. possible? or need organize code separate projects?
one provide cmake attribute e.g. component can set value predefined set of package names like: component_1|component_2|...component_x
the package name name not correspond single component name set of components added in cpack_components_all. if component equal all_components value of cpack_components_all contain possible components.
the cmake packaging:
if (win32) set (cpack_components_all ${component}) set (cpack_package_name ${component}) set (cpack_component_${component}_display_name "${component}") set (cpack_component_${component}_description "${component}") set (cpack_nsis_display_name "${component}") set (cpack_nsis_package_name "${component}") set (cpack_nsis_install_root "c:") set (cpack_generator nsis) else() ... endif() to create installer each component run example:
cmake -component=component_1 ../ nmake package cmake -component=component_2 ../ nmake package ... cmake -component=component_x ../ nmake package bear in mind since binaries build on first execution of nmake package, subsequent calls cmake , nmake package re-configure packaging , build requested component(aka component)
Comments
Post a Comment