Build libsharpyuv as a full installable library.

Headers are installed in a "sharpyuv" subdirectory of the webp
dir, e.g. /usr/local/include/webp/sharpyuv/
Remove unnecessary dependency from sharpyuv to webp/types.h

Add SHARPYUV_EXTERN so that only symbols meant to be public
are exported.

Sharpyuv users can use the library with:

find_package(WebP)
if(TARGET WebP::sharpyuv)
  # ... use WebP::sharpyuv
endif()

Change-Id: I602a25521a135a2edc39d6587610484fe6447ec5
This commit is contained in:
Maryla
2022-07-27 17:54:43 +02:00
committed by Maryla Ustarroz-Calonge
parent b4994eaa6d
commit a3b68c195e
5 changed files with 199 additions and 169 deletions

View File

@ -417,7 +417,7 @@ static int DoSharpArgbToYuv(const uint8_t* r_ptr, const uint8_t* g_ptr,
// Hidden exported init function.
// By default SharpYuvConvert calls it with NULL. If needed, users can declare
// it as extern and call it with a VP8CPUInfo function.
extern void SharpYuvInit(VP8CPUInfo cpu_info_func);
SHARPYUV_EXTERN void SharpYuvInit(VP8CPUInfo cpu_info_func);
void SharpYuvInit(VP8CPUInfo cpu_info_func) {
static volatile VP8CPUInfo sharpyuv_last_cpuinfo_used =
(VP8CPUInfo)&sharpyuv_last_cpuinfo_used;