summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 321c4b4..2377afb 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1359,12 +1359,15 @@ bool cmSystemTools::IsPathToFramework(const char* path)
return false;
}
-#include <libtar/libtar.h>
-#include <memory> // auto_ptr
-#include <fcntl.h>
+#if defined(CMAKE_BUILD_WITH_CMAKE)
+# include <libtar/libtar.h>
+# include <memory> // auto_ptr
+# include <fcntl.h>
+#endif
bool cmSystemTools::CreateTar(const char* outFileName, const std::vector<cmStdString>& files)
{
+#if defined(CMAKE_BUILD_WITH_CMAKE)
TAR *t;
char buf[TAR_MAXPATHLEN];
char pathname[TAR_MAXPATHLEN];
@@ -1413,4 +1416,7 @@ bool cmSystemTools::CreateTar(const char* outFileName, const std::vector<cmStdSt
return false;
}
return true;
+#else
+ return false;
+#endif
}