2012/1/18 Andrea Crotti <andrea.crott...@gmail.com>: > Thanks for the feedback, > however I tried again with another cmake file, which should actually do > something.
May be you could zip up the sample project sources, this would be easier and safer for me if I want to be able to reproduce your issue. > What I would like to do is to: > - get the project name and a list of packages (just directories) to install > - install them somewhere (now the destination is not set correctly). > > Should this work in general? > > cmake_minimum_required(VERSION 2.6) > #TODO: should take from the python environment > > # setting variables from some known build generated files > # probably we can also pass options directly to CMake > file(STRINGS project_name.txt project_name) > file(STRINGS package_list.txt packages) > > project(${project_name}) > > # include can be used to add more configurations?? > > # # install all the given automatically > install( > DIRECTORY ${packages} > DESTINATION test_ddest > ) > > #TODO: how do I get the correct destination for windows? > > # now the packages variable should contain something > > # this include all the necessary > include(CPack) > > But I still get the same error using NSIS (works with TGZ): > > CPack: /build/src/cmake-2.8.7/Source/CPack/cpack.cxx:211 Enable Debug > /build/src/cmake-2.8.7/Source/CPack/cmCPackGenerator.cxx:1162 Looking for > CMAKE_ROOT: /usr/share/cmake-2.8 > /build/src/cmake-2.8.7/Source/CPack/cmCPackGenerator.cxx:941 > cmCPackNSISGenerator::SetOption(CMAKE_ROOT, /usr/share/cmake-2.8) > /build/src/cmake-2.8.7/Source/CPack/cmCPackGenerator.cxx:941 > cmCPackNSISGenerator::SetOption(CPACK_GENERATOR, NSIS) > /build/src/cmake-2.8.7/Source/CPack/cmCPackGenerator.cxx:1145 Warning, > GetOption return NULL for: CPACK_PROJECT_CONFIG_FILE > /build/src/cmake-2.8.7/Source/CPack/cmCPackGenerator.cxx:1145 Warning, > GetOption return NULL for: CPACK_INCLUDE_TOPLEVEL_DIRECTORY > /build/src/cmake-2.8.7/Source/CPack/cmCPackNSISGenerator.cxx:355 > cmCPackNSISGenerator::Initialize() > /build/src/cmake-2.8.7/Source/CPack/cmCPackGenerator.cxx:1145 Warning, > GetOption return NULL for: CPACK_TOPLEVEL_DIRECTORY > > terminate called after throwing an instance of 'std::logic_error' > what(): basic_string::_S_construct null not valid > aborted -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake