summaryrefslogtreecommitdiff
path: root/lib/common/BoxPlatform.h
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2016-09-03 00:25:52 +0100
committerChris Wilson <chris+github@qwirx.com>2016-09-09 20:54:12 +0100
commit98a6ad72ee819774a398440055abd87bc44e9ba0 (patch)
tree55a5c7eff8deaab2ab7d44ed0357576aa0687a96 /lib/common/BoxPlatform.h
parent11a8c444875d8b7912fa07bdc3854e3adb27aa4e (diff)
Fix Unix compilation using CMake.
Add platform detection that's compatible with the old buildsystem and its m4 autoconfigury. Make Travis build and test using CMake as a separate target. Remove unused function BoxGetTemporaryDirectoryName() to fixes compile using CMake on Unix.
Diffstat (limited to 'lib/common/BoxPlatform.h')
-rw-r--r--lib/common/BoxPlatform.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/common/BoxPlatform.h b/lib/common/BoxPlatform.h
index f8720587..f7c74bfc 100644
--- a/lib/common/BoxPlatform.h
+++ b/lib/common/BoxPlatform.h
@@ -21,11 +21,13 @@
#define PLATFORM_DEV_NULL "/dev/null"
-#ifdef _MSC_VER
-#include "BoxConfig-MSVC.h"
-#define NEED_BOX_VERSION_H
+#if defined BOX_CMAKE
+# include "BoxConfig.cmake.h"
+#elif defined _MSC_VER
+# include "BoxConfig-MSVC.h"
+# define NEED_BOX_VERSION_H
#else
-#include "BoxConfig.h"
+# include "BoxConfig.h"
#endif
#ifdef WIN32