2013/9/13 Andreas Pakulat <ap...@gmx.de>: > Hi, > > I'm having a bit of an issue with the behaviour of the TGZ generator and > componentized packagings. The generation of the packages for the various > components works just fine, but unfortunately the contents are not as I'd > like them to be. > > It seems like the TGZ generator drops the 'common' prefix from the packages, > i.e. my packages have > > bin/foobar > lib/libfoobar.so > > in them, instead of > > mypackage-1.0.0-Linux32/bin/foobar > mypackage-1.0.0-Linux32/lib/libfoobar.so > > This is quite annoying extacting the packages pollutes a users system in a > way that makes it hard to remove the stuff again. Its also different from > the behaviour when disabling componentized packaging, there TGZ adds the > prefix just fine. > > I've tried avoiding this with CPACK_INCLUDE_TOPLEVEL_DIRECTORIES set to 1, > but that seems to make no difference. Am I overlooking something in the docs > of CMake/CPack that can be tuned to get the behaviour that I want?
Yes there is:CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY cpack --help-variable CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY I think that the default behavior for componentized packaging is not the same for "historical / backward compatibility" reason. so try cpack -G TGZ -D CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY=1 -- Erk L'élection n'est pas la démocratie -- http://www.le-message.org -- 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