2013/11/20 Jeremy Fix <jeremy....@supelec.fr>: > Hello, > > I'm surprised CPACK_RPM_gui_PACKAGE_REQUIRES works , I don't find any use of > CPACK_RPM_<compName>_REQUIRES in CPackRPM.cmake;
Yes there is for all URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLICTS AUTOPROV AUTOREQ AUTOREQPROV see lines 555 and following we check for component specific value first: if(DEFINED CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${_RPM_SPEC_HEADER}) then else() if(DEFINED CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}) However we may have check the definition of "CPACK_COMPONENT_<compName>_DEPENDS" first in order to fill-in CPACK_RPM_<compName>_REQUIRES. This is not done. Moreover I'm not sure this could be easily factoired out since the syntax for dependency specification may well be package type specific (different name or syntax for DEB or RPM for example). > 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 You should be able to do that with component packaging and a CPACK_PROJECT_CONFIG_FILE. -- Erk L'élection n'est pas la démocratie -- http://www.le-message.org -- 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