1 # Copyright (C) 2005-2010 Trinity <http://www.trinitycore.org/>
3 # This file is free software; as a special exception the author gives
4 # unlimited permission to copy and/or distribute it, with or without
5 # modifications, as long as this notice is preserved.
7 # This program is distributed in the hope that it will be useful, but
8 # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
9 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11 # Set projectname (must be done AFTER setting configurationtypes)
14 # CMake policies (can not be handled elsewhere)
15 cmake_minimum_required(VERSION 2.6)
16 cmake_policy(SET CMP0005 OLD)
18 # Set RPATH-handing (CMake parameters)
19 set(CMAKE_SKIP_BUILD_RPATH 0)
20 set(CMAKE_BUILD_WITH_INSTALL_RPATH 0)
21 set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
22 set(CMAKE_INSTALL_RPATH_USE_LINK_PATH 1)
25 set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/macros")
27 # build in Release-mode by default if not explicitly set
28 if( NOT CMAKE_BUILD_TYPE )
29 set(CMAKE_BUILD_TYPE "Release")
32 include(CheckCXXSourceRuns)
33 include(CheckIncludeFiles)
35 # set default buildoptions and print them
36 include(cmake/options.cmake)
38 # turn off PCH totally if enabled (hidden setting, mainly for devs)
44 include(CheckPlatform)
46 # basic packagesearching and setup (further support will be needed, this is a preliminary release!)
47 find_package(PCHSupport)
48 find_package(ACE REQUIRED)
49 find_package(OpenSSL REQUIRED)
50 if( NOT USE_MYSQL_SOURCES )
51 find_package(MySQL REQUIRED)
55 find_package(Readline)
60 # Find revision ID and hash of the sourcetree
61 include(cmake/genrev.cmake)
63 # print out the results before continuing
64 include(cmake/showoptions.cmake)