今回は「gyp でネイティブコードプロジェクトのビルドを多環境に対応させる」です。私がやっていることをメモしておきます。 背景 私は Windows のコードをよく書いていました。ある時から Android、Windows Mobile、Linux、Mac OS X、iOS でも動くように意識して書くようになりました。すぐに、コードをビルドするための各種設定ファイルを用意するのが面倒になりました。Visual Studio、Xcode、Makefile、Android NDK 用 Makefile・・・やっていられませんね。 ビルドツール巡り・・・cmake、scons、waf、そして gyp へ ビルド設定ファイルを自動生成するためのビルドツールを探してみるとすぐにいくつか出てきました。半年ほど cmake と scons を並行運用していましたが、その中で気に入らない点が出てきました。