Help: install(EXPORT) docs inconsistent (EXPORT_ANDROID_MK)
The documentation for install(EXPORT)
has internal inconsistencies
which make it hard to tell how the EXPORT_ANDROID_MK
option should
be used. The install form is documented as this:
install(EXPORT <export-name> DESTINATION <dir>
[NAMESPACE <namespace>] [[FILE <name>.cmake]|
[EXPORT_ANDROID_MK <name>.mk]]
[PERMISSIONS permissions...]
[CONFIGURATIONS [Debug|Release|...]]
[EXPORT_LINK_INTERFACE_LIBRARIES]
[COMPONENT <component>]
[EXCLUDE_FROM_ALL])
But then example code further below shows this:
install(TARGETS myexe EXPORT myproj DESTINATION bin)
install(EXPORT myproj NAMESPACE mp_ DESTINATION lib/myproj)
install(EXPORT_ANDROID_MK myexp DESTINATION share/ndk-modules)
Looking through the source code and doing some trivial tests, it seems that the example is correct but the general form is not. I suspect that the general form should show something more like this, but someone familiar with the functionality should confirm the intended usage:
install(<EXPORT | EXPORT_ANDROID_MK> <export-name>
DESTINATION <dir>
[NAMESPACE <namespace>]
[FILE <name>]
[EXPORT_ANDROID_MK <name>.mk]]
[PERMISSIONS permissions...]
[CONFIGURATIONS [Debug|Release|...]]
[EXPORT_LINK_INTERFACE_LIBRARIES]
[COMPONENT <component>]
[EXCLUDE_FROM_ALL])
The comments after the example also appear inconsistent with the example
itself, citing the install location of the Android.mk
file as being
<prefix>/lib/share/ndk-modules/Android.mk
instead of <prefix>/share/ndk-modules/Android.mk