From de00dd15fc13b8b961b348e682978c2959b5a667 Mon Sep 17 00:00:00 2001 From: SteelT Date: Tue, 28 Feb 2023 21:49:24 -0500 Subject: [PATCH] Fix building errors with webm, catch missing SRB2_CONFIG_ENABLE_WEBM_MOVIES condition --- CMakeLists.txt | 8 +++++--- thirdparty/CMakeLists.txt | 10 ++++++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a83ed5f8c..cdbb760c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -133,9 +133,11 @@ if("${SRB2_CONFIG_SYSTEM_LIBRARIES}") find_package(SDL2 REQUIRED) find_package(CURL REQUIRED) find_package(GME REQUIRED) - find_package(VPX REQUIRED) - find_package(Vorbis REQUIRED) - find_package(VorbisEnc REQUIRED) + if (SRB2_CONFIG_ENABLE_WEBM_MOVIES) + find_package(VPX REQUIRED) + find_package(Vorbis REQUIRED) + find_package(VorbisEnc REQUIRED) + endif() endif() if(${PROJECT_SOURCE_DIR} MATCHES ${PROJECT_BINARY_DIR}) diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 0c77d8c1b..2dd78d8c0 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -24,10 +24,12 @@ include("cpm-fmt.cmake") include("cpm-imgui.cmake") include("cpm-acsvm.cmake") -if(NOT "${SRB2_CONFIG_SYSTEM_LIBRARIES}" AND SRB2_CONFIG_ENABLE_WEBM_MOVIES) - include("cpm-libvpx.cmake") - include("cpm-ogg.cmake") # libvorbis depends - include("cpm-libvorbis.cmake") +if (SRB2_CONFIG_ENABLE_WEBM_MOVIES) + if (NOT "${SRB2_CONFIG_SYSTEM_LIBRARIES}") + include("cpm-libvpx.cmake") + include("cpm-ogg.cmake") # libvorbis depends + include("cpm-libvorbis.cmake") + endif() include("cpm-libwebm.cmake") include("cpm-libyuv.cmake") endif()