<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri" size="2"><span style="font-size:11pt;">
<div>Hi,</div>
<div> </div>
<div>This is on windows XP or 7, I want to use cmake, cpack and nsoi and create an installer for some programs. </div>
<div>In the installer I select which programs to install and selected programs shall show up in the start menu as shortcuts. </div>
<div>Here is a simple try that is incorrect. </div>
<div>Have done one component for each program, is this the best way to organize things? </div>
<div>But can't figure out how to generate the start-menu variable depending on what programs is selected to install</div>
<div>Now all program shortcuts is always in the menu even if they are not selected to be installed. </div>
<div> </div>
<div>First is a simple program to be installed.</div>
<div> </div>
<div>----------------- prog1.cpp --------------------</div>
<div>#include <iostream></div>
<div>#include <conio.h></div>
<div> </div>
<div>int main()</div>
<div>{</div>
<div> std::cout << "prog1" << std::endl;</div>
<div> _getch();</div>
<div> return 0;</div>
<div>}</div>
<div>-----------------------------------------------</div>
<div> </div>
<div>and here is the CMakeLists.txt file</div>
<div> </div>
<div>------------------ CMakeLists.txt -------------------------</div>
<div>cmake_minimum_required( VERSION 2.8 )</div>
<div>project ( CompoTest )</div>
<div> </div>
<div>add_executable(prog1 prog1.cpp)</div>
<div>add_executable(prog2 prog2.cpp)</div>
<div>add_executable(prog3 prog3.cpp)</div>
<div> </div>
<div>install(TARGETS prog1</div>
<div> RUNTIME DESTINATION bin</div>
<div> COMPONENT compo1)</div>
<div>install(TARGETS prog2</div>
<div> RUNTIME DESTINATION bin</div>
<div> COMPONENT compo2)</div>
<div>install(TARGETS prog3</div>
<div> RUNTIME DESTINATION bin</div>
<div> COMPONENT compo3)</div>
<div> </div>
<div>set ( CPACK_PACKAGE_VERSION "1.0.0" )</div>
<div> </div>
<div>set(CPACK_PACKAGE_EXECUTABLES </div>
<div> prog1 "prog 1"</div>
<div> prog2 "prog 2"</div>
<div> prog3 "prog 3"</div>
<div>)</div>
<div> </div>
<div>set ( CPACK_COMPONENTS_ALL compo1 compo2 compo3 )</div>
<div>include (CPack)</div>
<div>--------------------------------------------------</div>
<div> </div>
<div>Is it possible to do this?</div>
<div> </div>
<div>Regards </div>
<div>Lars</div>
<div> </div>
</span></font>
</body>
</html>