<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>&nbsp;</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>&nbsp;</div>
<div>First is a simple program to be installed.</div>
<div>&nbsp;</div>
<div>----------------- prog1.cpp --------------------</div>
<div>#include &lt;iostream&gt;</div>
<div>#include &lt;conio.h&gt;</div>
<div>&nbsp;</div>
<div>int main()</div>
<div>{</div>
<div>&nbsp; std::cout &lt;&lt; &quot;prog1&quot; &lt;&lt; std::endl;</div>
<div>&nbsp; _getch();</div>
<div>&nbsp; return 0;</div>
<div>}</div>
<div>-----------------------------------------------</div>
<div>&nbsp;</div>
<div>and here is the CMakeLists.txt file</div>
<div>&nbsp;</div>
<div>------------------ CMakeLists.txt -------------------------</div>
<div>cmake_minimum_required( VERSION 2.8 )</div>
<div>project ( CompoTest )</div>
<div>&nbsp;</div>
<div>add_executable(prog1 prog1.cpp)</div>
<div>add_executable(prog2 prog2.cpp)</div>
<div>add_executable(prog3 prog3.cpp)</div>
<div>&nbsp;</div>
<div>install(TARGETS prog1</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RUNTIME DESTINATION bin</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COMPONENT compo1)</div>
<div>install(TARGETS prog2</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RUNTIME DESTINATION bin</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COMPONENT compo2)</div>
<div>install(TARGETS prog3</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RUNTIME DESTINATION bin</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COMPONENT compo3)</div>
<div>&nbsp;</div>
<div>set ( CPACK_PACKAGE_VERSION &quot;1.0.0&quot; )</div>
<div>&nbsp;</div>
<div>set(CPACK_PACKAGE_EXECUTABLES </div>
<div>&nbsp;&nbsp;&nbsp; prog1 &quot;prog 1&quot;</div>
<div>&nbsp;&nbsp;&nbsp; prog2 &quot;prog 2&quot;</div>
<div>&nbsp;&nbsp;&nbsp; prog3 &quot;prog 3&quot;</div>
<div>)</div>
<div>&nbsp;</div>
<div>set ( CPACK_COMPONENTS_ALL compo1 compo2 compo3 )</div>
<div>include (CPack)</div>
<div>--------------------------------------------------</div>
<div>&nbsp;</div>
<div>Is it possible to do this?</div>
<div>&nbsp;</div>
<div>Regards </div>
<div>Lars</div>
<div>&nbsp;</div>
</span></font>
</body>
</html>