Hello,
I'm surprised CPACK_RPM_gui_PACKAGE_REQUIRES works , I don't find any
use of CPACK_RPM_<compName>_REQUIRES in CPackRPM.cmake;
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:
SET(CPACK_INSTALL_CMAKE_PROJECTS
"${CMAKE_BINARY_DIR};${CMAKE_PROJECT_NAME}; ${MYBUILDTYPE};/")
then for the dependencies:
IF(MYBUILDTYPE STREQUAL "binary")
SET(CPACK_RPM_PACKAGE_REQUIRES "gsl")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libgsl0-dev")
ELSE()
SET(CPACK_RPM_PACKAGE_REQUIRES "gsl-devel")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libgsl0-dev")
ENDIF()
Then the packages are generated with:
cmake -DMYBUILDTYPE="binary" && make package
cmake -DMYBUILDTYPE="devel" && make package
best;
Jeremy.
On 11/20/2013 03:51 AM, j...@linuxwest.com wrote:
Hello CMake group,
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.
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:
SET(CPACK_RPM_gui_PACKAGE_REQUIRES "my-lib >= 0.1.1")
Why does this work? This is inconsistent with the documentation.
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).
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.
Thank you for any help/guidance.
Jeff
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
--
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: jeremy....@supelec.fr
Homepage : http://malis.metz.supelec.fr/~fix_jer
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake