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.
This commit is contained in:
Rémi Verschelde 2020-01-13 15:58:49 +01:00
parent 087ffc8b5a
commit c7b701dfd2
6 changed files with 3 additions and 9 deletions

View file

@ -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

View file

@ -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

View file

@ -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;
}

View file

@ -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']:

View file

@ -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']:

View file

@ -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']: