LoginSignup
1
2

More than 5 years have passed since last update.

mruby-cliで特定のプラットフォームのみmrbgemを指定するには

Last updated at Posted at 2016-02-13

MRuby::CrossBuild.newの中にconf.gemを追加する

以下のような感じ。

この場合、Dockerイメージに/root/src/配下にmrbgemをすでに
配置してあることが前提。

MRuby::CrossBuild.new('i686-w64-mingw32') do |conf|
  toolchain :gcc

  [conf.cc, conf.linker].each do |cc|
    cc.command = 'i686-w64-mingw32-gcc'
  end
  conf.cxx.command      = 'i686-w64-mingw32-g++'
  conf.archiver.command = 'i686-w64-mingw32-gcc-ar'
  conf.exts.executable  = ".exe"

  conf.build_target     = 'i686-pc-linux-gnu'
  conf.host_target      = 'i686-w64-mingw32'

  conf.gem '/root/src/mruby-webcam'
  gem_config(conf)
end

関連投稿

関連記事

1
2
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
1
2