Files
AscEmu/cmake/CheckSystem.cmake
Lectro ac85c9bbc5 Added clang support
updated travis to use clang instead gcc (to use gcc, just uncomment gcc
lines and comment clang)
base clang requirement is 3.4 version
removed __fastcall redefinition
added addiitonal message that x64 build environment is detected
2016-01-18 17:06:05 +02:00

67 lines
1.8 KiB
CMake

# Copyright (C) 2014-2015 AscEmu Team <http://www.ascemu.org>
# load base requirements
include(${CMAKE_SOURCE_DIR}/cmake/Requirements.cmake)
#We have our own custom modules that we use. This tells cmakes where to find them.
set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH}
${CMAKE_SOURCE_DIR}/cmake/Modules)
# get git information
include(${CMAKE_SOURCE_DIR}/cmake/GitRevision.cmake)
# get architecture type
if(UNIX)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "[xX]64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "[xX]86_64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "[aA][mM][dD]64" )
set(IS_64BIT TRUE)
else()
set(IS_64BIT FALSE)
endif()
else()
if(CMAKE_GENERATOR MATCHES Win64*)
set(IS_64BIT TRUE)
else()
set(IS_64BIT FALSE)
endif()
endif()
# set default architecture identifier
if(IS_64BIT)
message(STATUS "Detected 64 bit system")
add_definitions(-DX64)
endif()
# default definitions
add_definitions(-DHAVE_CONFIG_H -DCONFDIR=\"${ASCEMU_CONFIGSFILE_PATH}\" -DPREFIX=\"${ASCEMU_SCRIPTLIB_PATH}\" )
mark_as_advanced(
ZLIB_LIBRARIES
ZLIB_INCLUDE_DIRS
PCRE_LIBRARIES
PCRE_INCLUDE_DIR
OPENSSL_LIBRARIES
OPENSSL_INCLUDE_DIR
MYSQL_LIBRARIES
MYSQL_INCLUDE_DIR
BZIP2_LIBRARIES
BZIP2_INCLUDE_DIRS
)
# apply system settings
if(WIN32)
include(${CMAKE_SOURCE_DIR}/cmake/Systems/Windows.cmake)
elseif(UNIX)
if(APPLE)
include(${CMAKE_SOURCE_DIR}/cmake/Systems/Apple.cmake)
elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD")
include(${CMAKE_SOURCE_DIR}/cmake/Systems/FreeBSD.cmake)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
include(${CMAKE_SOURCE_DIR}/cmake/Systems/Linux.cmake)
else()
message(FATAL_ERROR "System is not supported." )
endif()
else()
message(FATAL_ERROR "System is not supported." )
endif()