<div dir="ltr">Thanks Domen! The use of original-case for <component> in CPACK_RPM_<component>_XXXX was indeed the problem. I never did get the <span style="font-size:12.8px">CPACK_RPM_*_PACKAGE_PREFIX </span>variable to work but I'm using a different (probably more correct) approach that gets me what I wanted.<div><br></div><div>Can this use of mixed case-sensitive/all-upper-case can be clarified in the documentation for CPACK_ and CPAC_RPM_ component variables?</div><div><br></div><div>Thanks,</div><div>Andy</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 2, 2016 at 2:51 PM, Domen Vrankar <span dir="ltr"><<a href="mailto:domen.vrankar@gmail.com" target="_blank">domen.vrankar@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> set(CPACK_GENERATOR "RPM")<br>
> set(CPACK_RPM_BLAH1_USER_BINARY_SPECFILE<br>
> "${CMAKE_CURRENT_SOURCE_DIR}/install/SPECS/<a href="http://blah1.spec.in" rel="noreferrer" target="_blank">blah1.spec.in</a>")<br>
> set(CPACK_RPM_BLAH1_PACKAGE_PREFIX "${CMAKE_INSTALL_PREFIX}/blah1")<br>
> set(CPACK_RPM_BLAH2_PACKAGE_PREFIX "${CMAKE_INSTALL_PREFIX}/blah2")<br>
> set(CPACK_RPM_COMPONENT_INSTALL ON)<br>
> set(CPACK_COMPONENTS_ALL blah1 blah2)<br>
> include(CPack)<br>
><br>
> What I want this to do is install blah1 in something like /opt/blah1 and<br>
> install blah2 in /opt/blah2 and use a custom binary spec for component<br>
> blah1. It does none of these things and instead puts both blah1 and blah2 in<br>
> CPACK_PACKAGING_INSTALL_PREFIX and uses a GENERATED binary spec file for<br>
> both blah1 and blah2.<br>
<br>
</span>This can be done but not all of those features came in at the same<br>
time so you should check the documentation for the version of<br>
CMake/CPack you are using.<br>
<br>
Also for historical reasons there is a difference between CPack<br>
variables and CPackRPM specific variables: with CPACK_* variables the<br>
component part should be in upper case as in your example while with<br>
CPACK_RPM_* variables the component part should be the same as the<br>
name of the component (for e.g. in your case<br>
CPACK_RPM_blah1_PACKAGE_PREFIX).<br>
<br>
Also instead of using CPACK_RPM_*_PACKAGE_PREFIX variables you might<br>
also want to take a look at CPACK_RPM_RELOCATION_PATHS that can be<br>
used in combination with GNUInstallDirs.cmake script that comes with<br>
CMake.<br>
<br>
e.g.<br>
include(GNUInstallDirs)<br>
set(CPACK_RPM_RELOCATION_PATHS "${CMAKE_INSTALL_INCLUDEDIR}"<br>
  "${CMAKE_INSTALL_LIBDIR}" "${CMAKE_INSTALL_BINDIR}")<br>
<br>
This way each rpm package can have more than one install prefix location.<br>
<br>
Regards,<br>
Domen<br>
</blockquote></div><br></div>