<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hello, <br>
<br>
I'm surprised CPACK_RPM_gui_PACKAGE_REQUIRES works , I don't find
any use of CPACK_RPM_<compName>_REQUIRES in CPackRPM.cmake;<br>
<br>
What I can suggest you for generating several packages with
different dependencies is to generate the different packages in
multiple steps. If we suppose you defined 2 components (in the
INSTALL commands) called : binary and devel ,you can then generate
the packages (whether deb or rpm) as follows:<br>
<br>
<br>
SET(CPACK_INSTALL_CMAKE_PROJECTS
"${CMAKE_BINARY_DIR};${CMAKE_PROJECT_NAME}; ${MYBUILDTYPE};/")<br>
<br>
then for the dependencies:<br>
<br>
IF(MYBUILDTYPE STREQUAL "binary")<br>
SET(CPACK_RPM_PACKAGE_REQUIRES "gsl")<br>
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libgsl0-dev")<br>
ELSE()<br>
SET(CPACK_RPM_PACKAGE_REQUIRES "gsl-devel")<br>
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libgsl0-dev")<br>
ENDIF()<br>
<br>
<br>
Then the packages are generated with:<br>
<br>
cmake -DMYBUILDTYPE="binary" && make package<br>
cmake -DMYBUILDTYPE="devel" && make package<br>
<br>
<br>
<br>
best;<br>
<br>
Jeremy.<br>
<br>
<br>
<br>
On 11/20/2013 03:51 AM, <a class="moz-txt-link-abbreviated" href="mailto:jeff@linuxwest.com">jeff@linuxwest.com</a> wrote:<br>
</div>
<blockquote cite="mid:40205.1384915864@linuxwest.com" type="cite">
Hello CMake group,<br>
<br>
I'm trying to do a component-based install that will produce
multiple packages, where one package depends on another. I am
using cmake version 2.8.12.1. Have multiple packages working well
but the dependencies have not been easy.<br>
<br>
The variable CPACK_COMPONENT_<compName>_DEPENDS, given by
the command `cpack --help-variable-list`, as far as I can tell,
does nothing. Surprisingly, what ended up doing the trick on an
RPM-based system is:<br>
<br>
SET(CPACK_RPM_gui_PACKAGE_REQUIRES "my-lib >= 0.1.1")<br>
<br>
Why does this work? This is inconsistent with the documentation. <br>
<br>
The bigger problem, I'm trying to solve at the moment, is how to
make component dependencies work on Debian. I have tried every
combination of cpack variable + component name and nothing stops
an install with a message like, "Unable to install gui because it
depends on my-lib" (because my-lib doesn't exist so it should halt
the installer).<br>
<br>
Does component-based install even work for Debian (actually, I'm
on ubuntu but whatever)? I saw about two references to it on the
entire Internet so a good resource is hard to find, currently. It
would be idea if I can use
CPACK_COMPONENT_<compName>_DEPENDS for both deb and rpm but
as I said, it doesn't work.<br>
<br>
<br>
Thank you for any help/guidance. <br>
<br>
Jeff<br>
<br>
<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">--
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>
Please keep messages on-topic and check the CMake FAQ at: <a class="moz-txt-link-freetext" href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:
CMake Support: <a class="moz-txt-link-freetext" href="http://cmake.org/cmake/help/support.html">http://cmake.org/cmake/help/support.html</a>
CMake Consulting: <a class="moz-txt-link-freetext" href="http://cmake.org/cmake/help/consulting.html">http://cmake.org/cmake/help/consulting.html</a>
CMake Training Courses: <a class="moz-txt-link-freetext" href="http://cmake.org/cmake/help/training.html">http://cmake.org/cmake/help/training.html</a>
Visit other Kitware open-source projects at <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>
Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a></pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Jérémy Fix (PhD)
Assistant Professor
Supélec
2 rue Edouard Belin
57070 Metz, France
Tél: +33(0)387 76 47 79
Fax: +33(0)387764700
Email: <a class="moz-txt-link-abbreviated" href="mailto:Jeremy.Fix@Supelec.fr">Jeremy.Fix@Supelec.fr</a>
Homepage : <a class="moz-txt-link-freetext" href="http://malis.metz.supelec.fr/~fix_jer">http://malis.metz.supelec.fr/~fix_jer</a></pre>
</body>
</html>