Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions ffi-cdecl/lodepng_decl.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ cdecl_struct(LodePNGEncoderSettings)
cdecl_type(LodePNGEncoderSettings)
cdecl_struct(LodePNGColorMode)
cdecl_type(LodePNGColorMode)
cdecl_struct(LodePNGTime)
cdecl_type(LodePNGTime)
cdecl_struct(LodePNGInfo)
cdecl_type(LodePNGInfo)
cdecl_struct(LodePNGState)
Expand Down
59 changes: 2 additions & 57 deletions ffi/lodepng_h.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
-- Automatically generated with: ./build/x86_64-pc-linux-gnu/staging/bin/ffi-cdecl -DLODEPNG_NO_COMPILE_ANCILLARY_CHUNKS ffi-cdecl/lodepng_decl.c

local ffi = require("ffi")

ffi.cdef[[
Expand Down Expand Up @@ -25,10 +27,6 @@ struct LodePNGDecoderSettings {
unsigned int ignore_critical;
unsigned int ignore_end;
unsigned int color_convert;
unsigned int read_text_chunks;
unsigned int remember_unknown_chunks;
size_t max_text_size;
size_t max_icc_size;
};
typedef struct LodePNGDecoderSettings LodePNGDecoderSettings;
enum LodePNGFilterStrategy {
Expand Down Expand Up @@ -62,8 +60,6 @@ struct LodePNGEncoderSettings {
LodePNGFilterStrategy filter_strategy;
const unsigned char *predefined_filters;
unsigned int force_palette;
unsigned int add_id;
unsigned int text_compression;
};
typedef struct LodePNGEncoderSettings LodePNGEncoderSettings;
struct LodePNGColorMode {
Expand All @@ -77,62 +73,11 @@ struct LodePNGColorMode {
unsigned int key_b;
};
typedef struct LodePNGColorMode LodePNGColorMode;
struct LodePNGTime {
unsigned int year;
unsigned int month;
unsigned int day;
unsigned int hour;
unsigned int minute;
unsigned int second;
};
typedef struct LodePNGTime LodePNGTime;
struct LodePNGInfo {
unsigned int compression_method;
unsigned int filter_method;
unsigned int interlace_method;
LodePNGColorMode color;
unsigned int background_defined;
unsigned int background_r;
unsigned int background_g;
unsigned int background_b;
size_t text_num;
char **text_keys;
char **text_strings;
size_t itext_num;
char **itext_keys;
char **itext_langtags;
char **itext_transkeys;
char **itext_strings;
unsigned int time_defined;
LodePNGTime time;
unsigned int phys_defined;
unsigned int phys_x;
unsigned int phys_y;
unsigned int phys_unit;
unsigned int gama_defined;
unsigned int gama_gamma;
unsigned int chrm_defined;
unsigned int chrm_white_x;
unsigned int chrm_white_y;
unsigned int chrm_red_x;
unsigned int chrm_red_y;
unsigned int chrm_green_x;
unsigned int chrm_green_y;
unsigned int chrm_blue_x;
unsigned int chrm_blue_y;
unsigned int srgb_defined;
unsigned int srgb_intent;
unsigned int iccp_defined;
char *iccp_name;
unsigned char *iccp_profile;
unsigned int iccp_profile_size;
unsigned int sbit_defined;
unsigned int sbit_r;
unsigned int sbit_g;
unsigned int sbit_b;
unsigned int sbit_a;
unsigned char *unknown_chunks_data[3];
size_t unknown_chunks_size[3];
};
typedef struct LodePNGInfo LodePNGInfo;
struct LodePNGState {
Expand Down
2 changes: 2 additions & 0 deletions thirdparty/ffi-cdecl/ffi-cdecl.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ pkg-config() {
pkg-config --env-only --cflags "$@"
}

called_with="$(printf '%q ' "$0" "$@")"
compiler=''
dry_run=0
output='/proc/self/fd/1'
Expand Down Expand Up @@ -113,6 +114,7 @@ if [[ ${dry_run} -ne 0 ]]; then
exit
fi

printf -- '-- Automatically generated with: %s\n\n' "${called_with% }"
"${cmd[@]}" | sed 's/ __attribute__((visibility("default")));$/;/'

# vim: sw=4
2 changes: 1 addition & 1 deletion thirdparty/lodepng/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if(NOT MONOLIBTIC)
endif()

external_project(
DOWNLOAD GIT d398e0f10d152a5d17fa30463474dc9f56523f9c
DOWNLOAD GIT 0b1d9ccfc2093e5d6620cd9a11d03ee6ff6705f5
https://github.com/lvandeve/lodepng.git
PATCH_OVERLAY overlay
CMAKE_ARGS ${CMAKE_ARGS}
Expand Down
1 change: 1 addition & 0 deletions thirdparty/lodepng/overlay/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ project(lodepng LANGUAGES C)
file(WRITE lodepng.c "#include \"lodepng.cpp\"\n")
add_library(lodepng)
target_sources(lodepng PRIVATE lodepng.c)
target_compile_definitions(lodepng PRIVATE LODEPNG_NO_COMPILE_ANCILLARY_CHUNKS)

install(TARGETS lodepng)
install(FILES lodepng.h TYPE INCLUDE)