LoginSignup
4
4

More than 5 years have passed since last update.

GYPにおけるdependencies設定メモ

Posted at

いつも混乱するのでメモ。
基本的に
GypUserDocumentationベースです。

間違ってたら教えてください。

dependencies

なにはともあれ、依存を示す。

依存するtargetを指定する。
他のgypファイルに記述されているターゲットも指定可能で、
path/to/other.gypbar
ターゲットの場合は
path/to/other.gyp:bar
という指定になる。

'dependencies': [
  'foo',
  'path/to/other.gyp:bar',
],
...

direct_dependent_settings

このターゲットに依存する他のターゲットに対して、
適用する設定を記述します。
includeディレクトリだったり、definesだったりを、
そのターゲットに依存するターゲットに公開する感じです。

'direct_dependent_settings': [
  'defines': [
    'DEBUG',
  ],
  'include_dir': [
    'include',
    ...
  ]
]

export_dependent_settings

このターゲットに依存しているターゲットに対して、
"direct_dependent_settings渡されるべきターゲット"を記述します。

つまり、ここに記述されたターゲットのdirect_dependent_settingsは、このターゲットに依存する
ターゲットにも反映されます。

'export_dependent_settings': [
  'path/to/other.gyp:bar'
],
4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4