[cmake-developers] CMAKE_INSTALL_PREFIX vs CMAKE_SYSROOT ?
Stephen Kelly
steveire at gmail.com
Mon Jul 8 09:06:49 EDT 2013
Brad King wrote:
> On 07/04/2013 04:29 AM, Stephen Kelly wrote:
>>> How do install() invocations distinguish which prefix to use?
>>
>> I think install invokations use CMAKE_HOST_INSTALL_PREFIX for everything
>> if present, and CMAKE_INSTALL_PREFIX otherwise.
>
> Before I answer the rest of the message I'd like clarification here.
> Do you mean that the install() invocations have
>
> install(TARGETS ... DESTINATION ${CMAKE_HOST_INSTALL_PREFIX}/lib)
>
> ? Or will install() somehow know whether a build target is for
> host or target architecture?
I was thinking of cases where the install DESTINATION is relative:
install(TARGETS foo ... DESTINATION lib)
If CMAKE_HOST_INSTALL_PREFIX is defined, foo is installed to
${CMAKE_HOST_INSTALL_PREFIX}/lib
otherwise
${CMAKE_INSTALL_PREFIX}/lib
Thanks,
Steve.
More information about the cmake-developers
mailing list