Hi,

This is on windows XP or 7, I want to use cmake, cpack and nsoi and create an 
installer for some programs.
In the installer I select which programs to install and selected programs shall 
show up in the start menu as shortcuts.
Here is a simple try that is incorrect.
Have done one component for each program, is this the best way to organize 
things?
But can't figure out how to generate the start-menu variable depending on what 
programs is selected to install
Now all program shortcuts is always in the menu even if they are not selected 
to be installed.

First is a simple program to be installed.

----------------- prog1.cpp --------------------
#include <iostream>
#include <conio.h>

int main()
{
  std::cout << "prog1" << std::endl;
  _getch();
  return 0;
}
-----------------------------------------------

and here is the CMakeLists.txt file

------------------ CMakeLists.txt -------------------------
cmake_minimum_required( VERSION 2.8 )
project ( CompoTest )

add_executable(prog1 prog1.cpp)
add_executable(prog2 prog2.cpp)
add_executable(prog3 prog3.cpp)

install(TARGETS prog1
        RUNTIME DESTINATION bin
        COMPONENT compo1)
install(TARGETS prog2
        RUNTIME DESTINATION bin
        COMPONENT compo2)
install(TARGETS prog3
        RUNTIME DESTINATION bin
        COMPONENT compo3)

set ( CPACK_PACKAGE_VERSION "1.0.0" )

set(CPACK_PACKAGE_EXECUTABLES
    prog1 "prog 1"
    prog2 "prog 2"
    prog3 "prog 3"
)

set ( CPACK_COMPONENTS_ALL compo1 compo2 compo3 )
include (CPack)
--------------------------------------------------

Is it possible to do this?

Regards
Lars

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

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

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to