<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">Eric Noulard skrev 2012-11-26 19:43:<br>
<br>
<snip>
</div>
<br>
<blockquote
cite="mid:CAPASGLqwdKy3xzNY25PPNnDPWRCzns+K6mCzXb24MKbkbFQ75Q@mail.gmail.com"
type="cite">
<blockquote type="cite">
<pre wrap="">But my real problem is then that I can't get CPack to work without
CPACK_SET_DESTDIR.
My (inherited) CMakeList.txt:s does specify
set(CMAKE_INSTALL_PREFIX /usr/local)
but also things like
install(... DESTINATION ${BIN_INSTALL_DIR} ...)
set(BIN_INSTALL_DIR ${EXEC_INSTALL_PREFIX}/bin)
set(EXEC_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
I am starting to suspect that the expansion of this binds all install
targets to the absolute path in CMAKE_INSTALL_PREFIX. And that it instead
should be something like
install(... DESTINATION ${BIN_INSTALL_DIR} ...)
set(BIN_INSTALL_DIR bin)
</pre>
</blockquote>
<pre wrap="">
Precisely!!
But I doubt the order of definition of your vars is the good one:
set(BIN_INSTALL_DIR bin)
install(... DESTINATION ${BIN_INSTALL_DIR} ...)
should be the good one.</pre>
</blockquote>
<br>
It actually is, so I'm good there ;-)<br>
<br>
<blockquote
cite="mid:CAPASGLqwdKy3xzNY25PPNnDPWRCzns+K6mCzXb24MKbkbFQ75Q@mail.gmail.com"
type="cite">
<pre wrap="">The baseline is
"Do not use absolute prefix to install(... DESTINATION ...)
unless you really want to put something in absolute place"
(like /etc/what/ever.conf)
</pre>
</blockquote>
And I've fixed that, so now it actually packages the correct files.<br>
<br>
But, next question ;-)<br>
<br>
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:<br>
<br>
<tt>$ tar ztvf cgreen-1.0.0-beta3.tar.gz</tt><tt><br>
</tt><tt>-rwxr-xr-x Thomas/None 91772 2012-11-25 21:13
cgreen-1.0.0-beta3/usr/local/bin/cgreen-runner.exe</tt><tt><br>
</tt><tt>-rwxr-xr-x Thomas/None 187260 2012-11-25 21:13
cgreen-1.0.0-beta3/usr/local/bin/cygcgreen-1.dll</tt><tt><br>
</tt><tt>-rw-r--r-- Thomas/None 4552 2012-10-02 16:52
cgreen-1.0.0-beta3/usr/local/include/cgreen/assertions.h</tt><tt><br>
</tt><tt>-rw-r--r-- Thomas/None 659 2012-08-31 00:00
cgreen-1.0.0-beta3/usr/local/include/cgreen/breadcrumb.h</tt><tt><br>
</tt><tt>-rw-r--r-- Thomas/None 463 2012-08-15 19:20
cgreen-1.0.0-beta3/usr/local/include/cgreen/cdash_reporter.h</tt><br>
<br>
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. I even found
CPACK_TOPLEVEL_TAG which from the docs ("<span style="color: rgb(0,
0, 0); font-size: 11px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: 22px;
orphans: 2; text-align: justify; text-indent: 0px; text-transform:
none; white-space: normal; widows: 2; word-spacing: 0px;
background-color: rgb(255, 255, 255); display: inline ! important;
float: none;">Directory for the installed files</span>") looked
like it could have something to do with this.<br>
<br>
Any assistance would be greatly appreciated!<br>
<br>
/Thomas<br>
<br>
</body>
</html>