[cmake-developers] CMake usage requirements in KDE Frameworks
Stephen Kelly
steveire at gmail.com
Tue Mar 19 17:34:50 EDT 2013
Alexander Neundorf wrote:
>> What I actually propose would look something like
>>
>> install(TARGETS KArchive EXPORT KArchiveTargets NAMESPACE KF5::
>> ...
>> INCLUDES DESTINATION "$<INSTALL_PREFIX>/${INCLUDES_INSTALL_DIR}"
>> )
>>
>> so it could be folded into INSTALL_TARGETS_DEFAULT_ARGS. I don't know if
>> it will be that easy in the end though.
>
> Two comments on that: ${INCLUDE_INSTALL_DIR} can currently be both a
> relative or an absolute path. Do you want to drop that ?
Good point. I'm sure we can find a way to make that remain possible.
>> target_include_directories(foo PRIVATE "/foo/private")
>>
>> applies to neither. The PRIVATE entries don't go into the
>> INTERFACE_INCLUDE_DIRECTORIES at all.
>>
>> target_include_directories(foo PUBLIC "/foo/public")
>> target_include_directories(foo INTERFACE "/foo/interface/only")
>
> Ok, so I could do the above also with the following, right ?
> target_include_directories(foo PRIVATE "/foo/public" "/foo/private")
> target_include_directories(foo INTERFACE "/foo/public"
> "/foo/interface/only")
Yep. Well, almost, the order of the PRIVATE ones would be reversed because
/foo/private was specified first in my example, but yes, you've got the
right idea :).
Thanks,
Steve.
More information about the cmake-developers
mailing list