ENH: make xcode compile only on apple

This commit is contained in:
Bill Hoffman 2005-03-14 13:23:14 -05:00
parent fe41711a08
commit 3abbf15a5a
2 changed files with 12 additions and 4 deletions

View File

@ -50,14 +50,12 @@ SET(SRCS
cmGlobalGenerator.h
cmGlobalUnixMakefileGenerator.cxx
cmGlobalUnixMakefileGenerator.h
cmGlobalXCodeGenerator.cxx
cmListFileCache.cxx
cmListFileCache.h
cmListFileLexer.c
cmLocalGenerator.cxx
cmLocalGenerator.h
cmLocalUnixMakefileGenerator2.cxx
cmLocalXCodeGenerator.cxx
cmMakeDepend.cxx
cmMakeDepend.h
cmMakefile.cxx
@ -75,7 +73,6 @@ SET(SRCS
cmVariableWatch.h
cmVersion.cxx
cmVersion.h
cmXCodeObject.cxx
cmXMLParser.cxx
cmXMLParser.h
cmake.cxx
@ -90,6 +87,14 @@ IF(UNIX)
cmGlobalKdevelopGenerator.cxx
cmLocalKdevelopGenerator.cxx)
ENDIF(UNIX)
# XCode only works on apple
IF(APPLE)
SET(SRCS ${SRCS}
cmXCodeObject.cxx
cmGlobalXCodeGenerator.cxx
cmLocalXCodeGenerator.cxx
cmLocalXCodeGenerator.h)
ENDIF(APPLE)
IF (WIN32)

View File

@ -52,7 +52,6 @@
#else
#endif
#include "cmGlobalUnixMakefileGenerator.h"
#include "cmGlobalXCodeGenerator.h"
#ifdef CMAKE_USE_KDEVELOP
# include "cmGlobalKdevelopGenerator.h"
@ -61,6 +60,8 @@
#include <stdlib.h> // required for atoi
#ifdef __APPLE__
# include "cmGlobalXCodeGenerator.h"
# define CMAKE_USE_XCODE 1
# include <sys/types.h>
# include <sys/time.h>
# include <sys/resource.h>
@ -1413,8 +1414,10 @@ void cmake::AddDefaultGenerators()
#endif
m_Generators[cmGlobalUnixMakefileGenerator::GetActualName()] =
&cmGlobalUnixMakefileGenerator::New;
#ifdef CMAKE_USE_XCODE
m_Generators[cmGlobalXCodeGenerator::GetActualName()] =
&cmGlobalXCodeGenerator::New;
#endif
#ifdef CMAKE_USE_KDEVELOP
m_Generators[cmGlobalKdevelopGenerator::GetActualName()] =
&cmGlobalKdevelopGenerator::New;