From dd088106ec6246fe66f6a0dc4af11ee01cc43d87 Mon Sep 17 00:00:00 2001 From: Dirk Farin Date: Sun, 22 Sep 2024 23:51:44 +0200 Subject: [PATCH] compile heifio subs with C linkage --- heifio/CMakeLists.txt | 2 +- heifio/stubs.cc | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/heifio/CMakeLists.txt b/heifio/CMakeLists.txt index 920eeca5fa..91a37d44d4 100644 --- a/heifio/CMakeLists.txt +++ b/heifio/CMakeLists.txt @@ -25,7 +25,7 @@ target_compile_definitions(heifio LIBHEIF_EXPORTS HAVE_VISIBILITY) -find_package(TIFF) +find_package(TIFFq) if (TIFF_FOUND) target_sources(heifio PRIVATE decoder_tiff.cc decoder_tiff.h encoder_tiff.h encoder_tiff.cc) target_link_libraries(heifio PRIVATE TIFF::TIFF) diff --git a/heifio/stubs.cc b/heifio/stubs.cc index b1facb614a..a20317c250 100644 --- a/heifio/stubs.cc +++ b/heifio/stubs.cc @@ -27,6 +27,7 @@ #include "libheif/heif.h" #include "decoder.h" +extern "C" { #if !HAVE_LIBJPEG heif_error loadJPEG(const char *filename, InputImage *input_image) @@ -62,3 +63,5 @@ heif_error loadTIFF(const char *filename, InputImage *input_image) return err; } #endif + +}