aboutsummaryrefslogtreecommitdiff
path: root/cmake/macros/CheckPlatform.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/macros/CheckPlatform.cmake')
-rw-r--r--cmake/macros/CheckPlatform.cmake19
1 files changed, 19 insertions, 0 deletions
diff --git a/cmake/macros/CheckPlatform.cmake b/cmake/macros/CheckPlatform.cmake
new file mode 100644
index 00000000000..a9c80458c02
--- /dev/null
+++ b/cmake/macros/CheckPlatform.cmake
@@ -0,0 +1,19 @@
+# default to x86 platform. We'll check for X64 in a bit
+set(PLATFORM X86)
+
+if(CMAKE_SIZEOF_VOID_P MATCHES 8)
+ set(PLATFORM X64)
+ MESSAGE(STATUS "Detected 64-bit platform")
+else()
+ MESSAGE(STATUS "Detected 32-bit platform")
+endif()
+
+include("${CMAKE_SOURCE_DIR}/cmake/platform/settings.cmake")
+
+if(WIN32)
+ include("${CMAKE_SOURCE_DIR}/cmake/platform/settings.win32.cmake")
+elseif(APPLE)
+ include("${CMAKE_SOURCE_DIR}/cmake/platform/settings.osx.cmake")
+elseif(UNIX)
+ include("${CMAKE_SOURCE_DIR}/cmake/platform/settings.unix.cmake")
+endif()