Skip to content

Commit

Permalink
Get g3dlib, zlib and jemalloc to build again
Browse files Browse the repository at this point in the history
--HG--
branch : trunk
rename : opt/cleanup/tab2spaces.sh => contrib/cleanup/tab2spaces.sh
rename : opt/cleanup/whitespace.sh => contrib/cleanup/whitespace.sh
rename : opt/conf_merge/README => contrib/conf_merge/README
rename : opt/conf_merge/index.php => contrib/conf_merge/index.php
rename : opt/conf_merge/merge.php => contrib/conf_merge/merge.php
rename : doc/AuctionHouseBot.txt => docs/AuctionHouseBot.txt
rename : doc/DocStructure.dox => docs/DocStructure.dox
rename : doc/Doxyfile.in => docs/Doxyfile.in
rename : doc/EventAI.txt => docs/EventAI.txt
rename : doc/HowToScript.txt => docs/HowToScript.txt
rename : doc/TextTables.txt => docs/TextTables.txt
rename : doc/UnixInstall.txt => docs/UnixInstall.txt
rename : externals/jemalloc/include/internal/arena.h => externals/jemalloc/jemalloc/internal/arena.h
rename : externals/jemalloc/include/internal/base.h => externals/jemalloc/jemalloc/internal/base.h
rename : externals/jemalloc/include/internal/chunk.h => externals/jemalloc/jemalloc/internal/chunk.h
rename : externals/jemalloc/include/internal/chunk_dss.h => externals/jemalloc/jemalloc/internal/chunk_dss.h
rename : externals/jemalloc/include/internal/chunk_mmap.h => externals/jemalloc/jemalloc/internal/chunk_mmap.h
rename : externals/jemalloc/include/internal/chunk_swap.h => externals/jemalloc/jemalloc/internal/chunk_swap.h
rename : externals/jemalloc/include/internal/ckh.h => externals/jemalloc/jemalloc/internal/ckh.h
rename : externals/jemalloc/include/internal/ctl.h => externals/jemalloc/jemalloc/internal/ctl.h
rename : externals/jemalloc/include/internal/extent.h => externals/jemalloc/jemalloc/internal/extent.h
rename : externals/jemalloc/include/internal/hash.h => externals/jemalloc/jemalloc/internal/hash.h
rename : externals/jemalloc/include/internal/huge.h => externals/jemalloc/jemalloc/internal/huge.h
rename : externals/jemalloc/include/internal/jemalloc_internal.h => externals/jemalloc/jemalloc/internal/jemalloc_internal.h
rename : externals/jemalloc/include/internal/jemalloc_internal.h.in => externals/jemalloc/jemalloc/internal/jemalloc_internal.h.in
rename : externals/jemalloc/include/internal/mb.h => externals/jemalloc/jemalloc/internal/mb.h
rename : externals/jemalloc/include/internal/mutex.h => externals/jemalloc/jemalloc/internal/mutex.h
rename : externals/jemalloc/include/internal/prof.h => externals/jemalloc/jemalloc/internal/prof.h
rename : externals/jemalloc/include/internal/ql.h => externals/jemalloc/jemalloc/internal/ql.h
rename : externals/jemalloc/include/internal/qr.h => externals/jemalloc/jemalloc/internal/qr.h
rename : externals/jemalloc/include/internal/rb.h => externals/jemalloc/jemalloc/internal/rb.h
rename : externals/jemalloc/include/internal/stats.h => externals/jemalloc/jemalloc/internal/stats.h
rename : externals/jemalloc/include/internal/tcache.h => externals/jemalloc/jemalloc/internal/tcache.h
rename : externals/jemalloc/include/internal/totally_not_p_r_n.h => externals/jemalloc/jemalloc/internal/totally_not_p_r_n.h
rename : externals/jemalloc/include/jemalloc.h => externals/jemalloc/jemalloc/jemalloc.h
rename : externals/jemalloc/include/jemalloc.h.in => externals/jemalloc/jemalloc/jemalloc.h.in
rename : externals/jemalloc/include/jemalloc_defs.h => externals/jemalloc/jemalloc/jemalloc_defs.h
rename : externals/jemalloc/include/jemalloc_defs.h.in => externals/jemalloc/jemalloc/jemalloc_defs.h.in
  • Loading branch information
click committed Jun 8, 2010
1 parent c08a7d6 commit f867f6d
Show file tree
Hide file tree
Showing 93 changed files with 19,176 additions and 1,813 deletions.
158 changes: 81 additions & 77 deletions CMakeLists.txt
Expand Up @@ -12,19 +12,22 @@ include(cmake/PCH.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, and create a separate build directory and run 'cmake path_to_project [options]' from there.")
message(FATAL_ERROR "This project requires an out of source build. Remove the file 'CMakeCache.txt' found in this directory before continuing, and create a separate build directory and run 'cmake path_to_project [options]' from there.")
endif(BUILDING_IN_SOURCE)

# Select the Release build configuration by default.
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_BUILD_TYPE "Release")
endif(NOT CMAKE_BUILD_TYPE)

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")
"${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"
)

option(CENTOS "CENTOS" 0)
option(DO_CLI "With CLI" 1)
Expand All @@ -38,49 +41,49 @@ option(DO_TOOLS "Compile tools" 0)
option(DO_WARN "Enable all compile warnings" 0)

set(GENREV_SRC
src/genrevision/genrevision.cpp
src/genrevision/genrevision.cpp
)

if(DO_DEBUG)
add_executable(genrev
add_executable(genrev
${GENREV_SRC}
)
add_custom_target("revision.h" ALL
COMMAND "${CMAKE_BINARY_DIR}/genrev"
${CMAKE_SOURCE_DIR}
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/src/shared"
DEPENDS genrev
)
)
add_custom_target("revision.h" ALL
COMMAND "${CMAKE_BINARY_DIR}/genrev"
${CMAKE_SOURCE_DIR}
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/src/server/shared"
DEPENDS genrev
)
else (DO_DEBUG)
add_executable(genrev
add_executable(genrev
${GENREV_SRC}
)
add_custom_target("revision.h" ALL
COMMAND "${CMAKE_BINARY_DIR}/genrev"
${CMAKE_SOURCE_DIR}
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/src/server/shared"
DEPENDS genrev
)
)
add_custom_target("revision.h" ALL
COMMAND "${CMAKE_BINARY_DIR}/genrev"
${CMAKE_SOURCE_DIR}
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/src/server/shared"
DEPENDS genrev
)
endif(DO_DEBUG)


execute_process(
COMMAND hg tip --template {rev}
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE HG_REVISION
COMMAND hg tip --template {rev}
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE HG_REVISION
)

message("* TrinityCore revision: ${HG_REVISION}")

if(PREFIX)
set(CMAKE_INSTALL_PREFIX ${PREFIX})
set(CMAKE_INSTALL_PREFIX ${PREFIX})
endif(PREFIX)

if(CONF_DIR)

else(CONF_DIR)
set(CONF_DIR ${PREFIX}/etc)
set(CONF_DIR ${PREFIX}/etc)
endif(CONF_DIR)

set(LIBSDIR ${CMAKE_INSTALL_PREFIX}/lib)

message("* Will install to: ${CMAKE_INSTALL_PREFIX}")
Expand All @@ -91,98 +94,97 @@ find_library(SSLLIB NAMES ssl DOC "SSL library")
find_library(ZLIB z "Zlib library")

if(DO_MYSQL)
message("* With MySQL")
FIND_MYSQL()
ADD_DEFINITIONS(-DDO_MYSQL)
message("* With MySQL")
FIND_MYSQL()
ADD_DEFINITIONS(-DDO_MYSQL)
endif(DO_MYSQL)

if(DO_SCRIPTS)
message("* With Trinity Scripts")
ADD_DEFINITIONS(-DDO_SCRIPTS)
add_definitions(-D_TRINITY_SCRIPT_CONFIG='"${CONF_DIR}/trinitycore.conf"')
message("* With Trinity Scripts")
ADD_DEFINITIONS(-DDO_SCRIPTS)
add_definitions(-D_TRINITY_SCRIPT_CONFIG='"${CONF_DIR}/trinitycore.conf"')
else (DO_SCRIPTS)
message("* Without Trinity Scripts")
message("* Without Trinity Scripts")
endif(DO_SCRIPTS)

message("-- Miscellaneus options:")

if(DO_CLI)
message("* With CLI")
add_definitions(-DENABLE_CLI)
message("* With CLI")
add_definitions(-DENABLE_CLI)
else (DO_CLI)
message(* Without CLI)
message(* Without CLI)
endif(DO_CLI)

if(DO_RA)
message("* With RA")
add_definitions(-DENABLE_RA)
message("* With RA")
add_definitions(-DENABLE_RA)
else(DO_RA)
message("* Without RA")
message("* Without RA")
endif(DO_RA)

if(DO_DEBUG)
message("* Debug mode ON")
add_definitions(-g -DTRINITY_DEBUG)
message("* Debug mode ON")
add_definitions(-g -DTRINITY_DEBUG)
endif(DO_DEBUG)

if(DO_WARN)
message("* All warnings mode")
add_definitions(-Wall -Wfatal-errors -Wextra)
message("* All warnings mode")
add_definitions(-Wall -Wfatal-errors -Wextra)
endif(DO_WARN)

if(DO_SQL)
message("* Installing SQL files")
message("* Installing SQL files")
else (DO_SQL)
message("* NOT installing SQL files")
message("* NOT installing SQL files")
endif(DO_SQL)

if(DO_PCH)
message("* Using precompiled headers")
message("* Using precompiled headers")
else (DO_PCH)
message("* NOT using precompiled headers")
message("* NOT using precompiled headers")
endif(DO_PCH)

if(DO_TOOLS)
message("* With Tools")
message("* With Tools")
else (DO_TOOLS)
message("* Without Tools")
message("* Without Tools")
endif(DO_TOOLS)


if(UNIX)
if(CENTOS)
add_definitions(-DCENTOS)
message("* Building with termcap")
FIND_TERMCAP()
else(CENTOS)
message("* Building with readline")
FIND_READLINE()
endif(CENTOS)
if(CENTOS)
add_definitions(-DCENTOS)
message("* Building with termcap")
FIND_TERMCAP()
else(CENTOS)
message("* Building with readline")
FIND_READLINE()
endif(CENTOS)
endif(UNIX)

FIND_ACE(ACE)
if(ACE_FOUND)
message(STATUS "Found ACE library: ${ACE_LIBRARY}")
message(STATUS "Include dir is: ${ACE_INCLUDE_DIR}")
message(STATUS "Found ACE library: ${ACE_LIBRARY}")
message(STATUS "Include dir is: ${ACE_INCLUDE_DIR}")
else(ACE_FOUND)
message(SEND_ERROR "** ACE library not found! Trinity Core cannot be compiled!")
message(SEND_ERROR "** Please build ACE from http://www.cs.wustl.edu/~schmidt/ACE.html")
#For now remove msg about install from repo, as ubuntu/debian don't have needed ver in repos.
#message(SEND_ERROR "** your distro may provide a binary for ACE e.g. for ubuntu try apt-get install libace-dev")
return()
#set(BUILD_ACE 1)
#set(ACE_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/dep/ACE_wrappers ${CMAKE_BINARY_DIR}/dep/ACE_wrappers")
#set(ACE_LIBRARY ACE)
#message(STATUS "I will try to build ACE from: ${ACE_INCLUDE_DIR}")
#message(STATUS "And link using: ${ACE_LIBRARY}")
message(SEND_ERROR "** ACE library not found! Trinity Core cannot be compiled!")
message(SEND_ERROR "** Please build ACE from http://www.cs.wustl.edu/~schmidt/ACE.html")
#For now remove msg about install from repo, as ubuntu/debian don't have needed ver in repos.
#message(SEND_ERROR "** your distro may provide a binary for ACE e.g. for ubuntu try apt-get install libace-dev")
return()
#set(BUILD_ACE 1)
#set(ACE_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/dep/ACE_wrappers ${CMAKE_BINARY_DIR}/dep/ACE_wrappers")
#set(ACE_LIBRARY ACE)
#message(STATUS "I will try to build ACE from: ${ACE_INCLUDE_DIR}")
#message(STATUS "And link using: ${ACE_LIBRARY}")
endif(ACE_FOUND)

#somehow line below don't work. so for now change it to if exist
#check_include_files(${ACE_INCLUDE_DIR}/ace/Stack_Trace.h HAVE_ACE_STACK_TRACE_H)
if(EXISTS ${ACE_INCLUDE_DIR}/ace/Stack_Trace.h)
set(HAVE_ACE_STACK_TRACE_H 1)
set(HAVE_ACE_STACK_TRACE_H 1)
else(EXISTS ${ACE_INCLUDE_DIR}/ace/Stack_Trace.h)
message(STATUS "** Your libace is out of date. Please update your libace!")
message(STATUS "** Your libace is out of date. Please update your libace!")
endif(EXISTS ${ACE_INCLUDE_DIR}/ace/Stack_Trace.h)

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
Expand All @@ -201,8 +203,10 @@ set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

add_subdirectory(externals)
add_subdirectory(src)

if(DO_SQL)
message("* Copy SQL files ON")
add_subdirectory(sql)
message("* Copy SQL files ON")
add_subdirectory(sql)
endif(DO_SQL)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions externals/CMakeLists.txt
@@ -0,0 +1,7 @@
add_subdirectory(ace)
#add_subdirectory(bzip2)
add_subdirectory(g3dlite)
add_subdirectory(jemalloc)
#add_subdirectory(libmpq)
add_subdirectory(sockets)
add_subdirectory(zlib)
17 changes: 15 additions & 2 deletions externals/PackageList.txt
Expand Up @@ -2,39 +2,52 @@ TrinityCore uses (parts of or in whole) the following opensource software :

ACE (ADAPTIVE Communication Environment)
http://www.cs.wustl.edu/~schmidt/ACE.html
Version: UNKNOWN

bzip2 (a freely available, patent free, high-quality data compressor)
http://www.bzip.org/
Version: 1.0.5

G3D 6.09 (a commercial-grade C++ 3D engine available as Open Source (BSD License)
G3D (a commercial-grade C++ 3D engine available as Open Source (BSD License)
http://g3d.sourceforge.net/
Version: 6.09

jemalloc (a general-purpose scalable concurrent malloc-implementation)
http://www.canonware.com/jemalloc/

Version: UNKNOWN

libMPQ (a library for reading MPQ files)
https://libmpq.org/
Version: 1.0.4

MersenneTwister (a very fast random number generator)
http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html
Version: 0.4.2

SFMT (SIMD-oriented Fast Mersenne Twister)
http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/index.html
Version: 1.3.3

MySQL (the world's most popular open source database software)
http://www.mysql.com/about/
Version: UNKNOWN

OpenSSL (an opensource toolkit implementing SSL v2/v3 and TLS v1 protocols)
http://www.openssl.org/
Version: UNKNOWN

sockets (a GPL licensed C++ class library wrapping the berkeley sockets C API)
http://www.alhem.net/Sockets/
Version: UNKNOWN

utf8-cpp (UTF-8 with C++ in a Portable Way)
http://utfcpp.sourceforge.net/
Version: 2.3

vld (a free open-source memory leak detection system for Visual C++)
http://sites.google.com/site/dmoulding/vld
Version: 1.0

zlib (A Massively Spiffy Yet Delicately Unobtrusive Compression Library)
http://www.zlib.net/
Version: 1.2.5

0 comments on commit f867f6d

Please sign in to comment.