OK, I get it now!<br><br>I still have another question, which is somewhat unrelated. Currently, when I configure CPack from CMake, I do a
set(CPACK_INSTALL_COMMANDS "some command"), which ends up setting the
variable in _both_ CPackConfig.cmake CPackSourceConfig.cmake. How can I set this variable (from CMake) so that it only affects CPackSourceConfig.cmake?. Is there a flag that I can use for this purpose?<br><br>Thanks!<br>
<br><br><div class="gmail_quote">On Mon, Mar 9, 2009 at 2:58 PM, Eric Noulard <span dir="ltr"><<a href="mailto:eric.noulard@gmail.com">eric.noulard@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">2009/3/9 Adolfo Rodríguez <<a href="mailto:dofo79@gmail.com">dofo79@gmail.com</a>>:<br>
</div><div class="im">> On Mon, Mar 9, 2009 at 11:47 AM, Eric Noulard <<a href="mailto:eric.noulard@gmail.com">eric.noulard@gmail.com</a>><br>
>><br>
</div><div class="im">>> I'm not sure but<br>
>> if I remember well it should be CPACK_TOPLEVEL_DIRECTORY.<br>
><br>
> Hmm, I tried querying the names of all active variables and their values<br>
> (after including CPack, of course) by doing<br>
><br>
> get_cmake_property(res VARIABLES)<br>
> foreach (i ${res})<br>
> message(STATUS ">> ${i} = ${${i}}")<br>
> endforeach (i)<br>
<br>
</div>You may be trying to look for variables which are NOT defined by CMake<br>
but by CPack.<br>
<br>
CPACK_TOPLEVEL_DIRECTORY is defined when **cpack** is running and not<br>
when **cmake** does.<br>
<div class="im"><br>
> Grepping these results I found no variable named CPACK_TOPLEVEL_DIRECTORY,<br>
> nor a variable whose value contained "_CPack_Packages/Linux-Source/TGZ/". I<br>
> don't know if grepping the source code would help much, since CMake/CPack<br>
> are apparently not exposing any variables with the required information.<br>
<br>
</div>I'm pretty sure they do, but like I said some are exposed during CMake run<br>
and some others may be defined when CPack runs.<br>
<div class="im"><br>
> Further clues would be greatly appreciated...<br>
<br>
</div>During CMake run you<br>
0) define some CPACK_xxx variables to be handled byt<br>
INCLUDE(CPack)<br>
<br>
1) In the end this creates 2 cmake-scripts languages files:<br>
CPackConfig.cmake CPackSourceConfig.cmake<br>
<br>
2) When running CPack (or make package or make package_source)<br>
the 2 precedings files are loaded by CPack which creates<br>
some other CPACK_xxxx variables and then invokes the<br>
appropriate CPack generator (TGZ, RPM etc...)<br>
<br>
3) The generator use some of the previously defined variables in order<br>
to do its job.<br>
<br>
<br>
You have 2 majors steps:<br>
<br>
A) CMake run step<br>
B) CPack run step<br>
<br>
both steps ARE separated<br>
but they both run a CMake script interpreters with some CMake variables defined,<br>
either from files (CMakeLists.txt, CPackConfigXXX.cmake) or builtin<br>
(from source code).<br>
<font color="#888888"><br>
<br>
--<br>
Erk<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Adolfo Rodríguez Tsouroukdissian<br><br>Robotics engineer<br>PAL ROBOTICS S.L<br><a href="http://www.pal-robotics.com">http://www.pal-robotics.com</a><br>Tel. +34.93.414.53.47<br>
Fax.+34.93.209.11.09<br>