LaunchCFM: better conditionalization for Classic/Carbon backends

This commit is contained in:
Wolfgang Thaller 2017-10-03 13:00:53 +02:00
parent 62831a7391
commit 28b11ae719
3 changed files with 21 additions and 9 deletions

View File

@ -6,10 +6,15 @@ set(LAUNCHMETHODS
)
if(APPLE)
LIST(APPEND LAUNCHMETHODS
Classic.h Classic.cc
Carbon.h Carbon.cc
)
LIST(APPEND LAUNCHMETHODS
Classic.h Classic.cc
)
find_program(LAUNCHCFMAPP LaunchCFMApp)
if(LAUNCHCFMAPP)
add_definitions(-DHAS_LAUNCHCFMAPP)
LIST(APPEND LAUNCHMETHODS
Carbon.h Carbon.cc)
endif()
endif()
add_executable(LaunchAPPL

View File

@ -1,3 +1,4 @@
#if defined(__APPLE__) && defined(__powerpc)
#include "Classic.h"
#include "Launcher.h"
@ -66,3 +67,4 @@ std::unique_ptr<Launcher> Classic::MakeLauncher(variables_map &options)
{
return std::unique_ptr<Launcher>(new ClassicLauncher(options));
}
#endif

View File

@ -8,9 +8,11 @@
#include "LaunchMethod.h"
#include "Launcher.h"
#ifdef __APPLE__
#include "Classic.h"
#include "Carbon.h"
#if defined(__APPLE__) && defined(__powerpc)
# include "Classic.h"
#endif
#ifdef HAS_LAUNCHCFMAPP
# include "Carbon.h"
#endif
#include "Executor.h"
#include "MiniVMac.h"
@ -35,8 +37,11 @@ static void usage()
int main(int argc, char *argv[])
{
std::vector<LaunchMethod*> methods = {
#ifdef __APPLE__
new Classic(), new Carbon(),
#if defined(__APPLE__) && defined(__powerpc)
new Classic(),
#endif
#ifdef HAS_LAUNCHCFMAPP
new Carbon(),
#endif
new Executor(), new MiniVMac()
};