From c7b701dfd2fc4fe85f5b0f4e94a4faabda8dd375 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 13 Jan 2020 15:58:49 +0100 Subject: [PATCH] Image: Include S3TC compression via Squish in non-tools build We already build Squish in templates build for S3TC decompression, so we can as well expose the compression feature. Fixes #25640. --- modules/squish/image_compress_squish.cpp | 2 -- modules/squish/image_compress_squish.h | 2 -- modules/squish/register_types.cpp | 2 -- platform/haiku/detect.py | 2 +- platform/server/detect.py | 2 +- platform/x11/detect.py | 2 +- 6 files changed, 3 insertions(+), 9 deletions(-) diff --git a/modules/squish/image_compress_squish.cpp b/modules/squish/image_compress_squish.cpp index ef4ea93e570..58b8115dfc2 100644 --- a/modules/squish/image_compress_squish.cpp +++ b/modules/squish/image_compress_squish.cpp @@ -73,7 +73,6 @@ void image_decompress_squish(Image *p_image) { p_image->create(p_image->get_width(), p_image->get_height(), p_image->has_mipmaps(), target_format, data); } -#ifdef TOOLS_ENABLED void image_compress_squish(Image *p_image, float p_lossy_quality, Image::CompressSource p_source) { if (p_image->get_format() >= Image::FORMAT_DXT1) @@ -203,4 +202,3 @@ void image_compress_squish(Image *p_image, float p_lossy_quality, Image::Compres p_image->create(p_image->get_width(), p_image->get_height(), p_image->has_mipmaps(), target_format, data); } } -#endif diff --git a/modules/squish/image_compress_squish.h b/modules/squish/image_compress_squish.h index 2666815e47f..b5a209ceb98 100644 --- a/modules/squish/image_compress_squish.h +++ b/modules/squish/image_compress_squish.h @@ -33,9 +33,7 @@ #include "core/image.h" -#ifdef TOOLS_ENABLED void image_compress_squish(Image *p_image, float p_lossy_quality, Image::CompressSource p_source); -#endif void image_decompress_squish(Image *p_image); #endif // IMAGE_COMPRESS_SQUISH_H diff --git a/modules/squish/register_types.cpp b/modules/squish/register_types.cpp index 1cd551defb6..2a0cf82b562 100644 --- a/modules/squish/register_types.cpp +++ b/modules/squish/register_types.cpp @@ -33,9 +33,7 @@ void register_squish_types() { -#ifdef TOOLS_ENABLED Image::set_compress_bc_func(image_compress_squish); -#endif Image::_image_decompress_bc = image_decompress_squish; } diff --git a/platform/haiku/detect.py b/platform/haiku/detect.py index 2a3e1650692..dd722948161 100644 --- a/platform/haiku/detect.py +++ b/platform/haiku/detect.py @@ -95,7 +95,7 @@ def configure(env): if not env['builtin_enet']: env.ParseConfig('pkg-config libenet --cflags --libs') - if not env['builtin_squish'] and env['tools']: + if not env['builtin_squish']: env.ParseConfig('pkg-config libsquish --cflags --libs') if not env['builtin_zstd']: diff --git a/platform/server/detect.py b/platform/server/detect.py index b6028c20e31..d82df779575 100644 --- a/platform/server/detect.py +++ b/platform/server/detect.py @@ -162,7 +162,7 @@ def configure(env): if not env['builtin_enet']: env.ParseConfig('pkg-config libenet --cflags --libs') - if not env['builtin_squish'] and env['tools']: + if not env['builtin_squish']: env.ParseConfig('pkg-config libsquish --cflags --libs') if not env['builtin_zstd']: diff --git a/platform/x11/detect.py b/platform/x11/detect.py index b8ff97279df..a961072bd6a 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -232,7 +232,7 @@ def configure(env): if not env['builtin_enet']: env.ParseConfig('pkg-config libenet --cflags --libs') - if not env['builtin_squish'] and env['tools']: + if not env['builtin_squish']: env.ParseConfig('pkg-config libsquish --cflags --libs') if not env['builtin_zstd']: