cpm-ogg.cmake: fix libvorbis cross-build

Vorbis couldn't find ogg so tell it explicitly where it
is.
This commit is contained in:
James R 2023-02-22 20:35:02 -08:00
parent 61198a46e7
commit 8ee785bb7e

View file

@ -4,3 +4,10 @@ CPMAddPackage(
URL "https://github.com/xiph/ogg/releases/download/v1.3.5/libogg-1.3.5.zip"
EXCLUDE_FROM_ALL ON
)
if(ogg_ADDED)
# Fixes bug with find_package not being able to find
# ogg when cross-building.
set(OGG_INCLUDE_DIR "${ogg_SOURCE_DIR}/include")
set(OGG_LIBRARY Ogg:ogg)
endif()