OK, I get it now! 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?
Thanks! On Mon, Mar 9, 2009 at 2:58 PM, Eric Noulard <[email protected]> wrote: > 2009/3/9 Adolfo Rodríguez <[email protected]>: > > On Mon, Mar 9, 2009 at 11:47 AM, Eric Noulard <[email protected]> > >> > >> I'm not sure but > >> if I remember well it should be CPACK_TOPLEVEL_DIRECTORY. > > > > Hmm, I tried querying the names of all active variables and their values > > (after including CPack, of course) by doing > > > > get_cmake_property(res VARIABLES) > > foreach (i ${res}) > > message(STATUS ">> ${i} = ${${i}}") > > endforeach (i) > > You may be trying to look for variables which are NOT defined by CMake > but by CPack. > > CPACK_TOPLEVEL_DIRECTORY is defined when **cpack** is running and not > when **cmake** does. > > > Grepping these results I found no variable named > CPACK_TOPLEVEL_DIRECTORY, > > nor a variable whose value contained "_CPack_Packages/Linux-Source/TGZ/". > I > > don't know if grepping the source code would help much, since CMake/CPack > > are apparently not exposing any variables with the required information. > > I'm pretty sure they do, but like I said some are exposed during CMake run > and some others may be defined when CPack runs. > > > Further clues would be greatly appreciated... > > During CMake run you > 0) define some CPACK_xxx variables to be handled byt > INCLUDE(CPack) > > 1) In the end this creates 2 cmake-scripts languages files: > CPackConfig.cmake CPackSourceConfig.cmake > > 2) When running CPack (or make package or make package_source) > the 2 precedings files are loaded by CPack which creates > some other CPACK_xxxx variables and then invokes the > appropriate CPack generator (TGZ, RPM etc...) > > 3) The generator use some of the previously defined variables in order > to do its job. > > > You have 2 majors steps: > > A) CMake run step > B) CPack run step > > both steps ARE separated > but they both run a CMake script interpreters with some CMake variables > defined, > either from files (CMakeLists.txt, CPackConfigXXX.cmake) or builtin > (from source code). > > > -- > Erk > -- Adolfo Rodríguez Tsouroukdissian Robotics engineer PAL ROBOTICS S.L http://www.pal-robotics.com Tel. +34.93.414.53.47 Fax.+34.93.209.11.09
_______________________________________________ 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
