Clean up gyp settings for libjpeg

The gyp settings for libjpeg currently have a number of problems ...
- Settings for using the system libjpeg are replicated in the gyp files for both libjpeg and libjpeg_turbo.
- The default setting for use_system_libjpeg is different depending on whether libjpeg or libjpeg_turbo is in use. This is unintuitive, as libjpeg_turbo is a drop-in replacement for libjpeg.

This patch improves the situation ...
- Improve documentation about the interaction between use_system_libjpeg and use_libjpeg_turbo.
- Use the libjpeg gyp file whenever use_system_libjpeg==1. This means that the settings for using the system libjpeg are only needed here. (A later patch will remove them from libjpeg_turbo's gyp file). It also means that the libjpeg_turbo repository can be excluded when use_system_libjpeg==1.
- Move all settings concerned with use_system_libjpeg to the libjpeg gyp file.

Note that with this change, we lose the OS-specific defaults for use_system_libjpeg when use_libjpeg_turbo==0. These defaults are currently not used, as use_libjpeg_turbo==1 always.

Review URL: https://chromiumcodereview.appspot.com/10696082

git-svn-id: http://src.chromium.org/svn/trunk/src/build@147254 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
steveblock@chromium.org 2012-07-18 17:11:28 +00:00
Родитель 372b1cd5c4
Коммит 410bcd8f4d
1 изменённых файлов: 9 добавлений и 4 удалений

Просмотреть файл

@ -183,6 +183,10 @@
# Use libjpeg-turbo as the JPEG codec used by Chromium.
'use_libjpeg_turbo%': 1,
# Use system libjpeg. Note that the system's libjepg will be used even if
# use_libjpeg_turbo is set.
'use_system_libjpeg%': 0,
# Variable 'component' is for cases where we would like to build some
# components as dynamic shared libraries but still need variable
# 'library' for static libraries.
@ -1069,11 +1073,12 @@
# Set the relative path from this file to the GYP file of the JPEG
# library used by Chromium.
['use_libjpeg_turbo==1', {
'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
}, {
['use_system_libjpeg==1 or use_libjpeg_turbo==0', {
# Configuration for using the system libjeg is here.
'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
}], # use_libjpeg_turbo==1
}, {
'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
}],
# Options controlling the use of GConf (the classic GNOME configuration
# system) and GIO, which contains GSettings (the new GNOME config system).