From 858c40591b31435da3550a199b65165209ba6f81 Mon Sep 17 00:00:00 2001 From: Jonas Kulla Date: Sun, 17 Aug 2014 00:16:43 +0200 Subject: [PATCH] mkxp.pro: Add proper method to define RGSS version Eg. `qmake RGSS_VER=3` for VX Ace. Default is 1 (XP). --- mkxp.pro | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/mkxp.pro b/mkxp.pro index 3cc2454..1e42f8e 100644 --- a/mkxp.pro +++ b/mkxp.pro @@ -45,13 +45,34 @@ contains(BINDING, NULL) { CONFIG += BINDING_NULL } -RGSS2 { - DEFINES += RGSS2 +# TODO: Use RGSS_VER macro instead of RGSSN in C++ sources +isEmpty(RGSS_VER) { + RGSS_VER = 1 } -# Requires RGSS2 -RGSS3 { - DEFINES += RGSS3 +contains(RGSS_VER, 1) { + _HAVE_RGSS_VER = YES + DEFINES += "RGSS_VER=1" +} + +contains(RGSS_VER, 2) { + contains(_HAVE_RGSS_VER, YES) { + error("Only one RGSS version may be selected") + } + _HAVE_RGSS_VER = YES + + CONFIG += RGSS2 + DEFINES += RGSS2 "RGSS_VER=2" +} + +contains(RGSS_VER, 3) { + contains(_HAVE_RGSS_VER, YES) { + error("Only one RGSS version may be selected") + } + _HAVE_RGSS_VER = YES + + CONFIG += RGSS2 RGSS3 + DEFINES += RGSS2 RGSS3 "RGSS_VER=3" } unix {