mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Add CMake platform-check (32/64-bit) (includes new test-variable ${PLATFORM} that defines X86/X64 basesystem)
--HG-- branch : trunk
This commit is contained in:
@@ -30,6 +30,7 @@ endif()
|
||||
#
|
||||
|
||||
include(CheckIncludeFiles)
|
||||
include(cmake/FindPlatform.cmake)
|
||||
include(cmake/FindPCHSupport.cmake)
|
||||
|
||||
if(WIN32)
|
||||
|
||||
16
cmake/FindPlatform.cmake
Normal file
16
cmake/FindPlatform.cmake
Normal file
@@ -0,0 +1,16 @@
|
||||
# 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()
|
||||
Reference in New Issue
Block a user