From 146678aac4685d69010c70e18c1f83b8758bb687 Mon Sep 17 00:00:00 2001 From: Misa Date: Tue, 31 Aug 2021 23:09:13 -0700 Subject: [PATCH] Make PhysFS RWops work with `-DBUNDLE_DEPENDENCIES=OFF` The RWops stuff isn't a part of any standard PhysFS package (and given that it explicitly wraps around SDL I'm not sure how you _would_ package it). So we need to get the physfsrwops.h include in if BUNDLE_DEPENDENCIES is off, otherwise this results in a compile-time include-not-found failure. Additionally, I've placed the PhysFS RWops stuff in their own extras/ folder, so none of the other PhysFS stuff gets included in a -DBUNDLE_DEPENDENCIES=OFF build. --- desktop_version/CMakeLists.txt | 4 +++- third_party/physfs/{ => extras}/physfsrwops.c | 0 third_party/physfs/{ => extras}/physfsrwops.h | 0 3 files changed, 3 insertions(+), 1 deletion(-) rename third_party/physfs/{ => extras}/physfsrwops.c (100%) rename third_party/physfs/{ => extras}/physfsrwops.h (100%) diff --git a/desktop_version/CMakeLists.txt b/desktop_version/CMakeLists.txt index a4993a35..41534cae 100644 --- a/desktop_version/CMakeLists.txt +++ b/desktop_version/CMakeLists.txt @@ -113,7 +113,7 @@ set(VVV_SRC src/Network.c src/ThirdPartyDeps.c src/Xoshiro.c - ../third_party/physfs/physfsrwops.c + ../third_party/physfs/extras/physfsrwops.c ) if(NOT CUSTOM_LEVEL_SUPPORT STREQUAL "DISABLED") list(APPEND VVV_SRC src/editor.cpp) @@ -139,6 +139,7 @@ if(BUNDLE_DEPENDENCIES) src ../third_party/tinyxml2 ../third_party/physfs + ../third_party/physfs/extras ../third_party/lodepng ../third_party/utfcpp/source ) @@ -147,6 +148,7 @@ else() VVVVVV PRIVATE src ../third_party/lodepng + ../third_party/physfs/extras ) endif() diff --git a/third_party/physfs/physfsrwops.c b/third_party/physfs/extras/physfsrwops.c similarity index 100% rename from third_party/physfs/physfsrwops.c rename to third_party/physfs/extras/physfsrwops.c diff --git a/third_party/physfs/physfsrwops.h b/third_party/physfs/extras/physfsrwops.h similarity index 100% rename from third_party/physfs/physfsrwops.h rename to third_party/physfs/extras/physfsrwops.h