diff options
author | click <none@none> | 2010-08-20 04:09:39 +0200 |
---|---|---|
committer | click <none@none> | 2010-08-20 04:09:39 +0200 |
commit | 8d62f4e6ce0ecc9ec865c6ffacb218f7e0ea62a2 (patch) | |
tree | c9c3fd76a4ad94f27d4358e8b35b394666c9ff02 /CMakeLists.txt | |
parent | 6501948dc8a512d9724a2813ee7075a37049898b (diff) |
Buildsystem: Add helperscripts to detect SSE2 extensions, and optimize platform compileflags for the architecture
+ minifix in scripts (wrong includedir)
--HG--
branch : trunk
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3579afcb1f6..45ed673a705 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,8 @@ project(TrinityCore) cmake_minimum_required(VERSION 2.6) cmake_policy(SET CMP0005 OLD) +set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") + # # Force out-of-source build # @@ -40,21 +42,36 @@ endif() # Basic packagesearching and setup (further support will be needed, this is a preliminary release!) # +include(MacroEnsureVersion) +include(OptimizeForArchitecture) +include(AddCompilerFlag) +include(CheckCXXSourceRuns) + include(CheckIncludeFiles) -include(cmake/FindPlatform.cmake) -include(cmake/FindPCHSupport.cmake) +include(FindPlatform) + if(WIN32) set(ACE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/dep/acelite) endif() -include(cmake/FindACE.cmake) -include(cmake/FindMySQL.cmake) -include(cmake/FindOpenSSL.cmake) + +find_package(PCHSupport) +find_package(ACE REQUIRED) +find_package(MySQL REQUIRED) +find_package(OpenSSL REQUIRED) if( UNIX ) - include(cmake/FindReadline.cmake) - include(FindZLIB) - include(FindBZip2) + find_package(Readline) + find_package(ZLIB) + find_package(BZip2) endif() +include(cmake/SSETests.cmake) + +# +# Optimize for architecture +# + +OptimizeForArchitecture() + # # Select the Release build configuration by default. # @@ -290,6 +307,7 @@ if( MSVC ) endif() # Multithreaded compiling on VS set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") + add_definitions(-D_CRT_SECURE_NO_WARNINGS) endif() # |