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

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -