diff --git a/.gitignore b/.gitignore
index 375c0ba46..853e2948a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -80,8 +80,31 @@ cmake_install.cmake
#
# Special exceptions
#
+
+# cmake generated files in sources
+dep/ACE_wrappers/ace/ACE_vc8.vcxproj*
+dep/ACE_wrappers/ace/Backup*
+dep/ACE_wrappers/ace/Debug*
+dep/ACE_wrappers/ace/ETCL/ACE_ETCL_Parser_vc8.vcxproj*
+dep/ACE_wrappers/ace/ETCL/ACE_ETCL_vc8.vcxproj*
+dep/ACE_wrappers/ace/ETCL/Debug*
+dep/ACE_wrappers/ace/ETCL/Release*
+dep/ACE_wrappers/ace/Monitor_Control/Debug*
+dep/ACE_wrappers/ace/Monitor_Control/Monitor_Control_vc8.vcxproj*
+dep/ACE_wrappers/ace/Monitor_Control/Release*
+dep/ACE_wrappers/ace/QoS/Debug*
+dep/ACE_wrappers/ace/QoS/QoS_vc8.vcxproj*
+dep/ACE_wrappers/ace/QoS/Release*
+dep/ACE_wrappers/ace/UpgradeLog*
+dep/ACE_wrappers/ace/Release*
+dep/ACE_wrappers/ace/_UpgradeReport_Files*
+dep/ACE_wrappers/lib/*
+dep/ACE_wrappers/ace/config.h
+
+# ned files from excluded dirs
!dep/ACE_wrappers/ace/ace_message_table.bin
!dep/ACE_wrappers/bin/GNUmakefile.bin
!dep/ACE_wrappers/configure.ac~
!dep/ACE_wrappers/lib/.empty
!dep/tbb/src/Makefile
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 000000000..b66a8c00f
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,423 @@
+#
+# Copyright (C) 2005-2011 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= after 'cmake '.
+ For example: cmake .. -DDEBUG=1 -DPREFIX=/opt/mangos\n"
+) # TODO: PLATFORM: Sets the architecture for compile (X86,X64)
+
+# Override configuration-types - we don't use anything else than debug and release
+if(CMAKE_CONFIGURATION_TYPES)
+ set(CMAKE_CONFIGURATION_TYPES Release Debug)
+ set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING
+ "Reset the configurations to what we need"
+ FORCE)
+endif()
+
+# Find out what system we use to include the needed libs
+if(WIN32)
+ if(PLATFORM MATCHES X86) # 32-bit
+ set(DEP_ARCH win32)
+ else() # 64-bit
+ set(DEP_ARCH x64)
+ endif()
+endif()
+
+# if(WIN32)
+# if(PLATFORM MATCHES X86)
+# set(ARCH_FLAGS "/MACHINE:X86")
+# else()
+# set(ARCH_FLAGS "/MACHINE:X64")
+# endif()
+# elseif(UNIX)
+# if(PLATFORM MATCHES X86)
+# set(ARCH_FLAGS "-m32")
+# else()
+# set(ARCH_FLAGS "-m64")
+# endif()
+# endif()
+
+option(DEBUG "Debug mode" 0)
+# option(CLI "With CLI" 1) # Not used by MaNGOS so far
+# option(RA "With Remote Access" 0) # TODO: support remote access
+option(TBB_USE_EXTERNAL "Use external TBB" 0)
+option(ACE_USE_EXTERNAL "Use external ACE" 0)
+
+find_package(PCHSupport)
+
+# Add options for compile of mangos
+if(PCHSupport_FOUND)
+ if(WIN32)
+ option(PCH "Use precompiled headers" 1)
+ else()
+ option(PCH "Use precompiled headers" 0)
+ endif()
+endif()
+
+# FIXME: options that should be checked
+# option(SQL "Copy SQL files" 0)
+# option(TOOLS "Build tools" 0)
+
+# Set up the install-prefix
+if(PREFIX)
+ string(REGEX REPLACE "^~" "$ENV{HOME}" PREFIX ${PREFIX})
+else()
+ set(PREFIX ${CMAKE_SOURCE_DIR})
+ message(
+ "You probably want to set the PREFIX option. If not set MaNGOS will be installed to ${CMAKE_SOURCE_DIR}."
+ )
+endif()
+set(CMAKE_INSTALL_PREFIX ${PREFIX} CACHE STRING
+ "Install path prefix, prepended onto install directories."
+ FORCE
+)
+
+set(BIN_DIR ${CMAKE_INSTALL_PREFIX}/bin)
+set(CONF_DIR ${CMAKE_INSTALL_PREFIX}/etc)
+# If win32 put it in the bin dir not lib
+if(WIN32)
+ set(LIBS_DIR ${CMAKE_INSTALL_PREFIX}/bin)
+else()
+ set(LIBS_DIR ${CMAKE_INSTALL_PREFIX}/lib)
+endif()
+
+# For Unix systems set the rpath so that libraries are found
+set(CMAKE_INSTALL_RPATH ${LIBS_DIR})
+set(CMAKE_INSTALL_NAME_DIR ${LIBS_DIR})
+# Run out of build tree
+set(CMAKE_BUILD_WITH_INSTALL_RPATH OFF)
+
+# Find needed packages and if necessery abort if something important is missing
+unset(ACE_INCLUDE_DIR CACHE)
+unset(ACE_LIBRARIES CACHE)
+unset(ACE_LIBRARIES_DIR CACHE)
+unset(ACE_INCLUDE_DIR)
+unset(ACE_LIBRARIES)
+unset(ACE_LIBRARIES_DIR)
+if(ACE_USE_EXTERNAL)
+ find_package(ACE)
+ if(NOT ACE_FOUND)
+ message(FATAL_ERROR
+ "This project requires ACE installed when ACE_USE_EXTERNAL is set. Please download the ACE Micro Release Kit from http://download.dre.vanderbilt.edu/ and install it. If this script didn't find ACE and it was correctly installed please set ACE_ROOT to the correct path."
+ )
+ endif()
+ if(EXISTS ${ACE_INCLUDE_DIR}/ace/Stack_Trace.h)
+ set(HAVE_ACE_STACK_TRACE_H ON) # config.h.cmake
+ endif()
+else()
+ include(cmake/ImportACE.cmake)
+endif()
+
+unset(TBB_INCLUDE_DIR CACHE)
+unset(TBB_LIBRARIES CACHE)
+unset(TBB_LIBRARIES_DIR CACHE)
+unset(TBB_INCLUDE_DIR)
+unset(TBB_LIBRARIES)
+unset(TBB_LIBRARIES_DIR)
+if(TBB_USE_EXTERNAL)
+ find_package(TBB)
+ if(NOT TBB_FOUND)
+ message(FATAL_ERROR
+ "This project requires TBB installed when TBB_USE_EXTERNAL is set. Please download the TBB Stable Release from http://www.threadingbuildingblocks.org/ and install it. If this script didn't find TBB and it was correctly installed please set TBB_ROOT to the correct path."
+ )
+ endif()
+else()
+ include(cmake/ImportTBB.cmake)
+endif()
+
+# Win32 delifered packages
+if(WIN32)
+ set(MYSQL_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/dep/include/mysql)
+ set(MYSQL_LIBRARY ${CMAKE_SOURCE_DIR}/dep/lib/${DEP_ARCH}_release/libmySQL.lib)
+ set(MYSQL_DEBUG_LIBRARY ${CMAKE_SOURCE_DIR}/dep/lib/${DEP_ARCH}_debug/libmySQL.lib)
+ set(OPENSSL_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/dep/include/openssl)
+ set(OPENSSL_LIBRARIES ${CMAKE_SOURCE_DIR}/dep/lib/${DEP_ARCH}_release/libeay32.lib)
+ set(OPENSSL_DEBUG_LIBRARIES ${CMAKE_SOURCE_DIR}/dep/lib/${DEP_ARCH}_debug/libeay32.lib)
+ # zlib is build
+endif()
+
+# *nix-specific packages
+if(UNIX)
+ find_package(MySQL REQUIRED)
+ find_package(OpenSSL REQUIRED)
+ find_package(ZLIB REQUIRED)
+endif()
+
+# Add uninstall script and target
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY
+)
+
+add_custom_target(uninstall
+ "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+)
+
+# Find core revision
+if(GIT_EXECUTABLE)
+ execute_process(
+ COMMAND ${GIT_EXECUTABLE} describe
+ WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
+ OUTPUT_VARIABLE GIT_REVISION
+ )
+else()
+ set(GIT_REVISION "Git not found")
+endif()
+
+message("")
+message("MaNGOS-Core revision : ${GIT_REVISION}")
+message("Install server to : ${CMAKE_INSTALL_PREFIX}")
+message("")
+
+# if(CLI)
+# message("Build with CLI : Yes (default)")
+# add_definitions(-DENABLE_CLI)
+# else()
+# message("Build with CLI : No")
+# endif()
+
+# if(RA)
+# message("* Build with RA : Yes")
+# add_definitions(-DENABLE_RA)
+# else(RA)
+# message("* Build with RA : No (default)")
+# endif(RA)
+
+if(PCH AND NOT PCHSupport_FOUND)
+ set(PCH 0 CACHE BOOL
+ "Use precompiled headers"
+ FORCE)
+ message(
+ "No PCH for your system possible but PCH was set to 1. Resetting it."
+ )
+endif()
+if(PCH)
+ message("Use PCH : Yes")
+else()
+ message("Use PCH : No")
+endif()
+
+if(DEBUG)
+ message("Build in debug-mode : Yes")
+ set(CMAKE_BUILD_TYPE Debug)
+else()
+ set(CMAKE_BUILD_TYPE Release)
+ message("Build in debug-mode : No (default)")
+endif()
+# Handle debugmode compiles (this will require further work for proper WIN32-setups)
+if(UNIX)
+ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g")
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g")
+endif()
+
+# Set warning levels for different builds
+if(UNIX)
+ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} --no-warnings")
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} --no-warnings")
+ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wfatal-errors -Wextra")
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wfatal-errors -Wextra")
+elseif(WIN32)
+ # Disable warnings in Visual Studio 8 and above
+ if(MSVC AND NOT CMAKE_GENERATOR MATCHES "Visual Studio 7")
+ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /wd4996 /wd4355 /wd4244 /wd4985 /wd4267")
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /wd4996 /wd4355 /wd4244 /wd4267")
+ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /wd4996 /wd4355 /wd4244 /wd4985 /wd4267")
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /wd4996 /wd4355 /wd4244 /wd4985 /wd4267")
+ endif()
+endif()
+
+# if(SQL)
+# message("Install SQL-files : Yes")
+# else()
+# message("Install SQL-files : No (default)")
+# endif()
+
+# if(TOOLS)
+# message("Build map/vmap tools : Yes")
+# else()
+# message("Build map/vmap tools : No (default)")
+# endif()
+
+message("")
+
+# Some small tweaks for Visual Studio 7 and above.
+if(MSVC)
+ # Mark 32 bit executables large address aware so they can use > 2GB address space
+ if(PLATFORM MATCHES X86)
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
+ endif()
+endif()
+
+set(CMAKE_SKIP_BUILD_RPATH FALSE)
+set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
+set(CMAKE_INSTALL_RPATH ${LIBS_DIR})
+set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+
+# Generate revision-extractor
+set(GENREV_SRC
+ src/tools/genrevision/genrevision.cpp
+)
+
+add_executable(genrev
+ ${GENREV_SRC}
+)
+
+# if(WIN32)
+# set_target_properties(genrev PROPERTIES
+# COMPILE_FLAGS "/MACHINE:X86"
+# )
+# elseif(UNIX)
+# set_target_properties(genrev PROPERTIES
+# COMPILE_FLAGS "-m32"
+# LINK_FLAGS "-m32"
+# )
+# endif()
+# if(XCODE)
+# set_target_properties(genrev PROPERTIES
+# XCODE_ATTRIBUTE_ARCHS "i386"
+# )
+# endif()
+
+get_target_property(GENERATE_EXE genrev LOCATION)
+add_custom_target("revision.h" ALL
+ COMMAND ${GENERATE_EXE} ${CMAKE_SOURCE_DIR}
+ WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
+ DEPENDS genrev
+)
+
+if(WIN32)
+ install(
+ FILES
+ ${CMAKE_SOURCE_DIR}/dep/lib/${DEP_ARCH}_release/libeay32.dll
+ ${CMAKE_SOURCE_DIR}/dep/lib/${DEP_ARCH}_release/libmySQL.dll
+ DESTINATION ${LIBS_DIR}
+ CONFIGURATIONS Release
+ )
+ install(
+ FILES
+ ${CMAKE_SOURCE_DIR}/dep/lib/${DEP_ARCH}_debug/libeay32.dll
+ ${CMAKE_SOURCE_DIR}/dep/lib/${DEP_ARCH}_debug/libmySQL.dll
+ DESTINATION ${LIBS_DIR}
+ CONFIGURATIONS Debug
+ )
+ if(PLATFORM MATCHES X86)
+ # Special thing for debug and 32-bit
+ set(WIN_DEBUGLIBS
+ ${CMAKE_SOURCE_DIR}/dep/lib/win32_debug/vld.lib
+ )
+ # Copy dll's Windows needs
+ install(
+ FILES
+ ${CMAKE_SOURCE_DIR}/dep/lib/win32_release/dbghelp.dll
+ DESTINATION ${LIBS_DIR}
+ CONFIGURATIONS Release
+ )
+ install(
+ FILES
+ ${CMAKE_SOURCE_DIR}/dep/lib/win32_debug/vld.dll
+ ${CMAKE_SOURCE_DIR}/dep/lib/win32_debug/dbghelp.dll
+ DESTINATION ${LIBS_DIR}
+ CONFIGURATIONS Debug
+ )
+ endif()
+endif()
+
+# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ARCH_FLAGS}")
+# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARCH_FLAGS}")
+# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${ARCH_FLAGS}")
+if(XCODE)
+ if(PLATFORM MATCHES X86)
+ set(CMAKE_OSX_ARCHITECTURES i386)
+ else()
+ set(CMAKE_OSX_ARCHITECTURES x86_64)
+ endif()
+endif()
+
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
+
+add_subdirectory(dep) # TODO: add vmap extractor build support
+
+# Add definitions for all build types
+# Don't place this above 'dep' subdirectory! Because of defines build will crash.
+set(DEFINITIONS
+ DO_MYSQL
+ HAVE_CONFIG_H
+ VERSION="${MANGOS_VERSION}"
+ SYSCONFDIR="${CONF_DIR}/"
+)
+set(DEFINITIONS_RELEASE NDEBUG)
+set(DEFINITIONS_DEBUG _DEBUG MANGOS_DEBUG)
+if(WIN32)
+ set(DEFINITIONS ${DEFINITIONS} WIN32 _WIN32)
+ set(DEFINITIONS_RELEASE ${DEFINITIONS_RELEASE} _CRT_SECURE_NO_WARNINGS)
+endif()
+
+set_directory_properties(PROPERTIES COMPILE_DEFINITIONS "${DEFINITIONS}")
+set_directory_properties(PROPERTIES COMPILE_DEFINITIONS_RELEASE "${DEFINITIONS_RELEASE}")
+set_directory_properties(PROPERTIES COMPILE_DEFINITIONS_DEBUG "${DEFINITIONS_DEBUG}")
+
+add_subdirectory(src)
+# if(SQL)
+# add_subdirectory(sql)
+# endif()
\ No newline at end of file
diff --git a/cmake/FindACE.cmake b/cmake/FindACE.cmake
new file mode 100644
index 000000000..ae4fa5492
--- /dev/null
+++ b/cmake/FindACE.cmake
@@ -0,0 +1,68 @@
+#
+# Find the ACE client includes and library
+#
+
+# This module defines
+# ACE_INCLUDE_DIR, where to find ace.h
+# ACE_LIBRARIES, the libraries to link against
+# ACE_FOUND, if false, you cannot build anything that requires ACE
+
+# also defined, but not for general use are
+# ACE_LIBRARY, where to find the ACE library.
+
+set( ACE_FOUND 0 )
+if ( UNIX )
+ FIND_PATH( ACE_INCLUDE_DIR
+ NAMES
+ ace/ACE.h
+ PATHS
+ /usr/include
+ /usr/include/ace
+ /usr/local/include
+ /usr/local/include/ace
+ ${ACE_ROOT}
+ ${ACE_ROOT}/include
+ $ENV{ACE_ROOT}
+ $ENV{ACE_ROOT}/include
+ # ${CMAKE_SOURCE_DIR}/dep/ACE_wrappers
+ DOC
+ "Specify include-directories that might contain ace.h here."
+ )
+ FIND_LIBRARY( ACE_LIBRARIES
+ NAMES
+ ace ACE
+ PATHS
+ /usr/lib
+ /usr/lib/ace
+ /usr/local/lib
+ /usr/local/lib/ace
+ /usr/local/ace/lib
+ ${ACE_ROOT}
+ ${ACE_ROOT}/lib
+ $ENV{ACE_ROOT}/lib
+ $ENV{ACE_ROOT}
+ DOC "Specify library-locations that might contain the ACE library here."
+ )
+
+# FIND_LIBRARY( ACE_EXTRA_LIBRARIES
+# NAMES
+# z zlib
+# PATHS
+# /usr/lib
+# /usr/local/lib
+# DOC
+# "if more libraries are necessary to link into ACE, specify them here."
+# )
+
+ if ( ACE_LIBRARIES )
+ if ( ACE_INCLUDE_DIR )
+ set( ACE_FOUND 1 )
+ message( STATUS "Found ACE library: ${ACE_LIBRARIES}")
+ message( STATUS "Found ACE headers: ${ACE_INCLUDE_DIR}")
+ else ( ACE_INCLUDE_DIR )
+ message(FATAL_ERROR "Could not find ACE headers! Please install ACE libraries and headers")
+ endif ( ACE_INCLUDE_DIR )
+ endif ( ACE_LIBRARIES )
+
+ mark_as_advanced( ACE_FOUND ACE_LIBRARIES ACE_EXTRA_LIBRARIES ACE_INCLUDE_DIR )
+endif (UNIX)
diff --git a/cmake/FindGit.cmake b/cmake/FindGit.cmake
new file mode 100644
index 000000000..2d8214287
--- /dev/null
+++ b/cmake/FindGit.cmake
@@ -0,0 +1,46 @@
+# The module defines the following variables:
+# GIT_EXECUTABLE - path to git command line client
+# GIT_FOUND - true if the command line client was found
+# Example usage:
+# find_package(Git)
+# if(GIT_FOUND)
+# message("git found: ${GIT_EXECUTABLE}")
+# endif()
+
+#=============================================================================
+# Copyright 2010 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+# Look for 'git' or 'eg' (easy git)
+#
+set(git_names git eg)
+
+# Prefer .cmd variants on Windows unless running in a Makefile
+# in the MSYS shell.
+#
+if(WIN32)
+ if(NOT CMAKE_GENERATOR MATCHES "MSYS")
+ set(git_names git.cmd git eg.cmd eg)
+ endif()
+endif()
+
+find_program(GIT_EXECUTABLE
+ NAMES ${git_names}
+ DOC "git command line client"
+ )
+mark_as_advanced(GIT_EXECUTABLE)
+
+# Handle the QUIETLY and REQUIRED arguments and set GIT_FOUND to TRUE if
+# all listed variables are TRUE
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Git DEFAULT_MSG GIT_EXECUTABLE)
diff --git a/cmake/FindMySQL.cmake b/cmake/FindMySQL.cmake
new file mode 100644
index 000000000..ae7db0bb2
--- /dev/null
+++ b/cmake/FindMySQL.cmake
@@ -0,0 +1,152 @@
+#
+# Find the MySQL client includes and library
+#
+
+# This module defines
+# MYSQL_INCLUDE_DIR, where to find mysql.h
+# MYSQL_LIBRARIES, the libraries to link against to connect to MySQL
+# MYSQL_FOUND, if false, you cannot build anything that requires MySQL.
+
+# also defined, but not for general use are
+# MYSQL_LIBRARY, where to find the MySQL library.
+
+set( MYSQL_FOUND 0 )
+
+if( UNIX )
+ set(MYSQL_CONFIG_PREFER_PATH "$ENV{MYSQL_HOME}/bin" CACHE FILEPATH
+ "preferred path to MySQL (mysql_config)"
+ )
+
+ find_program(MYSQL_CONFIG mysql_config
+ ${MYSQL_CONFIG_PREFER_PATH}
+ /usr/local/mysql/bin/
+ /usr/local/bin/
+ /usr/bin/
+ )
+
+ if( MYSQL_CONFIG )
+ message(STATUS "Using mysql-config: ${MYSQL_CONFIG}")
+ # set INCLUDE_DIR
+ exec_program(${MYSQL_CONFIG}
+ ARGS --include
+ OUTPUT_VARIABLE MY_TMP
+ )
+
+ string(REGEX REPLACE "-I([^ ]*)( .*)?" "\\1" MY_TMP "${MY_TMP}")
+ set(MYSQL_ADD_INCLUDE_PATH ${MY_TMP} CACHE FILEPATH INTERNAL)
+ #message("[DEBUG] MYSQL ADD_INCLUDE_PATH : ${MYSQL_ADD_INCLUDE_PATH}")
+ # set LIBRARY_DIR
+ exec_program(${MYSQL_CONFIG}
+ ARGS --libs_r
+ OUTPUT_VARIABLE MY_TMP
+ )
+ set(MYSQL_ADD_LIBRARIES "")
+ string(REGEX MATCHALL "-l[^ ]*" MYSQL_LIB_LIST "${MY_TMP}")
+ foreach(LIB ${MYSQL_LIB_LIST})
+ string(REGEX REPLACE "[ ]*-l([^ ]*)" "\\1" LIB "${LIB}")
+ list(APPEND MYSQL_ADD_LIBRARIES "${LIB}")
+ #message("[DEBUG] MYSQL ADD_LIBRARIES : ${MYSQL_ADD_LIBRARIES}")
+ endforeach(LIB ${MYSQL_LIB_LIST})
+
+ set(MYSQL_ADD_LIBRARIES_PATH "")
+ string(REGEX MATCHALL "-L[^ ]*" MYSQL_LIBDIR_LIST "${MY_TMP}")
+ foreach(LIB ${MYSQL_LIBDIR_LIST})
+ string(REGEX REPLACE "[ ]*-L([^ ]*)" "\\1" LIB "${LIB}")
+ list(APPEND MYSQL_ADD_LIBRARIES_PATH "${LIB}")
+ #message("[DEBUG] MYSQL ADD_LIBRARIES_PATH : ${MYSQL_ADD_LIBRARIES_PATH}")
+ endforeach(LIB ${MYSQL_LIBS})
+
+ else( MYSQL_CONFIG )
+ set(MYSQL_ADD_LIBRARIES "")
+ list(APPEND MYSQL_ADD_LIBRARIES "mysqlclient_r")
+ endif( MYSQL_CONFIG )
+endif( UNIX )
+
+find_path(MYSQL_INCLUDE_DIR
+ NAMES
+ mysql.h
+ PATHS
+ ${MYSQL_ADD_INCLUDE_PATH}
+ /usr/include
+ /usr/include/mysql
+ /usr/local/include
+ /usr/local/include/mysql
+ /usr/local/mysql/include
+ "C:/Program Files/MySQL/include"
+ "C:/Program Files/MySQL/MySQL Server 5.0/include"
+ "C:/Program Files/MySQL/MySQL Server 5.1/include"
+ "C:/MySQL/include"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.0;Location]/include"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.1;Location]/include"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.0;Location]/include"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.1;Location]/include"
+ "c:/msys/local/include"
+ DOC
+ "Specify the directory containing mysql.h."
+)
+
+if( UNIX )
+foreach(LIB ${MYSQL_ADD_LIBRARIES})
+ find_library( MYSQL_LIBRARY
+ NAMES
+ mysql libmysql ${LIB}
+ PATHS
+ ${MYSQL_ADD_LIBRARIES_PATH}
+ /usr/lib
+ /usr/lib/mysql
+ /usr/local/lib
+ /usr/local/lib/mysql
+ /usr/local/mysql/lib
+ DOC "Specify the location of the mysql library here."
+ )
+endforeach(LIB ${MYSQL_ADD_LIBRARY})
+endif( UNIX )
+
+if( WIN32 )
+ find_library( MYSQL_LIBRARY
+ NAMES
+ mysql libmysql ${LIB}
+ PATHS
+ ${MYSQL_ADD_LIBRARIES_PATH}
+ "C:/Program Files/MySQL/lib"
+ "C:/Program Files/MySQL/MySQL Server 5.0/lib/opt"
+ "C:/Program Files/MySQL/MySQL Server 5.1/lib/opt"
+ "C:/MySQL/lib/debug"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.0;Location]/lib/opt"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.1;Location]/lib/opt"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.0;Location]/lib/opt"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.1;Location]/lib/opt"
+ "c:/msys/local/include"
+ DOC "Specify the location of the mysql library here."
+ )
+endif( WIN32 )
+
+# On Windows you typically don't need to include any extra libraries
+# to build MYSQL stuff.
+
+if( NOT WIN32 )
+ find_library( MYSQL_EXTRA_LIBRARIES
+ NAMES
+ z zlib
+ PATHS
+ /usr/lib
+ /usr/local/lib
+ DOC
+ "if more libraries are necessary to link in a MySQL client (typically zlib), specify them here."
+ )
+else( NOT WIN32 )
+ set( MYSQL_EXTRA_LIBRARIES "" )
+endif( NOT WIN32 )
+
+if( MYSQL_LIBRARY )
+ if( MYSQL_INCLUDE_DIR )
+ set( MYSQL_FOUND 1 )
+ message(STATUS "Found MySQL library: ${MYSQL_LIBRARY}")
+ message(STATUS "Found MySQL headers: ${MYSQL_INCLUDE_DIR}")
+ else( MYSQL_INCLUDE_DIR )
+ message(FATAL_ERROR "Could not find MySQL headers! Please install the development-libraries and headers.")
+ endif( MYSQL_INCLUDE_DIR )
+ mark_as_advanced( MYSQL_FOUND MYSQL_LIBRARY MYSQL_EXTRA_LIBRARIES MYSQL_INCLUDE_DIR )
+else( MYSQL_LIBRARY )
+ message(FATAL_ERROR "Could not find the MySQL libraries! Please install the development-libraries and headers.")
+endif( MYSQL_LIBRARY )
diff --git a/cmake/FindOpenSSL.cmake b/cmake/FindOpenSSL.cmake
new file mode 100644
index 000000000..d15f8a13d
--- /dev/null
+++ b/cmake/FindOpenSSL.cmake
@@ -0,0 +1,107 @@
+#
+# Find the OpenSSL client includes and library
+#
+
+# This module defines
+# OPENSSL_INCLUDE_DIR, where to find openssl.h
+# OPENSSL_LIBRARIES, the libraries to link against to connect to MySQL
+# OPENSSL_FOUND, if false, you cannot build anything that requires MySQL.
+
+# also defined, but not for general use are
+# OPENSSL_LIBRARY, where to find the MySQL library.
+
+if( OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES )
+ # in cache already
+ set(OPENSSL_FOUND 1)
+else( OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES )
+ set(OPENSSL_FOUND 0)
+
+ if(WIN32)
+ if(PLATFORM MATCHES X64)
+ set(TMP_OPENSSL_INCLUDE_DIR
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (64-bit)_is1;InstallLocation]/include/openssl"
+ )
+ set(TMP_OPENSSL_LIBRARIES
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (64-bit)_is1;InstallLocation]/lib"
+ )
+ else()
+ set(TMP_OPENSSL_INCLUDE_DIR
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;InstallLocation]/include/openssl"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;InstallLocation]/include/openssl"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;InstallLocation]/include/openssl"
+ )
+ set(TMP_OPENSSL_LIBRARIES
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;InstallLocation]/lib"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;InstallLocation]/lib"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;InstallLocation]/lib"
+ )
+ endif()
+ endif()
+
+ find_path(OPENSSL_INCLUDE_DIR
+ NAMES
+ ssl.h
+ PATHS
+ /usr/include
+ /usr/include/openssl
+ /usr/local/include
+ /usr/local/include/openssl
+ /usr/local/openssl/include
+ ${TMP_OPENSSL_INCLUDE_DIR}
+ DOC
+ "Specify the directory containing openssl.h."
+ )
+
+ find_library(OPENSSL_LIBRARIES
+ NAMES
+ ssleay32
+ ssl
+ PATHS
+ /usr/lib
+ /usr/lib/ssl
+ /usr/local/lib
+ /usr/local/lib/ssl
+ /usr/local/ssl/lib
+ ${TMP_OPENSSL_LIBRARIES}
+ DOC "Specify the OpenSSL library here."
+ )
+
+ if( WIN32 )
+ find_library(OPENSSL_EXTRA_LIBRARIES
+ NAMES
+ libeay32
+ PATHS
+ ${TMP_OPENSSL_LIBRARIES}
+ DOC
+ "if more libraries are necessary to link in a OpenSSL client, specify them here."
+ )
+ endif( WIN32 )
+
+ if( UNIX )
+ find_library(OPENSSL_EXTRA_LIBRARIES
+ NAMES
+ crypto
+ PATHS
+ /usr/lib
+ /usr/lib/ssl
+ /usr/local/lib
+ /usr/local/lib/ssl
+ /usr/local/ssl/lib
+ ${TMP_OPENSSL_LIBRARIES}
+ DOC "if more libraries are necessary to link in a OpenSSL client, specify them here."
+ )
+ endif()
+
+ if( OPENSSL_LIBRARIES )
+ if( OPENSSL_INCLUDE_DIR )
+ set( OPENSSL_FOUND 1 )
+ message(STATUS "Found OpenSSL library: ${OPENSSL_LIBRARIES}")
+ message(STATUS "Found OpenSSL headers: ${OPENSSL_INCLUDE_DIR}")
+ else ( OPENSSL_INCLUDE_DIR )
+ message(FATAL_ERROR "Could not find OpenSSL headers! Please install the development-headers")
+ endif( OPENSSL_INCLUDE_DIR )
+ else( OPENSSL_LIBRARIES )
+ message(FATAL_ERROR "Could not find OpenSSL libraries! Please install the library before continuing")
+ endif( OPENSSL_LIBRARIES )
+ mark_as_advanced( OPENSSL_FOUND OPENSSL_LIBRARIES OPENSSL_EXTRA_LIBRARIES OPENSSL_INCLUDE_DIR )
+endif( OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES )
diff --git a/cmake/FindPCHSupport.cmake b/cmake/FindPCHSupport.cmake
new file mode 100644
index 000000000..f00db2a5a
--- /dev/null
+++ b/cmake/FindPCHSupport.cmake
@@ -0,0 +1,322 @@
+# - Try to find precompiled headers support for GCC 3.4 and 4.x
+# Once done this will define:
+#
+# Variable:
+# PCHSupport_FOUND
+#
+# Macro:
+# ADD_PRECOMPILED_HEADER _targetName _input _dowarn
+# ADD_PRECOMPILED_HEADER_TO_TARGET _targetName _input _pch_output_to_use _dowarn
+# ADD_NATIVE_PRECOMPILED_HEADER _targetName _input _dowarn
+# GET_NATIVE_PRECOMPILED_HEADER _targetName _input
+
+IF(CMAKE_COMPILER_IS_GNUCXX)
+
+ EXEC_PROGRAM(
+ ${CMAKE_CXX_COMPILER}
+ ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
+ OUTPUT_VARIABLE gcc_compiler_version)
+ #MESSAGE("GCC Version: ${gcc_compiler_version}")
+ IF(gcc_compiler_version MATCHES "4\\.[0-9]\\.[0-9]")
+ SET(PCHSupport_FOUND TRUE)
+ ELSE(gcc_compiler_version MATCHES "4\\.[0-9]\\.[0-9]")
+ IF(gcc_compiler_version MATCHES "3\\.4\\.[0-9]")
+ SET(PCHSupport_FOUND TRUE)
+ ENDIF(gcc_compiler_version MATCHES "3\\.4\\.[0-9]")
+ ENDIF(gcc_compiler_version MATCHES "4\\.[0-9]\\.[0-9]")
+
+ SET(_PCH_include_prefix "-I")
+
+ELSE(CMAKE_COMPILER_IS_GNUCXX)
+ IF(WIN32)
+ SET(PCHSupport_FOUND TRUE) # for experimental msvc support
+ SET(_PCH_include_prefix "/I")
+ ELSE(WIN32)
+ SET(PCHSupport_FOUND FALSE)
+ ENDIF(WIN32)
+ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+
+
+MACRO(_PCH_GET_COMPILE_FLAGS _out_compile_flags)
+
+
+ STRING(TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" _flags_var_name)
+ SET(${_out_compile_flags} ${${_flags_var_name}} )
+
+ IF(CMAKE_COMPILER_IS_GNUCXX)
+
+ GET_TARGET_PROPERTY(_targetType ${_PCH_current_target} TYPE)
+ IF(${_targetType} STREQUAL SHARED_LIBRARY)
+ LIST(APPEND ${_out_compile_flags} "${${_out_compile_flags}} -fPIC")
+ ENDIF(${_targetType} STREQUAL SHARED_LIBRARY)
+
+ ELSE(CMAKE_COMPILER_IS_GNUCXX)
+ ## TODO ... ? or does it work out of the box
+ ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+
+ GET_DIRECTORY_PROPERTY(DIRINC INCLUDE_DIRECTORIES)
+ FOREACH(item ${DIRINC})
+ LIST(APPEND ${_out_compile_flags} "${_PCH_include_prefix}${item}")
+ ENDFOREACH(item)
+
+ GET_DIRECTORY_PROPERTY(_directory_flags COMPILE_DEFINITIONS)
+ # MESSAGE("_directory_flags ${_directory_flags}" )
+
+ FOREACH(define ${_directory_flags})
+ LIST(APPEND ${_out_compile_flags} -D${define})
+ ENDFOREACH(define)
+ LIST(APPEND ${_out_compile_flags} ${CMAKE_CXX_FLAGS} )
+
+ SEPARATE_ARGUMENTS(${_out_compile_flags})
+
+ENDMACRO(_PCH_GET_COMPILE_FLAGS)
+
+
+MACRO(_PCH_WRITE_PCHDEP_CXX _targetName _include_file _dephelp)
+
+ SET(${_dephelp} ${CMAKE_CURRENT_BINARY_DIR}/${_targetName}_pch_dephelp.cxx)
+ FILE(WRITE ${${_dephelp}}
+"#include \"${_include_file}\"
+int testfunction()
+{
+ return 0;
+}
+"
+ )
+
+ENDMACRO(_PCH_WRITE_PCHDEP_CXX )
+
+MACRO(_PCH_GET_COMPILE_COMMAND out_command _input _output)
+
+ FILE(TO_NATIVE_PATH ${_input} _native_input)
+ FILE(TO_NATIVE_PATH ${_output} _native_output)
+
+
+ IF(CMAKE_COMPILER_IS_GNUCXX)
+ IF(CMAKE_CXX_COMPILER_ARG1)
+ # remove leading space in compiler argument
+ STRING(REGEX REPLACE "^ +" "" pchsupport_compiler_cxx_arg1 ${CMAKE_CXX_COMPILER_ARG1})
+
+ SET(${out_command}
+ ${CMAKE_CXX_COMPILER} ${pchsupport_compiler_cxx_arg1} ${_compile_FLAGS} -x c++-header -o ${_output} ${_input}
+ )
+ ELSE(CMAKE_CXX_COMPILER_ARG1)
+ SET(${out_command}
+ ${CMAKE_CXX_COMPILER} ${_compile_FLAGS} -x c++-header -o ${_output} ${_input}
+ )
+ ENDIF(CMAKE_CXX_COMPILER_ARG1)
+ ELSE(CMAKE_COMPILER_IS_GNUCXX)
+
+ SET(_dummy_str "#include <${_input}>")
+ FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/pch_dummy.cpp ${_dummy_str})
+
+ SET(${out_command}
+ ${CMAKE_CXX_COMPILER} ${_compile_FLAGS} /c /Fp${_native_output} /Yc${_native_input} pch_dummy.cpp
+ )
+ #/out:${_output}
+
+ ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+
+ENDMACRO(_PCH_GET_COMPILE_COMMAND )
+
+
+
+MACRO(_PCH_GET_TARGET_COMPILE_FLAGS _cflags _header_name _pch_path _dowarn )
+
+ FILE(TO_NATIVE_PATH ${_pch_path} _native_pch_path)
+
+ IF(CMAKE_COMPILER_IS_GNUCXX)
+ # for use with distcc and gcc >4.0.1 if preprocessed files are accessible
+ # on all remote machines set
+ # PCH_ADDITIONAL_COMPILER_FLAGS to -fpch-preprocess
+ # if you want warnings for invalid header files (which is very inconvenient
+ # if you have different versions of the headers for different build types
+ # you may set _pch_dowarn
+ IF (_dowarn)
+ SET(${_cflags} "${PCH_ADDITIONAL_COMPILER_FLAGS} -include ${CMAKE_CURRENT_BINARY_DIR}/${_header_name} -Winvalid-pch " )
+ ELSE (_dowarn)
+ SET(${_cflags} "${PCH_ADDITIONAL_COMPILER_FLAGS} -include ${CMAKE_CURRENT_BINARY_DIR}/${_header_name} " )
+ ENDIF (_dowarn)
+ ELSE(CMAKE_COMPILER_IS_GNUCXX)
+
+ set(${_cflags} "/Fp${_native_pch_path} /Yu${_header_name}" )
+
+ ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+
+ENDMACRO(_PCH_GET_TARGET_COMPILE_FLAGS )
+
+MACRO(GET_PRECOMPILED_HEADER_OUTPUT _targetName _input _output)
+ GET_FILENAME_COMPONENT(_name ${_input} NAME)
+ GET_FILENAME_COMPONENT(_path ${_input} PATH)
+ SET(_output "${CMAKE_CURRENT_BINARY_DIR}/${_name}.gch/${_targetName}_${CMAKE_BUILD_TYPE}.h++")
+ENDMACRO(GET_PRECOMPILED_HEADER_OUTPUT _targetName _input)
+
+
+MACRO(ADD_PRECOMPILED_HEADER_TO_TARGET _targetName _input _pch_output_to_use )
+
+ # to do: test whether compiler flags match between target _targetName
+ # and _pch_output_to_use
+ GET_FILENAME_COMPONENT(_name ${_input} NAME)
+
+ IF( "${ARGN}" STREQUAL "0")
+ SET(_dowarn 0)
+ ELSE( "${ARGN}" STREQUAL "0")
+ SET(_dowarn 1)
+ ENDIF("${ARGN}" STREQUAL "0")
+
+
+ _PCH_GET_TARGET_COMPILE_FLAGS(_target_cflags ${_name} ${_pch_output_to_use} ${_dowarn})
+ # MESSAGE("Add flags ${_target_cflags} to ${_targetName} " )
+ SET_TARGET_PROPERTIES(${_targetName}
+ PROPERTIES
+ COMPILE_FLAGS ${_target_cflags}
+ )
+
+ ADD_CUSTOM_TARGET(pch_Generate_${_targetName}
+ DEPENDS ${_pch_output_to_use}
+ )
+
+ ADD_DEPENDENCIES(${_targetName} pch_Generate_${_targetName} )
+
+ENDMACRO(ADD_PRECOMPILED_HEADER_TO_TARGET)
+
+MACRO(ADD_PRECOMPILED_HEADER _targetName _input)
+
+ SET(_PCH_current_target ${_targetName})
+
+ IF(NOT CMAKE_BUILD_TYPE)
+ MESSAGE(FATAL_ERROR
+ "This is the ADD_PRECOMPILED_HEADER macro. "
+ "You must set CMAKE_BUILD_TYPE!"
+ )
+ ENDIF(NOT CMAKE_BUILD_TYPE)
+
+ IF( "${ARGN}" STREQUAL "0")
+ SET(_dowarn 0)
+ ELSE( "${ARGN}" STREQUAL "0")
+ SET(_dowarn 1)
+ ENDIF("${ARGN}" STREQUAL "0")
+
+
+ GET_FILENAME_COMPONENT(_name ${_input} NAME)
+ GET_FILENAME_COMPONENT(_path ${_input} PATH)
+ GET_PRECOMPILED_HEADER_OUTPUT( ${_targetName} ${_input} _output)
+
+ GET_FILENAME_COMPONENT(_outdir ${_output} PATH )
+
+ GET_TARGET_PROPERTY(_targetType ${_PCH_current_target} TYPE)
+ _PCH_WRITE_PCHDEP_CXX(${_targetName} ${_input} _pch_dephelp_cxx)
+
+ IF(${_targetType} STREQUAL SHARED_LIBRARY)
+ ADD_LIBRARY(${_targetName}_pch_dephelp SHARED ${_pch_dephelp_cxx} )
+ ELSE(${_targetType} STREQUAL SHARED_LIBRARY)
+ ADD_LIBRARY(${_targetName}_pch_dephelp STATIC ${_pch_dephelp_cxx})
+ ENDIF(${_targetType} STREQUAL SHARED_LIBRARY)
+
+ FILE(MAKE_DIRECTORY ${_outdir})
+
+
+ _PCH_GET_COMPILE_FLAGS(_compile_FLAGS)
+
+ #MESSAGE("_compile_FLAGS: ${_compile_FLAGS}")
+ #message("COMMAND ${CMAKE_CXX_COMPILER} ${_compile_FLAGS} -x c++-header -o ${_output} ${_input}")
+ SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/${_name} PROPERTIES GENERATED 1)
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_name}
+ COMMAND ${CMAKE_COMMAND} -E copy ${_input} ${CMAKE_CURRENT_BINARY_DIR}/${_name} # ensure same directory! Required by gcc
+ DEPENDS ${_input}
+ )
+
+ #message("_command ${_input} ${_output}")
+ _PCH_GET_COMPILE_COMMAND(_command ${CMAKE_CURRENT_BINARY_DIR}/${_name} ${_output} )
+
+ #message(${_input} )
+ #message("_output ${_output}")
+
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${_output}
+ COMMAND ${_command}
+ DEPENDS ${_input} ${CMAKE_CURRENT_BINARY_DIR}/${_name} ${_targetName}_pch_dephelp
+ )
+
+
+ ADD_PRECOMPILED_HEADER_TO_TARGET(${_targetName} ${_input} ${_output} ${_dowarn})
+ENDMACRO(ADD_PRECOMPILED_HEADER)
+
+
+# Generates the use of precompiled in a target,
+# without using depency targets (2 extra for each target)
+# Using Visual, must also add ${_targetName}_pch to sources
+# Not needed by Xcode
+
+MACRO(GET_NATIVE_PRECOMPILED_HEADER _targetName _input)
+
+ if(CMAKE_GENERATOR MATCHES Visual*)
+
+ SET(_dummy_str "#include \"${_input}\"\n"
+ "// This is required to suppress LNK4221. Very annoying.\n"
+ "void *g_${_targetName}Dummy = 0\;\n")
+
+ # Use of cxx extension for generated files (as Qt does)
+ SET(${_targetName}_pch ${CMAKE_CURRENT_BINARY_DIR}/${_targetName}_pch.cxx)
+ if(EXISTS ${${_targetName}_pch})
+ # Check if contents is the same, if not rewrite
+ # todo
+ else(EXISTS ${${_targetName}_pch})
+ FILE(WRITE ${${_targetName}_pch} ${_dummy_str})
+ endif(EXISTS ${${_targetName}_pch})
+ endif(CMAKE_GENERATOR MATCHES Visual*)
+
+ENDMACRO(GET_NATIVE_PRECOMPILED_HEADER)
+
+
+MACRO(ADD_NATIVE_PRECOMPILED_HEADER _targetName _input)
+
+ IF( "${ARGN}" STREQUAL "0")
+ SET(_dowarn 0)
+ ELSE( "${ARGN}" STREQUAL "0")
+ SET(_dowarn 1)
+ ENDIF("${ARGN}" STREQUAL "0")
+
+ if(CMAKE_GENERATOR MATCHES Visual*)
+ # Auto include the precompile (useful for moc processing, since the use of
+ # precompiled is specified at the target level
+ # and I don't want to specifiy /F- for each moc/res/ui generated files (using Qt)
+
+ GET_TARGET_PROPERTY(oldProps ${_targetName} COMPILE_FLAGS)
+ if (${oldProps} MATCHES NOTFOUND)
+ SET(oldProps "")
+ endif(${oldProps} MATCHES NOTFOUND)
+
+ SET(newProperties "${oldProps} /Yu\"${_input}\" /FI\"${_input}\"")
+ SET_TARGET_PROPERTIES(${_targetName} PROPERTIES COMPILE_FLAGS "${newProperties}")
+
+ #also inlude ${oldProps} to have the same compile options
+ SET_SOURCE_FILES_PROPERTIES(${${_targetName}_pch} PROPERTIES COMPILE_FLAGS "${oldProps} /Yc\"${_input}\"")
+
+ else(CMAKE_GENERATOR MATCHES Visual*)
+
+ if (CMAKE_GENERATOR MATCHES Xcode)
+ # For Xcode, cmake needs my patch to process
+ # GCC_PREFIX_HEADER and GCC_PRECOMPILE_PREFIX_HEADER as target properties
+
+ GET_TARGET_PROPERTY(oldProps ${_targetName} COMPILE_FLAGS)
+ if (${oldProps} MATCHES NOTFOUND)
+ SET(oldProps "")
+ endif(${oldProps} MATCHES NOTFOUND)
+
+ # When buiding out of the tree, precompiled may not be located
+ # Use full path instead.
+ GET_FILENAME_COMPONENT(fullPath ${_input} ABSOLUTE)
+
+ SET_TARGET_PROPERTIES(${_targetName} PROPERTIES XCODE_ATTRIBUTE_GCC_PREFIX_HEADER "${fullPath}")
+ SET_TARGET_PROPERTIES(${_targetName} PROPERTIES XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER "YES")
+
+ else (CMAKE_GENERATOR MATCHES Xcode)
+
+ #Fallback to the "old" precompiled suppport
+ #ADD_PRECOMPILED_HEADER(${_targetName} ${_input} ${_dowarn})
+ endif(CMAKE_GENERATOR MATCHES Xcode)
+ endif(CMAKE_GENERATOR MATCHES Visual*)
+
+ENDMACRO(ADD_NATIVE_PRECOMPILED_HEADER)
diff --git a/cmake/FindPlatform.cmake b/cmake/FindPlatform.cmake
new file mode 100644
index 000000000..f58cf9e1c
--- /dev/null
+++ b/cmake/FindPlatform.cmake
@@ -0,0 +1,23 @@
+# Already set, so only add definition
+# IF(PLATFORM)
+# IF(PLATFORM MATCHES X64 AND WIN32)
+# ADD_DEFINITIONS("-D_WIN64")
+# ENDIF()
+# ELSE()
+ # 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()
+# ENDIF()
diff --git a/cmake/FindReadline.cmake b/cmake/FindReadline.cmake
new file mode 100644
index 000000000..2254bebab
--- /dev/null
+++ b/cmake/FindReadline.cmake
@@ -0,0 +1,22 @@
+# find Readline (terminal input library) includes and library
+#
+# READLINE_INCLUDE_DIR - where the directory containing the READLINE headers can be found
+# READLINE_LIBRARY - full path to the READLINE library
+# READLINE_FOUND - TRUE if READLINE was found
+
+MACRO(FIND_READLINE)
+
+FIND_PATH(READLINE_INCLUDE_DIR readline/readline.h)
+FIND_LIBRARY(READLINE_LIBRARY NAMES readline)
+
+IF (READLINE_INCLUDE_DIR AND READLINE_LIBRARY)
+ SET(READLINE_FOUND TRUE)
+ MESSAGE(STATUS "Found Readline library: ${READLINE_LIBRARY}")
+ MESSAGE(STATUS "Include dir is: ${READLINE_INCLUDE_DIR}")
+ INCLUDE_DIRECTORIES(${READLINE_INCLUDE_DIR})
+ELSE (READLINE_INCLUDE_DIR AND READLINE_LIBRARY)
+ SET(READLINE_FOUND FALSE)
+ MESSAGE(FATAL_ERROR "** Readline library not found!\n** Your distro may provide a binary for Readline e.g. for ubuntu try apt-get install libreadline5-dev")
+ENDIF (READLINE_INCLUDE_DIR AND READLINE_LIBRARY)
+
+ENDMACRO(FIND_READLINE)
diff --git a/cmake/FindTBB.cmake b/cmake/FindTBB.cmake
new file mode 100644
index 000000000..b1938b0b0
--- /dev/null
+++ b/cmake/FindTBB.cmake
@@ -0,0 +1,91 @@
+#
+# Locate Intel Threading Building Blocks include paths and libraries
+# CPPunit can be found at http://cppunit.sourceforge.net
+# Written by Michael Hammer, michael _at_ derhammer.net
+
+# This module defines
+# TBB_INCLUDE_DIR, where to find ptlib.h, etc.
+# TBB_LIBRARIES, the libraries to link against to use pwlib.
+# TBB_FOUND, If false, don't try to use pwlib.
+
+FIND_PATH(TBB_INCLUDE_DIR tbb/task_scheduler_init.h
+ /usr/local/include
+ /usr/include
+ ${TBB_ROOT}
+ ${TBB_ROOT}/include
+ $ENV{TBB_ROOT}
+ $ENV{TBB_ROOT}/include
+ # ${CMAKE_SOURCE_DIR}/dep/tbb/include
+)
+
+FIND_LIBRARY(TBB_LIBRARIES
+ NAMES
+ tbb
+ PATHS
+ /usr/local/lib
+ /usr/lib
+ ${TBB_ROOT}
+ ${TBB_ROOT}/lib
+ $ENV{TBB_ROOT}
+ $ENV{TBB_ROOT}/lib
+ # ${CMAKE_SOURCE_DIR}/dep/tbb/build/vsproject/ia32/Release
+)
+
+FIND_LIBRARY(TBB_EXTRA_LIBRARIES
+ NAMES
+ tbbmalloc
+ PATHS
+ /usr/local/lib
+ /usr/lib
+ ${TBB_ROOT}
+ ${TBB_ROOT}/lib
+ $ENV{TBB_ROOT}
+ $ENV{TBB_ROOT}/lib
+ # ${CMAKE_SOURCE_DIR}/dep/tbb/build/vsproject/ia32/Release
+)
+
+FIND_LIBRARY(TBB_LIBRARIES_DEBUG
+ NAMES
+ tbb_debug
+ PATHS
+ /usr/local/lib
+ /usr/lib
+ ${TBB_ROOT}
+ ${TBB_ROOT}/lib
+ $ENV{TBB_ROOT}
+ $ENV{TBB_ROOT}/lib
+ # ${CMAKE_SOURCE_DIR}/dep/tbb/build/vsproject/ia32/Debug
+)
+
+FIND_LIBRARY(TBB_EXTRA_LIBRARIES_DEBUG
+ NAMES
+ tbbmalloc_debug
+ PATHS
+ /usr/local/lib
+ /usr/lib
+ ${TBB_ROOT}
+ ${TBB_ROOT}/lib
+ $ENV{TBB_ROOT}
+ $ENV{TBB_ROOT}/lib
+ # ${CMAKE_SOURCE_DIR}/dep/tbb/build/vsproject/ia32/Debug
+)
+
+SET(TBB_FOUND 0)
+IF(TBB_INCLUDE_DIR)
+ IF(TBB_LIBRARIES)
+ SET(TBB_FOUND 1)
+ MESSAGE(STATUS "Found Intel TBB")
+ SET(TBB_LIBRARIES
+ ${TBB_LIBRARIES}
+ ${TBB_EXTRA_LIBRARIES}
+ )
+ ENDIF(TBB_LIBRARIES)
+ENDIF(TBB_INCLUDE_DIR)
+
+MARK_AS_ADVANCED(
+ TBB_INCLUDE_DIR
+ TBB_LIBRARIES
+ TBB_EXTRA_LIBRARIES
+ TBB_LIBRARIES_DEBUG
+ TBB_EXTRA_LIBRARIES_DEBUG
+)
diff --git a/cmake/FindTermcap.cmake b/cmake/FindTermcap.cmake
new file mode 100644
index 000000000..29c44bde5
--- /dev/null
+++ b/cmake/FindTermcap.cmake
@@ -0,0 +1,33 @@
+# find Terrmcap (terminal input library) includes and library
+#
+# TERMCAP_INCLUDE_DIR - where the directory containing the TERMCAP headers can be found
+# TERMCAP_LIBRARY - full path to the TERMCAP library
+# TERMCAP_FOUND - TRUE if TERMCAP was found
+
+MACRO(FIND_TERMCAP)
+
+FIND_PATH(TERMCAP_INCLUDE_DIR termcap.h
+ /usr/include
+ /usr/local/include
+
+ /opt/local/include
+)
+
+FIND_LIBRARY(TERMCAP_LIBRARY NAMES termcap PATH
+ /usr/lib
+ /usr/local/lib
+ /opt/local/lib
+ /usr/lib64
+)
+
+IF (TERMCAP_INCLUDE_DIR AND TERMCAP_LIBRARY)
+ SET(TERMCAP_FOUND TRUE)
+ MESSAGE(STATUS "Found GNU termcap: ${TERMCAP_LIBRARY}")
+ MESSAGE(STATUS "Include dir is: ${TERMCAP_INCLUDE_DIR}")
+ INCLUDE_DIRECTORIES(${TERMCAP_INCLUDE_DIR})
+ELSE (TERMCAP_INCLUDE_DIR AND TERMCAP_LIBRARY)
+ SET(TERMCAP_FOUND FALSE)
+ MESSAGE(FATAL_ERROR "Could not find GNU termcap")
+ENDIF (TERMCAP_INCLUDE_DIR AND TERMCAP_LIBRARY)
+
+ENDMACRO(FIND_TERMCAP)
diff --git a/cmake/FindVisualStudio2010.cmake b/cmake/FindVisualStudio2010.cmake
new file mode 100644
index 000000000..343403def
--- /dev/null
+++ b/cmake/FindVisualStudio2010.cmake
@@ -0,0 +1,20 @@
+# This module defines
+# VS_DEVENV, path to devenv.com.
+
+FIND_PATH(VS100_DIR devenv.com
+ $ENV{VS100COMNTOOLS}/../IDE
+ "C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\IDE"
+ "C:\\Program Files\\Microsoft Visual Studio 10.0\\Common7\\IDE"
+ "C:\\Programme\\Microsoft Visual Studio 10.0\\Common7\\IDE"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\VisualStudio\\10.0\\Setup\\VS;EnvironmentDirectory]"
+)
+
+SET(VS100_FOUND 0)
+IF(VS100_DIR)
+ SET(VS100_FOUND 1)
+ MESSAGE(STATUS "Found Visual Studion 2010")
+ENDIF(VS100_DIR)
+
+MARK_AS_ADVANCED(
+ VS100_DIR
+)
diff --git a/cmake/ImportACE.cmake b/cmake/ImportACE.cmake
new file mode 100644
index 000000000..33427504a
--- /dev/null
+++ b/cmake/ImportACE.cmake
@@ -0,0 +1,59 @@
+#
+# Copyright (C) 2005-2011 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
+#
+
+# Specify ace lib that was build externally
+# add_library(ace SHARED IMPORTED)
+# Sadly doesn't work in current version of cmake
+# add_dependencies(ace ACE_Project)
+# set_target_properties(ace PROPERTIES DEPENDS ACE_Project)
+
+if(WIN32)
+ set(ACE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/dep/ACE_wrappers)
+ set(ACE_LIBRARIES_DIR ${CMAKE_SOURCE_DIR}/dep/ACE_wrappers/lib)
+ set(ACE_LIBRARIES optimized ACE debug ACEd)
+else()
+ set(ACE_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/include)
+ set(ACE_LIBRARIES_DIR ${CMAKE_INSTALL_PREFIX}/lib)
+ set(ACE_LIBRARIES ACE)
+endif()
+
+# Little Hack to remove the link warnings because of not found directories
+if(XCODE)
+ foreach(DIR ${ACE_LIBRARIES_DIR})
+ foreach(CONF ${CMAKE_CONFIGURATION_TYPES})
+ file(MAKE_DIRECTORY ${DIR}/${CONF})
+ endforeach(CONF)
+ endforeach(DIR)
+endif()
+
+link_directories(
+ ${ACE_LIBRARIES_DIR}
+)
+
+set(HAVE_ACE_STACK_TRACE_H ON) # config.h.cmake
+
+if(WIN32)
+ foreach(DIR ${ACE_LIBRARIES_DIR})
+ install(
+ DIRECTORY ${DIR}/ DESTINATION ${LIBS_DIR}
+ FILES_MATCHING PATTERN "*.dll*" #"*.${LIB_SUFFIX}*"
+ PATTERN "pkgconfig" EXCLUDE
+ )
+ endforeach(DIR)
+endif()
+
diff --git a/cmake/ImportTBB.cmake b/cmake/ImportTBB.cmake
new file mode 100644
index 000000000..4f8330172
--- /dev/null
+++ b/cmake/ImportTBB.cmake
@@ -0,0 +1,100 @@
+#
+# Copyright (C) 2005-2011 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
+#
+
+# Specify tbb lib that was build externally
+# add_library(tbb SHARED IMPORTED)
+# add_library(tbbmalloc SHARED IMPORTED)
+if(WIN32)
+ set(LIB_SUFFIX dll)
+ if(VS100_FOUND)
+ set(VSDIR vs100project)
+ else()
+ set(VSDIR vsproject)
+ endif()
+ if(PLATFORM MATCHES X86)
+ set(ARCHDIR ia32)
+ else()
+ set(ARCHDIR intel64)
+ endif()
+# set_target_properties(tbb PROPERTIES
+# IMPORTED_LOCATION_RELEASE ${CMAKE_SOURCE_DIR}/dep/tbb/build/${VSDIR}/${ARCHDIR}/Release/tbb.dll
+# IMPORTED_LOCATION_DEBUG ${CMAKE_SOURCE_DIR}/dep/tbb/build/${VSDIR}/${ARCHDIR}/Debug/tbb_debug.dll
+# IMPORTED_IMPLIB_RELEASE ${CMAKE_SOURCE_DIR}/dep/tbb/build/${VSDIR}/${ARCHDIR}/Release/tbb.lib
+# IMPORTED_IMPLIB_DEBUG ${CMAKE_SOURCE_DIR}/dep/tbb/build/${VSDIR}/${ARCHDIR}/Debug/tbb_debug.lib
+# )
+# set_target_properties(tbbmalloc PROPERTIES
+# IMPORTED_LOCATION_RELEASE ${CMAKE_SOURCE_DIR}/dep/tbb/build/${VSDIR}/${ARCHDIR}/Release/tbbmalloc.dll
+# IMPORTED_LOCATION_DEBUG ${CMAKE_SOURCE_DIR}/dep/tbb/build/${VSDIR}/${ARCHDIR}/Debug/tbbmalloc_debug.dll
+# IMPORTED_IMPLIB_RELEASE ${CMAKE_SOURCE_DIR}/dep/tbb/build/${VSDIR}/${ARCHDIR}/Release/tbbmalloc.lib
+# IMPORTED_IMPLIB_DEBUG ${CMAKE_SOURCE_DIR}/dep/tbb/build/${VSDIR}/${ARCHDIR}/Debug/tbbmalloc_debug.lib
+# )
+ set(TBB_LIBRARIES_DIR
+ ${CMAKE_SOURCE_DIR}/dep/tbb/build/${VSDIR}/${ARCHDIR}/Release
+ ${CMAKE_SOURCE_DIR}/dep/tbb/build/${VSDIR}/${ARCHDIR}/Debug
+ )
+else()
+ if(APPLE)
+ set(LIB_SUFFIX dylib)
+ else()
+ set(LIB_SUFFIX so)
+ endif()
+# set_target_properties(tbb PROPERTIES
+# IMPORTED_LOCATION_RELEASE ${CMAKE_SOURCE_DIR}/dep/tbb/build/libs_release/libtbb.${LIB_SUFFIX}
+# IMPORTED_LOCATION_DEBUG ${CMAKE_SOURCE_DIR}/dep/tbb/build/libs_debug/libtbb_debug.${LIB_SUFFIX}
+# )
+# set_target_properties(tbbmalloc PROPERTIES
+# IMPORTED_LOCATION_RELEASE ${CMAKE_SOURCE_DIR}/dep/tbb/build/libs_release/libtbbmalloc.${LIB_SUFFIX}
+# IMPORTED_LOCATION_DEBUG ${CMAKE_SOURCE_DIR}/dep/tbb/build/libs_debug/libtbbmalloc_debug.${LIB_SUFFIX}
+# )
+ set(TBB_LIBRARIES_DIR
+ ${CMAKE_SOURCE_DIR}/dep/tbb/build/libs_release
+ ${CMAKE_SOURCE_DIR}/dep/tbb/build/libs_debug
+ )
+endif()
+# Sadly doesn't work in current version
+# add_dependencies(tbb TBB_Project)
+# add_dependencies(tbbmalloc TBB_Project)
+# set_target_properties(tbb PROPERTIES DEPENDS TBB_Project)
+# set_target_properties(tbbmalloc PROPERTIES DEPENDS TBB_Project)
+
+set(TBB_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/dep/tbb/include)
+set(TBB_LIBRARIES optimized tbb optimized tbbmalloc debug tbb_debug debug tbbmalloc_debug)
+
+# Little Hack to remove the link warnings because of not found directories
+if(XCODE)
+ foreach(DIR ${TBB_LIBRARIES_DIR})
+ foreach(CONF ${CMAKE_CONFIGURATION_TYPES})
+ file(MAKE_DIRECTORY ${DIR}/${CONF})
+ endforeach(CONF)
+ endforeach(DIR)
+ foreach(CONF ${CMAKE_CONFIGURATION_TYPES})
+ set(CONFSTR ${CONFSTR} PATTERN "${CONF}" EXCLUDE)
+ endforeach(CONF)
+endif()
+
+link_directories(
+ ${TBB_LIBRARIES_DIR}
+)
+
+foreach(DIR ${TBB_LIBRARIES_DIR})
+ install(
+ DIRECTORY ${DIR}/ DESTINATION ${LIBS_DIR}
+ FILES_MATCHING PATTERN "*.${LIB_SUFFIX}*"
+ ${CONFSTR}
+ )
+endforeach(DIR)
diff --git a/cmake/cmake_uninstall.cmake.in b/cmake/cmake_uninstall.cmake.in
new file mode 100644
index 000000000..06f9c8263
--- /dev/null
+++ b/cmake/cmake_uninstall.cmake.in
@@ -0,0 +1,23 @@
+# from cmake wiki
+IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
+ MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
+ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
+
+FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
+STRING(REGEX REPLACE "\n" ";" files "${files}")
+FOREACH(file ${files})
+ MESSAGE(STATUS "Uninstalling \"${file}\"")
+ IF(EXISTS "${file}")
+ EXEC_PROGRAM(
+ "@CMAKE_COMMAND@" ARGS "-E remove \"${file}\""
+ OUTPUT_VARIABLE rm_out
+ RETURN_VALUE rm_retval
+ )
+ IF("${rm_retval}" STREQUAL 0)
+ ELSE("${rm_retval}" STREQUAL 0)
+ MESSAGE(FATAL_ERROR "Problem when removing \"${file}\"")
+ ENDIF("${rm_retval}" STREQUAL 0)
+ ELSE(EXISTS "${file}")
+ MESSAGE(STATUS "File \"${file}\" does not exist.")
+ ENDIF(EXISTS "${file}")
+ENDFOREACH(file)
diff --git a/config.h.cmake b/config.h.cmake
new file mode 100644
index 000000000..ecda10fd2
--- /dev/null
+++ b/config.h.cmake
@@ -0,0 +1,10 @@
+#ifndef HAVE_CONFIG_H
+#define HAVE_CONFIG_H
+
+#cmakedefine HAVE_ACE_STACK_TRACE_H
+
+#cmakedefine USE_MULTI_THREAD_MAP
+
+#define VERSION "${MANGOS_VERSION}"
+
+#endif /* HAVE_CONFIG_H */
diff --git a/createprojects.bat b/createprojects.bat
new file mode 100755
index 000000000..c943a08fd
--- /dev/null
+++ b/createprojects.bat
@@ -0,0 +1,15 @@
+@ECHO off
+mkdir build
+cd build
+
+if %1!==! goto without
+
+cmake .. -G %1
+if errorlevel 1 call cmake --help
+goto end
+
+:without
+cmake ..
+
+:end
+cd ..
\ No newline at end of file
diff --git a/dep/ACE_wrappers/CMakeLists.txt b/dep/ACE_wrappers/CMakeLists.txt
new file mode 100644
index 000000000..2c76626f8
--- /dev/null
+++ b/dep/ACE_wrappers/CMakeLists.txt
@@ -0,0 +1,78 @@
+#
+# Copyright (C) 2005-2011 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
+#
+
+include(ExternalProject)
+
+if(WIN32)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ace/config.h.win ${CMAKE_CURRENT_SOURCE_DIR}/ace/config.h)
+endif()
+
+if(WIN32 AND MSVC)
+ # VS100 uses MSBuild.exe instead of devenv.com, so force it to use devenv.com
+ if(VS100_FOUND)
+ set(ACE_BUILD_TOOL ${VS100_DIR}/devenv.com)
+ else()
+ set(ACE_BUILD_TOOL ${CMAKE_BUILD_TOOL})
+ endif()
+
+ if(PLATFORM MATCHES X86)
+ set(ACE_CONFIGURATION Win32)
+ else()
+ set(ACE_CONFIGURATION x64)
+ endif()
+
+ ExternalProject_Add(ACE_Project
+ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
+ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}
+ INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
+ DOWNLOAD_COMMAND ""
+ CONFIGURE_COMMAND ""
+ BUILD_COMMAND ""
+ INSTALL_COMMAND ""
+ )
+ ExternalProject_Add_Step(ACE_Project ACE_Upgrade
+ COMMAND ${ACE_BUILD_TOOL} \\ace\\ace_vc8.sln /upgrade
+ ALWAYS 0
+ )
+ ExternalProject_Add_Step(ACE_Project ACE_Build
+ DEPENDEES ACE_Upgrade
+ COMMAND ${ACE_BUILD_TOOL} \\ace\\ace_vc8.sln /build Debug|${ACE_CONFIGURATION}
+ COMMAND ${ACE_BUILD_TOOL} \\ace\\ace_vc8.sln /build Release|${ACE_CONFIGURATION}
+ ALWAYS 0
+ )
+elseif(UNIX)
+ if(CMAKE_BUILD_TOOL MATCHES "/gmake")
+ set(ACE_BUILD_TOOL gmake)
+ else()
+ set(ACE_BUILD_TOOL make)
+ endif()
+
+ ExternalProject_Add(ACE_Project
+ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
+ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}
+ INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
+ DOWNLOAD_COMMAND ""
+ CONFIGURE_COMMAND /configure --prefix= --disable-ssl
+ BUILD_COMMAND ${ACE_BUILD_TOOL} -j2 # export arch="ia32" &&
+ INSTALL_COMMAND ${ACE_BUILD_TOOL} install
+ )
+else()
+ message(FATAL_ERROR
+ "This script doesn't support your system configuration to compile/install ACE."
+ )
+endif()
diff --git a/dep/ACE_wrappers/ace/config.h.win b/dep/ACE_wrappers/ace/config.h.win
new file mode 100755
index 000000000..d3408e611
--- /dev/null
+++ b/dep/ACE_wrappers/ace/config.h.win
@@ -0,0 +1 @@
+#include "ace/config-win32.h"
\ No newline at end of file
diff --git a/dep/CMakeLists.txt b/dep/CMakeLists.txt
new file mode 100644
index 000000000..c4e9cc11f
--- /dev/null
+++ b/dep/CMakeLists.txt
@@ -0,0 +1,27 @@
+#
+# Copyright (C) 2005-2011 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
+#
+
+if(NOT TBB_USE_EXTERNAL)
+ add_subdirectory(tbb)
+endif()
+
+if(NOT ACE_USE_EXTERNAL)
+ add_subdirectory(ACE_wrappers)
+endif()
+
+add_subdirectory(src)
diff --git a/dep/src/CMakeLists.txt b/dep/src/CMakeLists.txt
new file mode 100644
index 000000000..5272ae61a
--- /dev/null
+++ b/dep/src/CMakeLists.txt
@@ -0,0 +1,24 @@
+#
+# Copyright (C) 2005-2011 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
+#
+
+add_subdirectory(g3dlite)
+add_subdirectory(gsoap)
+
+if(WIN32)
+ add_subdirectory(zlib)
+endif()
\ No newline at end of file
diff --git a/dep/src/g3dlite/CMakeLists.txt b/dep/src/g3dlite/CMakeLists.txt
new file mode 100644
index 000000000..70a8c5746
--- /dev/null
+++ b/dep/src/g3dlite/CMakeLists.txt
@@ -0,0 +1,78 @@
+#
+# Copyright (C) 2005-2011 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
+#
+
+# file(GLOB g3dlite_SRCS *.cpp) # don't need all of them
+
+set(g3dlite_SRCS
+ AABox.cpp
+ Box.cpp
+ Crypto.cpp
+ format.cpp
+ Matrix3.cpp
+ Plane.cpp
+ System.cpp
+ Triangle.cpp
+ Vector3.cpp
+ Vector4.cpp
+ debugAssert.cpp
+ fileutils.cpp
+ g3dmath.cpp
+ g3dfnmatch.cpp
+ prompt.cpp
+ stringutils.cpp
+ Any.cpp
+ BinaryFormat.cpp
+ BinaryInput.cpp
+ BinaryOutput.cpp
+ Capsule.cpp
+ CollisionDetection.cpp
+ CoordinateFrame.cpp
+ Cylinder.cpp
+ Line.cpp
+ LineSegment.cpp
+ Log.cpp
+ Matrix4.cpp
+ MemoryManager.cpp
+ Quat.cpp
+ Random.cpp
+ Ray.cpp
+ ReferenceCount.cpp
+ RegistryUtil.cpp
+ Sphere.cpp
+ TextInput.cpp
+ TextOutput.cpp
+ UprightFrame.cpp
+ Vector2.cpp
+)
+
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_SOURCE_DIR}/dep/include
+ ${CMAKE_SOURCE_DIR}/dep/include/g3dlite
+ ${CMAKE_SOURCE_DIR}/dep/include/zlib
+)
+
+add_library(g3dlite STATIC
+ ${g3dlite_SRCS}
+)
+
+if(WIN32)
+ target_link_libraries(g3dlite
+ zlib
+ )
+endif()
diff --git a/dep/src/gsoap/CMakeLists.txt b/dep/src/gsoap/CMakeLists.txt
new file mode 100644
index 000000000..097e0f315
--- /dev/null
+++ b/dep/src/gsoap/CMakeLists.txt
@@ -0,0 +1,28 @@
+#
+# Copyright (C) 2005-2011 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
+#
+
+file(GLOB gsoap_SRCS *.cpp)
+
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_SOURCE_DIR}/dep/include/gsoap
+)
+
+add_library(gsoap STATIC
+ ${gsoap_SRCS}
+)
\ No newline at end of file
diff --git a/dep/src/zlib/CMakeLists.txt b/dep/src/zlib/CMakeLists.txt
new file mode 100644
index 000000000..4fb858185
--- /dev/null
+++ b/dep/src/zlib/CMakeLists.txt
@@ -0,0 +1,40 @@
+#
+# Copyright (C) 2005-2011 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
+#
+
+set(zlib_SRCS
+ adler32.c
+ compress.c
+ crc32.c
+ deflate.c
+ example.c
+ infback.c
+ inffast.c
+ inflate.c
+ inftrees.c
+ trees.c
+ uncompr.c
+ zutil.c
+)
+
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+)
+
+add_library(zlib STATIC
+ ${zlib_SRCS}
+)
diff --git a/dep/tbb/CMakeLists.txt b/dep/tbb/CMakeLists.txt
new file mode 100644
index 000000000..8b7c9fc22
--- /dev/null
+++ b/dep/tbb/CMakeLists.txt
@@ -0,0 +1,82 @@
+#
+# Copyright (C) 2005-2011 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
+#
+
+include(ExternalProject)
+
+if(WIN32 AND MSVC)
+ # VS100 uses MSBuild.exe instead of devenv.com, so force it to use devenv.com
+ if(VS100_FOUND)
+ set(TBB_BUILD_TOOL ${VS100_DIR}/devenv.com)
+ set(TBB_SOURCE \\build\\vs100project)
+ else()
+ set(TBB_BUILD_TOOL ${CMAKE_BUILD_TOOL})
+ set(TBB_SOURCE \\build\\vsproject)
+ endif()
+
+ if(PLATFORM MATCHES X86)
+ set(TBB_CONFIGURATION Win32)
+ else()
+ set(TBB_CONFIGURATION x64)
+ endif()
+
+ ExternalProject_Add(TBB_Project
+ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
+ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}
+ DOWNLOAD_COMMAND ""
+ CONFIGURE_COMMAND ""
+ BUILD_COMMAND ""
+ INSTALL_COMMAND ""
+ )
+ ExternalProject_Add_Step(TBB_Project TBB_Upgrade
+ COMMAND ${TBB_BUILD_TOOL} ${TBB_SOURCE}\\makefile.sln /upgrade
+ ALWAYS 0
+ )
+ ExternalProject_Add_Step(TBB_Project TBB_Build
+ DEPENDEES TBB_Upgrade
+ COMMAND ${TBB_BUILD_TOOL} ${TBB_SOURCE}\\makefile.sln /build Debug|${TBB_CONFIGURATION}
+ COMMAND ${TBB_BUILD_TOOL} ${TBB_SOURCE}\\makefile.sln /build Release|${TBB_CONFIGURATION}
+ ALWAYS 0
+ )
+elseif(UNIX)
+ if(APPLE)
+ set(APPLE_BUILD cd /build/libs_release && install_name_tool -id "/lib/libtbb.dylib" libtbb.dylib && install_name_tool -id "/lib/libtbbmalloc.dylib" libtbbmalloc.dylib && cd /build/libs_debug && install_name_tool -id "/lib/libtbb_debug.dylib" libtbb_debug.dylib && install_name_tool -id "/lib/libtbbmalloc_debug.dylib" libtbbmalloc_debug.dylib)
+ else()
+ # Do nothing, but really 'nothing' makes infinite loops on Debian
+ set(APPLE_BUILD cd .)
+ endif()
+
+ if(CMAKE_BUILD_TOOL MATCHES "/gmake")
+ set(TBB_BUILD_TOOL gmake)
+ else()
+ set(TBB_BUILD_TOOL make)
+ endif()
+
+ ExternalProject_Add(TBB_Project
+ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
+ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}
+ INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
+ DOWNLOAD_COMMAND ""
+ CONFIGURE_COMMAND ""
+ BUILD_COMMAND ${TBB_BUILD_TOOL} -j2 -C # export arch="ia32" &&
+ INSTALL_COMMAND ${APPLE_BUILD}
+ )
+else()
+ message(FATAL_ERROR
+ "This script doesn't support your system configuration to compile/install TBB."
+ )
+endif()
diff --git a/dep/tbb/build/Makefile.tbb b/dep/tbb/build/Makefile.tbb
index 9f7484008..f0b91b554 100644
--- a/dep/tbb/build/Makefile.tbb
+++ b/dep/tbb/build/Makefile.tbb
@@ -36,7 +36,9 @@ DEBUG_SUFFIX=$(findstring _debug,_$(cfg))
#------------------------------------------------------------
# Define static pattern rules dealing with .cpp source files
#------------------------------------------------------------
-$(warning CONFIG: cfg=$(cfg) arch=$(arch) compiler=$(compiler) os=$(tbb_os) runtime=$(runtime))
+# MaNGOS changes
+# $(warning CONFIG: cfg=$(cfg) arch=$(arch) compiler=$(compiler) os=$(tbb_os) runtime=$(runtime))
+# MaNGOS changes end
default_tbb: $(TBB.DLL)
.PHONY: default_tbb tbbvars clean
diff --git a/dep/tbb/build/common.inc b/dep/tbb/build/common.inc
index 4ccb36ade..4de342a54 100644
--- a/dep/tbb/build/common.inc
+++ b/dep/tbb/build/common.inc
@@ -80,7 +80,7 @@ ifneq ($(BUILDING_PHASE),1)
# definitions for top-level Makefiles
origin_build_dir:=$(origin tbb_build_dir)
tbb_build_dir?=$(tbb_root)$(SLASH)build
- tbb_build_prefix?=$(tbb_os)_$(arch)_$(compiler)_$(runtime)
+ tbb_build_prefix?=libs
work_dir=$(tbb_build_dir)$(SLASH)$(tbb_build_prefix)
ifneq ($(BUILDING_PHASE),0)
work_dir:=$(work_dir)
diff --git a/dep/tbb/build/vs100project/index.html b/dep/tbb/build/vs100project/index.html
new file mode 100644
index 000000000..82cad002d
--- /dev/null
+++ b/dep/tbb/build/vs100project/index.html
@@ -0,0 +1,31 @@
+
+
+
+Overview
+This directory contains the visual studio* 2005 solution to build Threading Building Blocks.
+
+
+Files
+
+makefile.sln
+Solution file.
+ tbb.vcproj
+Library project file.
+ tbbmalloc.vcproj
+Scalable allocator library project file. Allocator sources are expected to be located in ../../src/tbbmalloc folder.
+ tbbmalloc_proxy.vcproj
+Standard allocator replacement project file.
+
+
+
+Up to parent directory
+
+Copyright © 2005-2009 Intel Corporation. All Rights Reserved.
+
+Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
+registered trademarks or trademarks of Intel Corporation or its
+subsidiaries in the United States and other countries.
+
+* Other names and brands may be claimed as the property of others.
+
+
diff --git a/dep/tbb/build/vs100project/makefile.sln b/dep/tbb/build/vs100project/makefile.sln
new file mode 100644
index 000000000..b767fdf31
--- /dev/null
+++ b/dep/tbb/build/vs100project/makefile.sln
@@ -0,0 +1,50 @@
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8898CE0B-0BFB-45AE-AA71-83735ED2510D}"
+ ProjectSection(SolutionItems) = preProject
+ index.html = index.html
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tbb", "tbb.vcxproj", "{F62787DD-1327-448B-9818-030062BCFAA5}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tbbmalloc", "tbbmalloc.vcxproj", "{B15F131E-328A-4D42-ADC2-9FF4CA6306D8}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tbbmalloc_proxy", "tbbmalloc_proxy.vcxproj", "{02F61511-D5B6-46E6-B4BB-DEAA96E6BCC7}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {F62787DD-1327-448B-9818-030062BCFAA5}.Debug|Win32.ActiveCfg = Debug|Win32
+ {F62787DD-1327-448B-9818-030062BCFAA5}.Debug|Win32.Build.0 = Debug|Win32
+ {F62787DD-1327-448B-9818-030062BCFAA5}.Debug|x64.ActiveCfg = Debug|x64
+ {F62787DD-1327-448B-9818-030062BCFAA5}.Debug|x64.Build.0 = Debug|x64
+ {F62787DD-1327-448B-9818-030062BCFAA5}.Release|Win32.ActiveCfg = Release|Win32
+ {F62787DD-1327-448B-9818-030062BCFAA5}.Release|Win32.Build.0 = Release|Win32
+ {F62787DD-1327-448B-9818-030062BCFAA5}.Release|x64.ActiveCfg = Release|x64
+ {F62787DD-1327-448B-9818-030062BCFAA5}.Release|x64.Build.0 = Release|x64
+ {B15F131E-328A-4D42-ADC2-9FF4CA6306D8}.Debug|Win32.ActiveCfg = Debug|Win32
+ {B15F131E-328A-4D42-ADC2-9FF4CA6306D8}.Debug|Win32.Build.0 = Debug|Win32
+ {B15F131E-328A-4D42-ADC2-9FF4CA6306D8}.Debug|x64.ActiveCfg = Debug|x64
+ {B15F131E-328A-4D42-ADC2-9FF4CA6306D8}.Debug|x64.Build.0 = Debug|x64
+ {B15F131E-328A-4D42-ADC2-9FF4CA6306D8}.Release|Win32.ActiveCfg = Release|Win32
+ {B15F131E-328A-4D42-ADC2-9FF4CA6306D8}.Release|Win32.Build.0 = Release|Win32
+ {B15F131E-328A-4D42-ADC2-9FF4CA6306D8}.Release|x64.ActiveCfg = Release|x64
+ {B15F131E-328A-4D42-ADC2-9FF4CA6306D8}.Release|x64.Build.0 = Release|x64
+ {02F61511-D5B6-46E6-B4BB-DEAA96E6BCC7}.Debug|Win32.ActiveCfg = Debug|Win32
+ {02F61511-D5B6-46E6-B4BB-DEAA96E6BCC7}.Debug|Win32.Build.0 = Debug|Win32
+ {02F61511-D5B6-46E6-B4BB-DEAA96E6BCC7}.Debug|x64.ActiveCfg = Debug|x64
+ {02F61511-D5B6-46E6-B4BB-DEAA96E6BCC7}.Debug|x64.Build.0 = Debug|x64
+ {02F61511-D5B6-46E6-B4BB-DEAA96E6BCC7}.Release|Win32.ActiveCfg = Release|Win32
+ {02F61511-D5B6-46E6-B4BB-DEAA96E6BCC7}.Release|Win32.Build.0 = Release|Win32
+ {02F61511-D5B6-46E6-B4BB-DEAA96E6BCC7}.Release|x64.ActiveCfg = Release|x64
+ {02F61511-D5B6-46E6-B4BB-DEAA96E6BCC7}.Release|x64.Build.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/dep/tbb/build/vs100project/tbb.vcxproj b/dep/tbb/build/vs100project/tbb.vcxproj
new file mode 100644
index 000000000..99b8b8960
--- /dev/null
+++ b/dep/tbb/build/vs100project/tbb.vcxproj
@@ -0,0 +1,346 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {F62787DD-1327-448B-9818-030062BCFAA5}
+ tbb
+ Win32Proj
+
+
+
+ DynamicLibrary
+ NotSet
+ true
+
+
+ DynamicLibrary
+ NotSet
+
+
+ DynamicLibrary
+ NotSet
+ true
+
+
+ DynamicLibrary
+ NotSet
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectFileVersion>10.0.30319.1
+ $(SolutionDir)ia32\$(Configuration)\
+ ia32\$(Configuration)\
+ false
+ $(SolutionDir)intel64\$(Configuration)\
+ intel64\$(Configuration)\
+ false
+ $(SolutionDir)ia32\$(Configuration)\
+ ia32\$(Configuration)\
+ false
+ $(SolutionDir)intel64\$(Configuration)\
+ intel64\$(Configuration)\
+ false
+ AllRules.ruleset
+
+
+ AllRules.ruleset
+
+
+ AllRules.ruleset
+
+
+ AllRules.ruleset
+
+
+ $(ProjectName)_debug
+ $(ProjectName)_debug
+
+
+
+ /c /MDd /Od /Ob0 /Zi /EHsc /GR /Zc:forScope /Zc:wchar_t /DTBB_USE_DEBUG /D_USE_RTM_VERSION /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /W4 /Wp64 /I../../src /I../../src/rml/include /I../../include %(AdditionalOptions)
+ Disabled
+ .;%(AdditionalIncludeDirectories)
+ %(PreprocessorDefinitions)
+ true
+ EnableFastChecks
+ MultiThreadedDebugDLL
+
+
+ Level4
+ ProgramDatabase
+
+
+ /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO /DEF:$(IntDir)tbb.def %(AdditionalOptions)
+ $(OutDir)tbb_debug.dll
+ true
+ Windows
+ MachineX86
+
+
+
+
+ X64
+
+
+ /c /MDd /Od /Ob0 /Zi /EHsc /GR /Zc:forScope /Zc:wchar_t /DTBB_USE_DEBUG /D_USE_RTM_VERSION /GS- /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /W4 /Wp64 /I../../src /I../../src/rml/include /I../../include %(AdditionalOptions)
+ Disabled
+ .;%(AdditionalIncludeDirectories)
+ %(PreprocessorDefinitions)
+ true
+ EnableFastChecks
+ MultiThreadedDebugDLL
+
+
+ Level4
+ ProgramDatabase
+ false
+
+
+ /nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO /DEF:$(IntDir)tbb.def %(AdditionalOptions)
+ $(OutDir)tbb_debug.dll
+ true
+ Windows
+ MachineX64
+
+
+
+
+ /c /MD /O2 /Zi /EHsc /GR /Zc:forScope /Zc:wchar_t /Oy /D_USE_RTM_VERSION /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /W4 /Wp64 /I../../src /I../../src/rml/include /I../../include %(AdditionalOptions)
+ .;%(AdditionalIncludeDirectories)
+ %(PreprocessorDefinitions)
+ MultiThreadedDLL
+
+
+ Level4
+ ProgramDatabase
+
+
+ /nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO /DEF:$(IntDir)tbb.def %(AdditionalOptions)
+ $(OutDir)tbb.dll
+ true
+ Windows
+ true
+ true
+ MachineX86
+
+
+
+
+ X64
+
+
+ /c /MD /O2 /Zi /EHsc /GR /Zc:forScope /Zc:wchar_t /D_USE_RTM_VERSION /GS- /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /W4 /Wp64 /I../../src /I../../src/rml/include /I../../include %(AdditionalOptions)
+ .;%(AdditionalIncludeDirectories)
+ %(PreprocessorDefinitions)
+ MultiThreadedDLL
+
+
+ Level4
+ ProgramDatabase
+
+
+ /nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO /DEF:$(IntDir)tbb.def %(AdditionalOptions)
+ $(OutDir)tbb.dll
+ true
+ Windows
+ true
+ true
+ MachineX64
+
+
+
+
+ /coff /Zi
+ true
+ /coff /Zi
+ true
+
+
+ true
+ building atomic_support.obj
+ ml64 /Fo"intel64\Debug\atomic_support.obj" /DUSE_FRAME_POINTER /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/atomic_support.asm
+
+ intel64\Debug\atomic_support.obj;%(Outputs)
+ true
+ building atomic_support.obj
+ ml64 /Fo"intel64\Release\atomic_support.obj" /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/atomic_support.asm
+
+ intel64\Release\atomic_support.obj;%(Outputs)
+
+
+ /coff /Zi
+ true
+ /coff /Zi
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ generating tbb.def file
+ cl /nologo /TC /EP ../../src/tbb/win32-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /I../../src /I../../include >$(IntDir)tbb.def
+
+ $(IntDir)tbb.def;%(Outputs)
+ true
+ generating tbb.def file
+ cl /nologo /TC /EP ../../src/tbb/win32-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)tbb.def
+
+ $(IntDir)tbb.def;%(Outputs)
+ generating tbb.def file
+ cl /nologo /TC /EP ../../src/tbb/win32-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /I../../src /I../../include >$(IntDir)tbb.def
+
+ $(IntDir)tbb.def;%(Outputs)
+ true
+ generating tbb.def file
+ cl /nologo /TC /EP ../../src/tbb/win32-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)tbb.def
+
+ $(IntDir)tbb.def;%(Outputs)
+
+
+ true
+ generating tbb.def file
+ cl /nologo /TC /EP ../../src/tbb/win64-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)tbb.def
+
+ $(IntDir)tbb.def;%(Outputs)
+ generating tbb.def file
+ cl /nologo /TC /EP ../../src/tbb/win64-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /I../../src /I../../include >$(IntDir)tbb.def
+
+ $(IntDir)tbb.def;%(Outputs)
+ true
+ generating tbb.def file
+ cl /nologo /TC /EP ../../src/tbb/win64-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)tbb.def
+
+ $(IntDir)tbb.def;%(Outputs)
+ generating tbb.def file
+ cl /nologo /TC /EP ../../src/tbb/win64-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /I../../src /I../../include >$(IntDir)tbb.def
+
+ $(IntDir)tbb.def;%(Outputs)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 %(AdditionalOptions)
+ /I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 %(AdditionalOptions)
+ /I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 %(AdditionalOptions)
+ /I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 %(AdditionalOptions)
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dep/tbb/build/vs100project/tbbmalloc.vcxproj b/dep/tbb/build/vs100project/tbbmalloc.vcxproj
new file mode 100644
index 000000000..caadad5c7
--- /dev/null
+++ b/dep/tbb/build/vs100project/tbbmalloc.vcxproj
@@ -0,0 +1,337 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {B15F131E-328A-4D42-ADC2-9FF4CA6306D8}
+ tbbmalloc
+ Win32Proj
+
+
+
+ DynamicLibrary
+ NotSet
+ true
+
+
+ DynamicLibrary
+ NotSet
+
+
+ DynamicLibrary
+ NotSet
+ true
+
+
+ DynamicLibrary
+ NotSet
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectFileVersion>10.0.30319.1
+ $(SolutionDir)ia32\$(Configuration)\
+ ia32\$(Configuration)\
+ false
+ $(SolutionDir)intel64\$(Configuration)\
+ intel64\$(Configuration)\
+ false
+ $(SolutionDir)ia32\$(Configuration)\
+ ia32\$(Configuration)\
+ false
+ $(SolutionDir)intel64\$(Configuration)\
+ intel64\$(Configuration)\
+ false
+ AllRules.ruleset
+
+
+ AllRules.ruleset
+
+
+ AllRules.ruleset
+
+
+ AllRules.ruleset
+
+
+ $(ProjectName)_debug
+ $(ProjectName)_debug
+
+
+
+ /c /MDd /Od /Ob0 /Zi /EHs- /Zc:forScope /Zc:wchar_t /DTBB_USE_DEBUG /D_USE_RTM_VERSION /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /I../../src /I../../src/rml/include /I../../include /I../../src/tbbmalloc /I../../src/tbbmalloc %(AdditionalOptions)
+ Disabled
+ .;%(AdditionalIncludeDirectories)
+ %(PreprocessorDefinitions)
+ true
+
+
+ Default
+ MultiThreadedDebugDLL
+
+
+ Level4
+ false
+ ProgramDatabase
+
+
+ /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO /DEF:$(IntDir)tbbmalloc.def %(AdditionalOptions)
+ $(OutDir)tbbmalloc_debug.dll
+ true
+ Windows
+ MachineX86
+
+
+
+
+ X64
+
+
+ /c /MDd /Od /Ob0 /Zi /EHs- /Zc:forScope /Zc:wchar_t /DTBB_USE_DEBUG /D_USE_RTM_VERSION /GS- /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /I../../src /I../../src/rml/include /I../../include /I../../src/tbbmalloc /I../../src/tbbmalloc %(AdditionalOptions)
+ Disabled
+ .;%(AdditionalIncludeDirectories)
+ false
+
+
+ Default
+ MultiThreadedDebugDLL
+ true
+
+
+ Level4
+ false
+ ProgramDatabase
+ false
+
+
+ /nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO /DEF:$(IntDir)tbbmalloc.def %(AdditionalOptions)
+ $(OutDir)tbbmalloc_debug.dll
+ true
+ Windows
+ MachineX64
+
+
+
+
+ /c /MD /O2 /Zi /EHs- /Zc:forScope /Zc:wchar_t /Oy /D_USE_RTM_VERSION /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /I../../src /I../../src/rml/include /I../../include /I../../src/tbbmalloc /I../../src/tbbmalloc %(AdditionalOptions)
+ .;%(AdditionalIncludeDirectories)
+ %(PreprocessorDefinitions)
+
+
+ MultiThreadedDLL
+
+
+ Level4
+ false
+ ProgramDatabase
+
+
+ /nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO /DEF:$(IntDir)tbbmalloc.def %(AdditionalOptions)
+ $(OutDir)tbbmalloc.dll
+ true
+ Windows
+ true
+ true
+ MachineX86
+
+
+
+
+ X64
+
+
+ /c /MD /O2 /Zi /EHs- /Zc:forScope /Zc:wchar_t /D_USE_RTM_VERSION /GS- /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /I../../src /I../../src/rml/include /I../../include /I../../src/tbbmalloc /I../../src/tbbmalloc %(AdditionalOptions)
+ .;%(AdditionalIncludeDirectories)
+ %(PreprocessorDefinitions)
+
+
+ MultiThreadedDLL
+
+
+ Level4
+ false
+ ProgramDatabase
+
+
+ /nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO /DEF:$(IntDir)tbbmalloc.def %(AdditionalOptions)
+ $(OutDir)tbbmalloc.dll
+ true
+ Windows
+ true
+ true
+ MachineX64
+
+
+
+
+ /coff /Zi
+ true
+ /coff /Zi
+ true
+
+
+ true
+ building atomic_support.obj
+ ml64 /Fo"intel64\Debug\atomic_support.obj" /DUSE_FRAME_POINTER /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/atomic_support.asm
+
+ intel64\Debug\atomic_support.obj;%(Outputs)
+ true
+ building atomic_support.obj
+ ml64 /Fo"intel64\Release\atomic_support.obj" /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/atomic_support.asm
+
+ intel64\Release\atomic_support.obj;%(Outputs)
+
+
+ /coff /Zi
+ true
+ /coff /Zi
+ true
+
+
+
+
+
+
+
+
+
+
+
+ generating tbbmalloc.def file
+ cl /nologo /TC /EP ../../src/tbbmalloc/win32-tbbmalloc-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)tbbmalloc.def
+
+ $(IntDir)tbbmalloc.def;%(Outputs)
+ true
+ generating tbb.def file
+ cl /nologo /TC /EP ../../src/tbbmalloc/win32-tbbmalloc-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)tbbmalloc.def
+
+ $(IntDir)tbbmalloc.def;%(Outputs)
+ generating tbbmalloc.def file
+ cl /nologo /TC /EP ../../src/tbbmalloc/win32-tbbmalloc-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)tbbmalloc.def
+
+ $(IntDir)tbbmalloc.def;%(Outputs)
+ true
+ generating tbb.def file
+ cl /nologo /TC /EP ../../src/tbb/win32-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)tbb.def
+
+ $(IntDir)tbb.def;%(Outputs)
+
+
+ true
+ generating tbb.def file
+ cl /nologo /TC /EP ../../src/tbb/win64-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)tbb.def
+
+ $(IntDir)tbb.def;%(Outputs)
+ generating tbbmalloc.def file
+ cl /nologo /TC /EP ../../src/tbbmalloc/win64-tbbmalloc-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)tbbmalloc.def
+
+ $(IntDir)tbbmalloc.def;%(Outputs)
+ true
+ generating tbb.def file
+ cl /nologo /TC /EP ../../src/tbb/win64-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)tbb.def
+
+ $(IntDir)tbb.def;%(Outputs)
+ generating tbbmalloc.def file
+ cl /nologo /TC /EP ../../src/tbbmalloc/win64-tbbmalloc-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)tbbmalloc.def
+
+ $(IntDir)tbbmalloc.def;%(Outputs)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 %(AdditionalOptions)
+ /I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 %(AdditionalOptions)
+ /I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 %(AdditionalOptions)
+ /I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 %(AdditionalOptions)
+
+
+
+
+ {f62787dd-1327-448b-9818-030062bcfaa5}
+ false
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dep/tbb/build/vs100project/tbbmalloc_proxy.vcxproj b/dep/tbb/build/vs100project/tbbmalloc_proxy.vcxproj
new file mode 100644
index 000000000..5dfcbaef6
--- /dev/null
+++ b/dep/tbb/build/vs100project/tbbmalloc_proxy.vcxproj
@@ -0,0 +1,222 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {02F61511-D5B6-46E6-B4BB-DEAA96E6BCC7}
+ tbbmalloc_proxy
+ Win32Proj
+
+
+
+ DynamicLibrary
+ NotSet
+ true
+
+
+ DynamicLibrary
+ NotSet
+
+
+ DynamicLibrary
+ NotSet
+ true
+
+
+ DynamicLibrary
+ NotSet
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectFileVersion>10.0.30319.1
+ $(SolutionDir)ia32\$(Configuration)\
+ ia32\$(Configuration)\
+ false
+ $(SolutionDir)intel64\$(Configuration)\
+ intel64\$(Configuration)\
+ false
+ $(SolutionDir)ia32\$(Configuration)\
+ ia32\$(Configuration)\
+ false
+ $(SolutionDir)intel64\$(Configuration)\
+ intel64\$(Configuration)\
+ false
+ AllRules.ruleset
+
+
+ AllRules.ruleset
+
+
+ AllRules.ruleset
+
+
+ AllRules.ruleset
+
+
+ $(ProjectName)_debug
+ $(ProjectName)_debug
+
+
+
+ /c /MDd /Od /Ob0 /Zi /EHsc /GR /Zc:forScope /Zc:wchar_t /DTBB_USE_DEBUG /D_USE_RTM_VERSION /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /W4 /Wp64 /I../../src /I../../src/rml/include /I../../include /I../../src/tbbmalloc /I../../src/tbbmalloc %(AdditionalOptions)
+ Disabled
+ .;%(AdditionalIncludeDirectories)
+ %(PreprocessorDefinitions)
+ true
+ Sync
+ Default
+ MultiThreadedDebugDLL
+
+
+ Level4
+ false
+ ProgramDatabase
+
+
+ /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO %(AdditionalOptions)
+ $(OutDir)tbbmalloc_debug.lib;%(AdditionalDependencies)
+ $(OutDir)tbbmalloc_proxy_debug.dll
+ true
+ Windows
+ MachineX86
+
+
+
+
+ X64
+
+
+ /c /MDd /Od /Ob0 /Zi /EHsc /GR /Zc:forScope /Zc:wchar_t /DTBB_USE_DEBUG /D_USE_RTM_VERSION /GS- /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /W4 /Wp64 /I../../src /I../../src/rml/include /I../../include /I../../src/tbbmalloc /I../../src/tbbmalloc %(AdditionalOptions)
+ Disabled
+ .;%(AdditionalIncludeDirectories)
+ false
+
+
+ Default
+ MultiThreadedDebugDLL
+ true
+
+
+ Level4
+ false
+ ProgramDatabase
+ false
+
+
+ /nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO /DEF:$(IntDir)tbbmalloc.def %(AdditionalOptions)
+ $(OutDir)tbbmalloc_proxy_debug.dll
+ true
+ Windows
+ MachineX64
+
+
+
+
+ /c /MD /O2 /Zi /EHsc /GR /Zc:forScope /Zc:wchar_t /Oy /D_USE_RTM_VERSION /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /W4 /Wp64 /I../../src /I../../src/rml/include /I../../include /I../../src/tbbmalloc /I../../src/tbbmalloc %(AdditionalOptions)
+ .;%(AdditionalIncludeDirectories)
+ %(PreprocessorDefinitions)
+
+
+ MultiThreadedDLL
+
+
+ Level4
+ false
+ ProgramDatabase
+
+
+ /nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO %(AdditionalOptions)
+ $(OutDir)tbbmalloc_proxy.dll
+ true
+ Windows
+ true
+ true
+ MachineX86
+
+
+
+
+ X64
+
+
+ /c /MD /O2 /Zi /EHsc /GR /Zc:forScope /Zc:wchar_t /D_USE_RTM_VERSION /GS- /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /W4 /Wp64 /I../../src /I../../src/rml/include /I../../include /I../../src/tbbmalloc /I../../src/tbbmalloc %(AdditionalOptions)
+ .;%(AdditionalIncludeDirectories)
+ %(PreprocessorDefinitions)
+
+
+ MultiThreadedDLL
+
+
+ Level4
+ false
+ ProgramDatabase
+
+
+ /nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO /DEF:$(IntDir)tbbmalloc.def %(AdditionalOptions)
+ $(OutDir)tbbmalloc_proxy.dll
+ true
+ Windows
+ true
+ true
+ MachineX64
+
+
+
+
+
+
+
+
+
+
+
+
+ /I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 %(AdditionalOptions)
+ /I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 %(AdditionalOptions)
+ /I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 %(AdditionalOptions)
+ /I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 %(AdditionalOptions)
+
+
+
+
+ {b15f131e-328a-4d42-adc2-9ff4ca6306d8}
+ false
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dep/tbb/build/vs100project/version_string.tmp b/dep/tbb/build/vs100project/version_string.tmp
new file mode 100644
index 000000000..2098d6759
--- /dev/null
+++ b/dep/tbb/build/vs100project/version_string.tmp
@@ -0,0 +1 @@
+#define __TBB_VERSION_STRINGS "Empty"
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 000000000..7ee54dbda
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,34 @@
+#
+# Copyright (C) 2005-2011 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
+#
+
+# Needs to link against mangos_worldd.lib
+if(WIN32)
+ link_directories(
+ ${CMAKE_BINARY_DIR}/src/mangosd/${CMAKE_CFG_INTDIR}
+ )
+ include_directories(
+ ${CMAKE_SOURCE_DIR}/dep/include # For Win32
+ )
+endif()
+
+add_subdirectory(bindings)
+add_subdirectory(framework)
+add_subdirectory(shared)
+add_subdirectory(realmd)
+add_subdirectory(game)
+add_subdirectory(mangosd)
diff --git a/src/bindings/CMakeLists.txt b/src/bindings/CMakeLists.txt
new file mode 100644
index 000000000..fc13e3afd
--- /dev/null
+++ b/src/bindings/CMakeLists.txt
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2005-2011 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
+#
+
+# add_subdirectory(universal)
diff --git a/src/bindings/universal/CMakeLists.txt b/src/bindings/universal/CMakeLists.txt
new file mode 100644
index 000000000..38a9eb457
--- /dev/null
+++ b/src/bindings/universal/CMakeLists.txt
@@ -0,0 +1,85 @@
+#
+# Copyright (C) 2005-2011 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
+#
+
+file(GLOB_RECURSE mangosscript_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp *.h)
+
+include_directories(
+ ${CMAKE_SOURCE_DIR}/src/shared
+ ${CMAKE_SOURCE_DIR}/src/framework
+ ${CMAKE_BINARY_DIR}
+ ${ACE_INCLUDE_DIR}
+ ${MYSQL_INCLUDE_DIR}
+)
+
+add_library(mangosscript SHARED
+ ${mangosscript_SRCS}
+)
+
+add_dependencies(mangosscript revision.h)
+if(NOT ACE_USE_EXTERNAL)
+ add_dependencies(mangosscript ACE_Project)
+# add_dependencies(mangosscript ace)
+endif()
+
+target_link_libraries(mangosscript
+ ${ZLIB_LIBRARIES}
+ ${ACE_LIBRARIES}
+)
+
+if(WIN32)
+ target_link_libraries(mangosscript
+ mangosd # FIXME: could this be done for unix? because unix won't generate exe.libs
+ )
+ if(WIN32 AND PLATFORM MATCHES X86)
+ target_link_libraries(mangosscript
+ debug ${WIN_DEBUGLIBS}
+ )
+ endif()
+endif()
+
+if(UNIX)
+ set(mangosscript_LINK_FLAGS "-pthread")
+ if(APPLE)
+ set(mangosscript_LINK_FLAGS "-framework Carbon ${mangosscript_LINK_FLAGS}")
+ # Needed for the linking because of the missing symbols
+ set(mangosscript_LINK_FLAGS "-Wl,-undefined -Wl,dynamic_lookup ${mangosscript_LINK_FLAGS}")
+ endif()
+
+ if(APPLE)
+ set(mangosscript_PROPERTIES INSTALL_NAME_DIR "${LIBS_DIR}")
+ else()
+ set(mangosscript_PROPERTIES INSTALL_RPATH ${LIBS_DIR})
+ endif()
+
+ # Run out of build tree
+ set(mangosscript_PROPERTIES
+ ${mangosscript_PROPERTIES}
+ BUILD_WITH_INSTALL_RPATH OFF
+ )
+
+ set_target_properties(mangosscript PROPERTIES
+ LINK_FLAGS ${mangosscript_LINK_FLAGS}
+ ${mangosscript_PROPERTIES}
+ )
+endif()
+
+# LIBRARY = dyld / so, RUNTIME = dll
+install(TARGETS mangosscript
+ LIBRARY DESTINATION ${LIBS_DIR}
+ RUNTIME DESTINATION ${LIBS_DIR}
+)
diff --git a/src/framework/CMakeLists.txt b/src/framework/CMakeLists.txt
new file mode 100644
index 000000000..c3c20444f
--- /dev/null
+++ b/src/framework/CMakeLists.txt
@@ -0,0 +1,72 @@
+#
+# Copyright (C) 2005-2011 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
+#
+
+# include(${CMAKE_SOURCE_DIR}/dep/tbb/tbbinclude.cmake)
+
+file(GLOB_RECURSE framework_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp *.h)
+
+source_group("Other"
+ REGULAR_EXPRESSION .*
+)
+
+source_group("GameSystem"
+ REGULAR_EXPRESSION GameSystem
+)
+
+source_group("Platform"
+ REGULAR_EXPRESSION Platform
+)
+
+source_group("Policies"
+ REGULAR_EXPRESSION Policies
+)
+
+source_group("Utilities"
+ REGULAR_EXPRESSION Utilities
+)
+
+source_group("LinkedReference"
+ REGULAR_EXPRESSION LinkedReference
+)
+
+source_group("Dynamic"
+ REGULAR_EXPRESSION Dynamic
+)
+
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${ACE_INCLUDE_DIR}
+)
+
+add_library(framework STATIC
+ ${framework_SRCS}
+)
+
+if(NOT TBB_USE_EXTERNAL)
+ add_dependencies(framework TBB_Project)
+# add_dependencies(framework tbb)
+# add_dependencies(framework tbbmalloc)
+endif()
+if(NOT ACE_USE_EXTERNAL)
+ add_dependencies(framework ACE_Project)
+# add_dependencies(framework ace)
+endif()
+
+target_link_libraries(framework
+ ${TBB_LIBRARIES}
+)
diff --git a/src/game/CMakeLists.txt b/src/game/CMakeLists.txt
new file mode 100644
index 000000000..b583e92d6
--- /dev/null
+++ b/src/game/CMakeLists.txt
@@ -0,0 +1,108 @@
+#
+# Copyright (C) 2005-2011 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
+#
+
+file(GLOB_RECURSE game_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp *.h)
+
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/vmap
+ ${CMAKE_SOURCE_DIR}/dep/include/g3dlite
+ ${CMAKE_SOURCE_DIR}/dep/include
+ ${CMAKE_SOURCE_DIR}/src/shared
+ ${CMAKE_SOURCE_DIR}/src/framework
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}/src/shared
+ ${MYSQL_INCLUDE_DIR}
+ ${ACE_INCLUDE_DIR}
+)
+
+source_group("Object"
+ REGULAR_EXPRESSION .*
+)
+
+source_group("World/Handlers"
+ # REGULAR_EXPRESSION Mgr|Handler|Manager|BattleGround|Cell|Channel|Chat|Gossip|Grid|Group|Instance|Mail|Map|Path|Pool|Quest|Script|Skill|Spell|Transports|Update|Weather|World
+ REGULAR_EXPRESSION Mgr|Handler|Manager|Cell|Channel|Chat|Gossip|Grid|Instance|Map|Path|Pool|Script|Skill|Transports|Update|Weather|World
+)
+
+source_group("Motion generators"
+ REGULAR_EXPRESSION Movement|Holder|Motion|Traveller
+)
+
+source_group("Server"
+ REGULAR_EXPRESSION Socket|Session|Opcodes|DBC
+ FILES
+ SharedDefines.h
+)
+
+source_group("Chat Commands"
+ REGULAR_EXPRESSION Level[0-9]
+ FILES
+ debugcmds.cpp
+)
+
+source_group("Tool"
+ REGULAR_EXPRESSION DatabaseCleaner|Language|PlayerDump
+)
+
+source_group("References"
+ REGULAR_EXPRESSION Reference|RefManager|ThreatManager
+)
+
+if(PCH)
+ include_directories(${CMAKE_CURRENT_BINARY_DIR})
+endif()
+
+add_library(game STATIC
+ ${game_SRCS}
+)
+
+target_link_libraries(game
+ shared
+)
+
+if(UNIX)
+ # Both systems don't have libdl and don't need them
+ if (NOT (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "NetBSD"))
+ target_link_libraries(game
+ dl
+ )
+ endif()
+endif()
+
+add_dependencies(game revision.h)
+if(NOT ACE_USE_EXTERNAL)
+ add_dependencies(game ACE_Project)
+# add_dependencies(game ace)
+endif()
+
+# Generate precompiled header
+if(PCH)
+ if(MSVC OR XCODE)
+ if(MSVC)
+ set(game_pch "${CMAKE_CURRENT_SOURCE_DIR}/pchdef.cpp")
+ endif()
+ add_native_precompiled_header(game ${CMAKE_CURRENT_SOURCE_DIR}/pchdef.h)
+ elseif(CMAKE_COMPILER_IS_GNUCXX)
+ add_precompiled_header(game ${CMAKE_CURRENT_SOURCE_DIR}/pchdef.h)
+ if(NOT ACE_USE_EXTERNAL)
+ add_dependencies(game_pch_dephelp ACE_Project)
+ # add_dependencies(game_pch_dephelp ace)
+ endif()
+ endif()
+endif()
diff --git a/src/mangosd/CMakeLists.txt b/src/mangosd/CMakeLists.txt
new file mode 100644
index 000000000..074b692a1
--- /dev/null
+++ b/src/mangosd/CMakeLists.txt
@@ -0,0 +1,98 @@
+#
+# Copyright (C) 2005-2011 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
+#
+
+set(EXECUTABLE_NAME mangosd)
+file(GLOB_RECURSE EXECUTABLE_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp *.h)
+
+include_directories(
+ ${CMAKE_SOURCE_DIR}/src/shared
+ ${CMAKE_SOURCE_DIR}/dep/include/gsoap
+ ${CMAKE_SOURCE_DIR}/src/framework
+ ${CMAKE_SOURCE_DIR}/src/game
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}/src/shared
+ ${ACE_INCLUDE_DIR}
+ ${MYSQL_INCLUDE_DIR}
+ ${OPENSSL_INCLUDE_DIR}
+)
+
+add_executable(${EXECUTABLE_NAME}
+ ${EXECUTABLE_SRCS}
+)
+
+add_dependencies(${EXECUTABLE_NAME} revision.h)
+if(NOT ACE_USE_EXTERNAL)
+ add_dependencies(${EXECUTABLE_NAME} ACE_Project)
+# add_dependencies(${EXECUTABLE_NAME} ace)
+endif()
+
+target_link_libraries(${EXECUTABLE_NAME}
+ game
+ shared
+ framework
+ g3dlite
+ gsoap
+ ${ACE_LIBRARIES}
+)
+
+if(WIN32)
+ target_link_libraries(${EXECUTABLE_NAME}
+ zlib
+ optimized ${MYSQL_LIBRARY}
+ optimized ${OPENSSL_LIBRARIES}
+ debug ${MYSQL_DEBUG_LIBRARY}
+ debug ${OPENSSL_DEBUG_LIBRARIES}
+ )
+ if(PLATFORM MATCHES X86)
+ target_link_libraries(${EXECUTABLE_NAME}
+ debug ${WIN_DEBUGLIBS}
+ )
+ endif()
+endif()
+
+if(UNIX)
+ target_link_libraries(${EXECUTABLE_NAME}
+ ${MYSQL_LIBRARY}
+ ${OPENSSL_LIBRARIES}
+ ${OPENSSL_EXTRA_LIBRARIES}
+ ${ZLIB_LIBRARIES}
+ )
+endif()
+
+set(EXECUTABLE_LINK_FLAGS "")
+
+if(UNIX)
+ set(EXECUTABLE_LINK_FLAGS "-pthread ${EXECUTABLE_LINK_FLAGS}")
+endif()
+
+if(APPLE)
+ set(EXECUTABLE_LINK_FLAGS "-framework Carbon ${EXECUTABLE_LINK_FLAGS}")
+endif()
+
+set_target_properties(${EXECUTABLE_NAME} PROPERTIES LINK_FLAGS
+ "${EXECUTABLE_LINK_FLAGS}"
+)
+
+install(TARGETS ${EXECUTABLE_NAME} DESTINATION ${BIN_DIR})
+install(FILES run-mangosd DESTINATION ${BIN_DIR})
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/mangosd.conf.dist.in ${CMAKE_CURRENT_BINARY_DIR}/mangosd.conf.dist)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/mangosd.conf.dist DESTINATION ${CONF_DIR})
+
+if(WIN32 AND MSVC)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/\${BUILD_TYPE}/${EXECUTABLE_NAME}.pdb DESTINATION ${BIN_DIR} CONFIGURATIONS Debug)
+endif()
diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in
index 0536296c5..25d2b849e 100644
--- a/src/mangosd/mangosd.conf.dist.in
+++ b/src/mangosd/mangosd.conf.dist.in
@@ -14,7 +14,7 @@ ConfVersion=2010100901
# DataDir
# Data directory setting.
# Important: DataDir needs to be quoted, as it is a string which may contain space characters.
-# Example: "@prefix@/share/mangos"
+# Example: "@CMAKE_INSTALL_PREFIX@/share/mangos"
#
# LogsDir
# Logs directory setting.
diff --git a/src/realmd/CMakeLists.txt b/src/realmd/CMakeLists.txt
new file mode 100644
index 000000000..c4455df4e
--- /dev/null
+++ b/src/realmd/CMakeLists.txt
@@ -0,0 +1,88 @@
+#
+# Copyright (C) 2005-2011 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
+#
+
+set(EXECUTABLE_NAME realmd)
+file(GLOB_RECURSE EXECUTABLE_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp *.h)
+
+include_directories(
+ ${CMAKE_SOURCE_DIR}/src/shared
+ ${CMAKE_SOURCE_DIR}/src/framework
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}/src/shared
+ ${MYSQL_INCLUDE_DIR}
+ ${ACE_INCLUDE_DIR}
+)
+
+add_executable(${EXECUTABLE_NAME}
+ ${EXECUTABLE_SRCS}
+)
+
+add_dependencies(${EXECUTABLE_NAME} revision.h)
+if(NOT ACE_USE_EXTERNAL)
+ add_dependencies(${EXECUTABLE_NAME} ACE_Project)
+# add_dependencies(${EXECUTABLE_NAME} ace)
+endif()
+
+target_link_libraries(${EXECUTABLE_NAME}
+ shared
+ framework
+ ${ACE_LIBRARIES}
+)
+
+if(WIN32)
+ target_link_libraries(${EXECUTABLE_NAME}
+ optimized ${MYSQL_LIBRARY}
+ optimized ${OPENSSL_LIBRARIES}
+ debug ${MYSQL_DEBUG_LIBRARY}
+ debug ${OPENSSL_DEBUG_LIBRARIES}
+ )
+ if(PLATFORM MATCHES X86)
+ target_link_libraries(${EXECUTABLE_NAME}
+ debug ${WIN_DEBUGLIBS}
+ )
+ endif()
+endif()
+
+if(UNIX)
+ target_link_libraries(${EXECUTABLE_NAME}
+ ${MYSQL_LIBRARY}
+ ${OPENSSL_LIBRARIES}
+ ${OPENSSL_EXTRA_LIBRARIES}
+ )
+endif()
+
+set(EXECUTABLE_LINK_FLAGS "")
+
+if(UNIX)
+ set(EXECUTABLE_LINK_FLAGS "-pthread ${EXECUTABLE_LINK_FLAGS}")
+endif()
+
+if(APPLE)
+ set(EXECUTABLE_LINK_FLAGS "-framework Carbon ${EXECUTABLE_LINK_FLAGS}")
+endif()
+
+set_target_properties(${EXECUTABLE_NAME} PROPERTIES LINK_FLAGS
+ "${EXECUTABLE_LINK_FLAGS}"
+)
+
+install(TARGETS ${EXECUTABLE_NAME} DESTINATION ${BIN_DIR})
+install(FILES realmd.conf.dist.in DESTINATION ${CONF_DIR} RENAME realmd.conf.dist)
+
+if(WIN32 AND MSVC)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/\${BUILD_TYPE}/${EXECUTABLE_NAME}.pdb DESTINATION ${BIN_DIR} CONFIGURATIONS Debug)
+endif()
diff --git a/src/shared/CMakeLists.txt b/src/shared/CMakeLists.txt
new file mode 100644
index 000000000..5b04b1c21
--- /dev/null
+++ b/src/shared/CMakeLists.txt
@@ -0,0 +1,73 @@
+#
+# Copyright (C) 2005-2011 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
+#
+
+# Glob only and not recurse, there are other libs for that
+file(GLOB_RECURSE shared_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp *.h)
+
+# Exclude Win32 files
+if(NOT WIN32)
+ list(REMOVE_ITEM shared_SRCS
+ WheatyExceptionReport.cpp
+ WheatyExceptionReport.h
+ ServiceWin32.cpp
+ ServiceWin32.h
+ )
+endif()
+
+source_group("Util"
+ REGULAR_EXPRESSION .*
+)
+
+foreach(SRC ${shared_SRCS})
+ get_filename_component(PTH ${SRC} PATH)
+ if(PTH)
+ if(NOT XCODE) # FIXME: Xcode Generator has bug with nested dirs
+ string(REPLACE "/" "\\\\" PTH ${PTH})
+ endif()
+ source_group(${PTH} FILES ${SRC})
+ endif()
+endforeach(SRC)
+
+source_group("DataStores"
+ REGULAR_EXPRESSION DBC
+)
+
+source_group("Log"
+ REGULAR_EXPRESSION Log
+)
+
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_SOURCE_DIR}/dep/include
+ ${CMAKE_SOURCE_DIR}/src/framework
+ ${CMAKE_BINARY_DIR}
+ ${ACE_INCLUDE_DIR}
+ ${MYSQL_INCLUDE_DIR}
+)
+
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/SystemConfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/SystemConfig.h)
+
+add_library(shared STATIC
+ ${shared_SRCS}
+)
+
+add_dependencies(shared revision.h)
+if(NOT ACE_USE_EXTERNAL)
+ add_dependencies(shared ACE_Project)
+# add_dependencies(shared ace)
+endif()
diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h
index 3e8335443..b5426da50 100644
--- a/src/shared/revision_nr.h
+++ b/src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
- #define REVISION_NR "11166"
+ #define REVISION_NR "11167"
#endif // __REVISION_NR_H__