From af145c3a0157455351c6e09c589aa724089af56c Mon Sep 17 00:00:00 2001 From: Jonas Kulla Date: Sat, 11 Oct 2014 15:32:35 +0200 Subject: [PATCH] mkxp.pro: Make MRI version a qmake config option Example: qmake MRIVERSION=2.2 --- README.md | 2 +- mkxp.pro | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f4ba120..ac0e8f5 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ By default, mkxp switches into the directory where its binary is contained and t To auto detect the encoding of the game title in `Game.ini` and auto convert it to UTF-8, build with `CONFIG+=INI_ENCODING`. Requires iconv implementation and libguess. If the encoding is wrongly detected, you can set the "titleLanguage" hint in mkxp.conf. -**MRI-Binding**: pkg-config will look for `ruby-2.1.pc`, but you can modify mkxp.pro to use 2.0 instead. This is the default binding, so no arguments to qmake needed (`BINDING=MRI` to be explicit). +**MRI-Binding**: pkg-config will look for `ruby-2.1.pc`, but you can override the version with `MRIVERSION=2.2` ('2.2' being an example). This is the default binding, so no arguments to qmake needed (`BINDING=MRI` to be explicit). **MRuby-Binding**: place the "mruby" folder into the project folder and build it first. Add `BINDING=MRUBY` to qmake's arguments. diff --git a/mkxp.pro b/mkxp.pro index 0adb918..8e522c9 100644 --- a/mkxp.pro +++ b/mkxp.pro @@ -267,7 +267,11 @@ BINDING_MRUBY { } BINDING_MRI { - PKGCONFIG += ruby-2.1 + isEmpty(MRIVERSION) { + MRIVERSION = 2.1 + } + + PKGCONFIG += ruby-$$MRIVERSION DEFINES += BINDING_MRI # EMBED2 = binding-mri/module_rpg.rb