From 8ee785bb7e5dd2c814217325e25963669aa6b4a6 Mon Sep 17 00:00:00 2001 From: James R Date: Wed, 22 Feb 2023 20:35:02 -0800 Subject: [PATCH] cpm-ogg.cmake: fix libvorbis cross-build Vorbis couldn't find ogg so tell it explicitly where it is. --- thirdparty/cpm-ogg.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/thirdparty/cpm-ogg.cmake b/thirdparty/cpm-ogg.cmake index 7f5f6123d..cb37cf0b6 100644 --- a/thirdparty/cpm-ogg.cmake +++ b/thirdparty/cpm-ogg.cmake @@ -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()