# # Copyright (C) 2005-2012 MaNGOS project # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # project(MaNGOS) set(MANGOS_VERSION 0.17.0) # CMake policies cmake_minimum_required(VERSION 2.8) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake ) # Force out-of-source build string(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" BUILDING_IN_SOURCE) if(BUILDING_IN_SOURCE) message(FATAL_ERROR "This project requires an out of source build. Remove the file 'CMakeCache.txt' found in this directory before continuing, create a separate build directory and run 'cmake [options]' from there." ) endif() if(WIN32 AND NOT MSVC) message(FATAL_ERROR "Under Windows other compiler than Microsoft Visual Studio are not supported." ) endif() find_package(Platform REQUIRED) find_package(Git) # VS100 uses MSBuild.exe instead of devenv.com, so force it to use devenv.com if(WIN32 AND MSVC_VERSION MATCHES 1600) find_package(VisualStudio2010) endif() # if(NOT PLATFORM MATCHES X86 AND NOT PLATFORM MATCHES X64) # message(FATAL_ERROR # "An unknown Architecture was selected. Only the values X86 and X64 for PLATFORM are supported." # ) # endif() # Output description of this script message( "\nThis script builds the MaNGOS server. Options that can be used in order to configure the process: PREFIX: Path where the server should be installed to PCH: Use precompiled headers DEBUG: Debug mode To set an option simply type -D