Eric Noulard skrev 2012-11-26 20:12:
2012/11/26 Thomas Nilsson <[email protected]>:

And I've fixed that, so now it actually packages the correct files.

But, next question ;-)

Now that I am using a relative (to CMAKE_INSTALL_PREFIX) installation
scheme, I'd also like to have my TGZ/TZ/ZIP package to work that way. But
the files in the .tgz have names starting with my application name (package
name) and then the default install path:

$ tar ztvf cgreen-1.0.0-beta3.tar.gz
-rwxr-xr-x Thomas/None   91772 2012-11-25 21:13
cgreen-1.0.0-beta3/usr/local/bin/cgreen-runner.exe
-rwxr-xr-x Thomas/None  187260 2012-11-25 21:13
cgreen-1.0.0-beta3/usr/local/bin/cygcgreen-1.dll
-rw-r--r-- Thomas/None    4552 2012-10-02 16:52
cgreen-1.0.0-beta3/usr/local/include/cgreen/assertions.h
-rw-r--r-- Thomas/None     659 2012-08-31 00:00
cgreen-1.0.0-beta3/usr/local/include/cgreen/breadcrumb.h
-rw-r--r-- Thomas/None     463 2012-08-15 19:20
cgreen-1.0.0-beta3/usr/local/include/cgreen/cdash_reporter.h
I guess the '/usr/local/include' should be from CPACK_SET_DESTDIR left over
to ON. You should now leave CPACK_SET_DESTDIR alone
(which leave the default OFF value).

Right you are!

The left over may came from a dirty build dir containing cached value,
the easiest way to get rid of it is to delete your build dir or at least
remove the CPackConfig.cmake        CPackSourceConfig.cmake
files in it.
So I'd like to lose the "cgreen-1.0.0-beta3/usr/local/" bit. I've hunted and
experimented with CPACK_INSTALL_PREFIX, CPACK_PACKAGE_INSTALL_DIRECTORY,
CPACK_PACKAGING_INSTALL_PREFIX, etc. etc. most of which are very poorly
documented.
Documentation improvement is a collaborative effort which sometimes
lag far behind our hopes  :-]

Did you try
cpack --help-variable CPACK_PACKAGE_INSTALL_DIRECTORY
I always forget about this...

I even found CPACK_TOPLEVEL_TAG which from the docs ("Directory
for the installed files") looked like it could have something to do with
this.
Your was nearly there,
try
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0)
Wonderful! That works!

Any assistance would be greatly appreciated!
Trying...
And succeeding! Thanks!

/Thomas
--

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

Reply via email to