From ed98a96e87a7e3186e295d7f3faa9984be2497a0 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 5 Oct 2019 19:04:58 +0200 Subject: MOHAWK: Add Myst ME as a subengine, and mark 'jpeg' as a required dependency Because our build system does not allow recursive dependencies, inserting #error for incorrect configuration. For enabling mystme, myst target must be enabled as well --- engines/mohawk/configure.engine | 3 ++- engines/mohawk/detection.cpp | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/mohawk/configure.engine b/engines/mohawk/configure.engine index ac2c59fe4d..c5d0a4c87e 100644 --- a/engines/mohawk/configure.engine +++ b/engines/mohawk/configure.engine @@ -1,6 +1,7 @@ # This file is included from the main "configure" script # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps] -add_engine mohawk "Mohawk" yes "cstime myst riven" "Living Books" "highres" +add_engine mohawk "Mohawk" yes "cstime myst mystme riven" "Living Books" "highres" add_engine cstime "Where in Time is Carmen Sandiego?" no add_engine riven "Riven: The Sequel to Myst" yes "" "" "16bit" add_engine myst "Myst" yes +add_engine mystme "Myst ME" yes "" "" "jpeg" diff --git a/engines/mohawk/detection.cpp b/engines/mohawk/detection.cpp index e81fc56199..075e7d233e 100644 --- a/engines/mohawk/detection.cpp +++ b/engines/mohawk/detection.cpp @@ -39,6 +39,12 @@ #include "mohawk/myst_state.h" #endif +#ifdef ENABLE_MYSTME +#ifndef ENABLE_MYST +#error "Myst must be enabled for building Myst ME. Specify --enable-engine=myst,mystme" +#endif +#endif + #ifdef ENABLE_RIVEN #include "mohawk/riven.h" #include "mohawk/riven_saveload.h" @@ -322,6 +328,12 @@ bool MohawkMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGa case Mohawk::GType_MYST: case Mohawk::GType_MAKINGOF: #ifdef ENABLE_MYST +#ifndef ENABLE_MYSTME + if (gd->features & Mohawk::GF_ME) { + warning("Myst ME support not compiled in"); + return false; + } +#endif *engine = new Mohawk::MohawkEngine_Myst(syst, gd); break; #else -- cgit v1.2.3