aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gyp/images.gyp10
-rw-r--r--tools/skimage_main.cpp7
2 files changed, 10 insertions, 7 deletions
diff --git a/gyp/images.gyp b/gyp/images.gyp
index b5d0334fa6..93e95a42c1 100644
--- a/gyp/images.gyp
+++ b/gyp/images.gyp
@@ -97,12 +97,7 @@
],
}],
[ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl"]', {
- 'sources!': [
- '../src/images/SkImageDecoder_libgif.cpp',
- '../src/images/SkMovie_gif.cpp',
- ],
- # libpng stuff:
- # Any targets that depend on this target should link in libpng and
+ # Any targets that depend on this target should link in libpng, libgif, and
# our code that calls it.
# See http://code.google.com/p/gyp/wiki/InputFormatReference#Dependent_Settings
'link_settings': {
@@ -110,11 +105,12 @@
'../src/images/SkImageDecoder_libpng.cpp',
],
'libraries': [
+ '-lgif',
'-lpng',
'-lz',
],
},
- # end libpng stuff
+ # end libpng/libgif stuff
}],
[ 'skia_os == "android"', {
'include_dirs': [
diff --git a/tools/skimage_main.cpp b/tools/skimage_main.cpp
index dc5bdd4260..b486d5d1a3 100644
--- a/tools/skimage_main.cpp
+++ b/tools/skimage_main.cpp
@@ -159,8 +159,15 @@ int tool_main(int argc, char** argv) {
void forceLinking();
void forceLinking() {
+ // This function leaks, but that is okay because it is not intended
+ // to be called. It is only here so that the linker will include the
+ // decoders.
SkDEBUGCODE(SkImageDecoder *creator = ) CreateJPEGImageDecoder();
SkASSERT(creator);
+#ifdef SK_BUILD_FOR_UNIX
+ SkDEBUGCODE(creator = ) CreateGIFImageDecoder();
+ SkASSERT(creator);
+#endif
}
#if !defined SK_BUILD_FOR_IOS