summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/CMakeLists.txt11
-rw-r--r--Source/cmake.cxx5
2 files changed, 12 insertions, 4 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 37ab5b3..7df4d0b 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -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)
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index a07fae0..ce33770 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -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;