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

View File

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