From 9b2fa58b88524f4701b946761c6812d7e228b838 Mon Sep 17 00:00:00 2001 From: athile Date: Thu, 1 Jul 2010 16:29:22 -0700 Subject: [PATCH] Add separate CMakeLists.txt files for mwcompiler and mwinterpreter --- CMakeLists.txt | 12 ++---------- apps/mwcompiler/CMakeLists.txt | 9 +++++++++ apps/mwinterpreter/CMakeLists.txt | 9 +++++++++ 3 files changed, 20 insertions(+), 10 deletions(-) create mode 100644 apps/mwcompiler/CMakeLists.txt create mode 100644 apps/mwinterpreter/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index ae17b7930c..9e725d4352 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -228,19 +228,11 @@ endif (APPLE) # Tools option(BUILD_MWCOMPILER "build standalone Morrowind script compiler" ON) - if (BUILD_MWCOMPILER) -set(TOOLS_MWCOMPILER ${COMPILER} apps/mwcompiler/main.cpp apps/mwcompiler/context.cpp - apps/mwcompiler/context.hpp) - -add_executable(mwcompiler ${TOOLS_MWCOMPILER}) + add_subdirectory( apps/mwcompiler ) endif() option(BUILD_MWINTERPRETER "build standalone Morrowind script code interpreter" ON) - if (BUILD_MWINTERPRETER) -set(TOOLS_MWINTERPRETER ${INTERPRETER} apps/mwinterpreter/main.cpp - apps/mwinterpreter/context.cpp apps/mwinterpreter/context.hpp) - -add_executable(mwinterpreter ${TOOLS_MWINTERPRETER}) + add_subdirectory( apps/mwinterpreter ) endif() diff --git a/apps/mwcompiler/CMakeLists.txt b/apps/mwcompiler/CMakeLists.txt new file mode 100644 index 0000000000..b2243f255b --- /dev/null +++ b/apps/mwcompiler/CMakeLists.txt @@ -0,0 +1,9 @@ +project(MWCompiler) + +set(TOOLS_MWCOMPILER ${COMPILER} + main.cpp + context.cpp + context.hpp) + +add_executable(mwcompiler ${TOOLS_MWCOMPILER}) + diff --git a/apps/mwinterpreter/CMakeLists.txt b/apps/mwinterpreter/CMakeLists.txt new file mode 100644 index 0000000000..0789256577 --- /dev/null +++ b/apps/mwinterpreter/CMakeLists.txt @@ -0,0 +1,9 @@ +project(MWInterpreter) + +set(TOOLS_MWINTERPRETER + ${INTERPRETER} + main.cpp + context.cpp + context.hpp) + +add_executable(mwinterpreter ${TOOLS_MWINTERPRETER})