summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/dumplibs.cpp7
-rw-r--r--src/utils/dumplibs_unittest.cc4
2 files changed, 11 insertions, 0 deletions
diff --git a/src/utils/dumplibs.cpp b/src/utils/dumplibs.cpp
index 34b63e71a..9a7f42c0c 100644
--- a/src/utils/dumplibs.cpp
+++ b/src/utils/dumplibs.cpp
@@ -118,6 +118,7 @@ void dumpLibs()
logger->log(" libcurl: %s", LIBCURL_VERSION);
logger->log(" libpng: %s", PNG_LIBPNG_VER_STRING);
+#ifdef USE_PHYSFS
PHYSFS_Version physfsVersion;
PHYSFS_VERSION(&physfsVersion);
const std::string physfsCompiled = strprintf("%d.%d.%d",
@@ -125,6 +126,8 @@ void dumpLibs()
physfsVersion.minor,
physfsVersion.patch);
logger->log(" libphysfs: %s", physfsCompiled.c_str());
+#endif // USE_PHYSFS
+
dumpCompiledSdlVersion("SDL", SDL);
dumpCompiledSdlVersion("SDL_net", SDL_NET);
dumpCompiledSdlVersion("SDL_image", SDL_IMAGE);
@@ -135,12 +138,14 @@ void dumpLibs()
#if ZLIB_VERNUM >= 0x1020
logger->log(" zLib: %s", zlibVersion());
#endif // ZLIB_VERNUM >= 0x1020
+#ifdef USE_PHYSFS
PHYSFS_getLinkedVersion(&physfsVersion);
const std::string physfsLinked = strprintf("%d.%d.%d",
physfsVersion.major,
physfsVersion.minor,
physfsVersion.patch);
logger->log(" libphysfs: %s", physfsLinked.c_str());
+#endif // USE_PHYSFS
#ifdef LIBXML_TEST_VERSION
LIBXML_TEST_VERSION
#endif // LIBXML_TEST_VERSION
@@ -160,7 +165,9 @@ void dumpLibs()
dumpLinkedSdlVersion("SDL_ttf", TTF_Linked_Version());
compareVersions("zLib", ZLIB_VERSION, zlibVersion());
+#ifdef USE_PHYSFS
compareVersions("libphysfs", physfsCompiled.c_str(), physfsLinked.c_str());
+#endif // USE_PHYSFS
#ifdef USE_SDL2
compareSDLVersions("SDL", sdlVersionJoin(SDL), &sdlVersion);
#else // USE_SDL2
diff --git a/src/utils/dumplibs_unittest.cc b/src/utils/dumplibs_unittest.cc
index aca0f91f3..20f89f7b7 100644
--- a/src/utils/dumplibs_unittest.cc
+++ b/src/utils/dumplibs_unittest.cc
@@ -31,7 +31,9 @@ PRAGMACLANG6(GCC diagnostic ignored "-Wold-style-cast")
#include <SDL_net.h>
PRAGMACLANG6(GCC diagnostic pop)
#include <SDL_ttf.h>
+#ifdef USE_PHYSFS
#include <physfs.h>
+#endif // USE_PHYSFS
#include <zlib.h>
#include "debug.h"
@@ -47,6 +49,7 @@ TEST_CASE("dumplibs tests")
REQUIRE(build == link);
}
+#ifdef USE_PHYSFS
SECTION("physfs")
{
PHYSFS_Version buildVersion;
@@ -65,6 +68,7 @@ TEST_CASE("dumplibs tests")
REQUIRE(build == link);
}
+#endif // USE_PHYSFS
SECTION("sdl")
{