[11167] Added CMake support

(based on cipherCOM's commit 0039476)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
cipherCOM 2011-02-13 03:42:09 +03:00 committed by VladimirMangos
parent c9942fb0cc
commit a81cf28610
43 changed files with 3465 additions and 4 deletions

23
cmake/FindPlatform.cmake Normal file
View file

@ -0,0 +1,23 @@
# Already set, so only add definition
# IF(PLATFORM)
# IF(PLATFORM MATCHES X64 AND WIN32)
# ADD_DEFINITIONS("-D_WIN64")
# ENDIF()
# ELSE()
# default to x86 platform. We'll check for X64 in a bit
SET(PLATFORM X86)
# This definition is necessary to work around a bug with Intellisense described
# here: http://tinyurl.com/2cb428. Syntax highlighting is important for proper
# debugger functionality.
IF(CMAKE_SIZEOF_VOID_P MATCHES 8)
MESSAGE(STATUS "Detected 64-bit platform.")
IF(WIN32)
ADD_DEFINITIONS("-D_WIN64")
ENDIF()
SET(PLATFORM X64)
ELSE()
MESSAGE(STATUS "Detected 32-bit platform.")
ENDIF()
# ENDIF()