[Rel21] Stage 1 of updates for Rel21 Build System

This commit is contained in:
Antz 2015-07-28 10:59:34 +01:00 committed by Antz
parent 13292befd6
commit fdefc0869a
1951 changed files with 40474 additions and 252610 deletions

View file

@ -1,5 +1,7 @@
# MaNGOS is a full featured server for World of Warcraft, supporting
# the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
#
# This code is part of MaNGOS. Contributor & Copyright details are in AUTHORS/THANKS.
# Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
#
# 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
@ -14,15 +16,14 @@
# 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
#
#Used by vmap-assembler and mmap-generator
include_directories(
"${CMAKE_SOURCE_DIR}/src/shared"
"${CMAKE_SOURCE_DIR}/src/game/vmap/"
"${CMAKE_SOURCE_DIR}/dep/include/g3dlite/"
"${CMAKE_SOURCE_DIR}/src/framework/"
"${ACE_INCLUDE_DIR}"
${CMAKE_SOURCE_DIR}/src/shared
${CMAKE_SOURCE_DIR}/src/game/vmap
${CMAKE_SOURCE_DIR}/dep/g3dlite
${CMAKE_SOURCE_DIR}/src/framework
${ACE_INCLUDE_DIR}
)
add_definitions(-DMMAP_GENERATOR -DNO_CORE_FUNCS)

View file

@ -1,5 +1,7 @@
# MaNGOS is a full featured server for World of Warcraft, supporting
# the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
#
# This code is part of MaNGOS. Contributor & Copyright details are in AUTHORS/THANKS.
# Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
#
# 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
@ -14,9 +16,6 @@
# 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
#
cmake_minimum_required (VERSION 2.8)
project(mmap-generator)
@ -39,26 +38,57 @@ endif()
add_definitions(-DDT_POLYREF64)
include_directories(
"${CMAKE_SOURCE_DIR}/src"
"${CMAKE_SOURCE_DIR}/src/shared"
"${CMAKE_SOURCE_DIR}/src/game"
"${CMAKE_SOURCE_DIR}/src/game/vmap"
"${CMAKE_SOURCE_DIR}/dep/include/g3dlite"
"${CMAKE_SOURCE_DIR}/src/framework"
"${CMAKE_SOURCE_DIR}/src/game/WorldHandlers"
"${CMAKE_SOURCE_DIR}/dep/recastnavigation/Detour/Include"
"${CMAKE_SOURCE_DIR}/dep/recastnavigation/Recast/Include"
"${CMAKE_SOURCE_DIR}/dep/src/zlib"
${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/src/shared
${CMAKE_SOURCE_DIR}/src/game
${CMAKE_SOURCE_DIR}/src/game/vmap
${CMAKE_SOURCE_DIR}/dep/g3dlite
${CMAKE_SOURCE_DIR}/dep/g3dlite/G3D
${CMAKE_SOURCE_DIR}/src/framework
${CMAKE_SOURCE_DIR}/src/game/WorldHandlers
${CMAKE_SOURCE_DIR}/dep/recastnavigation/Detour/Include
${CMAKE_SOURCE_DIR}/dep/recastnavigation/Recast/Include
${CMAKE_SOURCE_DIR}/dep/zlib
)
set(SOURCES
./src/IntermediateValues.cpp
./src/generator.cpp
./src/MapBuilder.cpp
./src/TerrainBuilder.cpp
./src/VMapExtensions.cpp
${CMAKE_CURRENT_SOURCE_DIR}/IntermediateValues.cpp
${CMAKE_CURRENT_SOURCE_DIR}/generator.cpp
${CMAKE_CURRENT_SOURCE_DIR}/MapBuilder.cpp
${CMAKE_CURRENT_SOURCE_DIR}/TerrainBuilder.cpp
${CMAKE_CURRENT_SOURCE_DIR}/VMapExtensions.cpp
)
add_executable( MoveMapGen ${SOURCES} )
add_executable(${EXECUTABLE_NAME} ${SOURCES} ${EXECUTABLE_SRCS})
target_link_libraries( MoveMapGen g3dlite vmap Detour Recast zlib )
if(NOT ACE_USE_EXTERNAL)
target_link_libraries(${EXECUTABLE_NAME} ace)
else()
target_link_libraries(${EXECUTABLE_NAME} ACE)
endif()
if(UNIX)
target_link_libraries(${EXECUTABLE_NAME} rt)
endif()
target_link_libraries(${EXECUTABLE_NAME} g3dlite vmap detour recast zlib shared)
#Output the compiled exes to build/bin/$(Configuration)/tools directory on windows by default
if(WIN32)
if ( MSVC )
set_target_properties(${EXECUTABLE_NAME} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin/Release/tools
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/bin/Debug/tools
)
elseif ( MINGW )
set_target_properties(${EXECUTABLE_NAME} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin/tools
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/bin/tools
)
endif()
endif()
install(TARGETS ${EXECUTABLE_NAME} DESTINATION "${BIN_DIR}/${TOOLS_DIR}")
if(WIN32 AND MSVC)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/\${BUILD_TYPE}/${EXECUTABLE_NAME}.pdb" DESTINATION "${BIN_DIR}/${TOOLS_DIR}" CONFIGURATIONS Debug)
endif()

View file

@ -27,7 +27,7 @@
#include "MMapCommon.h"
#include "MangosMap.h"
#include "MoveMapSharedDefines.h"
#include "../../src/game/MoveMapSharedDefines.h"
#include "WorldModel.h"

View file

@ -1,30 +1,86 @@
# This code is part of MaNGOS. Contributor & Copyright details are in AUTHORS/THANKS.
# MaNGOS is a full featured server for World of Warcraft, supporting
# the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
cmake_minimum_required (VERSION 2.8)
# 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_MAP_EXTRACTOR)
set(EXECUTABLE_NAME "map-extractor")
if(WIN32)
# add resource file to windows build
set(EXECUTABLE_SRCS ${EXECUTABLE_SRCS} map-extractor.rc)
endif()
include_directories(
${CMAKE_SOURCE_DIR}/dep/StormLib/src
${MANGOS_MAP_EXTRACTOR_SOURCE_DIR}/loadlib
#${CMAKE_SOURCE_DIR}/dep/libmpq
${CMAKE_SOURCE_DIR}/dep/StormLib/src
${CMAKE_SOURCE_DIR}/dep/loadlib
)
link_directories(
${CMAKE_CURRENT_SOURCE_DIR}/dep/StormLib/src
${MANGOS_MAP_EXTRACTOR_SOURCE_DIR}/loadlib
add_executable(${EXECUTABLE_NAME} dbcfile.cpp System.cpp ${EXECUTABLE_SRCS})
target_link_libraries(${EXECUTABLE_NAME} StormLib loadlib)
#Output the compiled exes to build/bin/$(Configuration)/tools directory on windows by default
if(WIN32)
if ( MSVC )
set_target_properties(${EXECUTABLE_NAME} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin/Release/tools
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/bin/Debug/tools
)
elseif ( MINGW )
set_target_properties(${EXECUTABLE_NAME} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin/tools
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/bin/tools
)
endif()
endif()
install(TARGETS ${EXECUTABLE_NAME} DESTINATION "${BIN_DIR}/${TOOLS_DIR}")
if(WIN32 AND MSVC)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/\${BUILD_TYPE}/${EXECUTABLE_NAME}.pdb" DESTINATION "${BIN_DIR}/${TOOLS_DIR}" CONFIGURATIONS Debug)
endif()
#install documentation and generation scripts
install(
FILES
"${CMAKE_CURRENT_SOURCE_DIR}/../Extractor_Binaries/ExtractResources.sh"
"${CMAKE_CURRENT_SOURCE_DIR}/../Extractor_Binaries/make_vmaps.bat"
"${CMAKE_CURRENT_SOURCE_DIR}/../Extractor_Binaries/mmap_excluded.txt"
"${CMAKE_CURRENT_SOURCE_DIR}/../Extractor_Binaries/MoveMapGen.sh"
"${CMAKE_CURRENT_SOURCE_DIR}/../Extractor_Binaries/offmesh.txt"
"${CMAKE_CURRENT_SOURCE_DIR}/../Extractor_Binaries/README.txt"
DESTINATION
"${BIN_DIR}/${TOOLS_DIR}"
)
add_subdirectory (loadlib)
add_executable (${EXECUTABLE_NAME} dbcfile.cpp System.cpp)
target_link_libraries (${EXECUTABLE_NAME} StormLib loadlib)
if( WIN32 )
if ( MSVC )
add_custom_command(TARGET ${EXECUTABLE_NAME}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_BINARY_DIR}/bin/$(ConfigurationName)/tools/"
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/../Extractor_Binaries" "${CMAKE_BINARY_DIR}/bin/$(ConfigurationName)/tools/"
)
elseif ( MINGW )
add_custom_command(TARGET ${EXECUTABLE_NAME}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_BINARY_DIR}/bin/tools/"
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/../Extractor_Binaries" "${CMAKE_BINARY_DIR}/bin/tools/"
)
endif()
endif()

View file

@ -8,6 +8,6 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
add_library(loadlib loadlib.cpp adt.cpp wdt.cpp)
add_library (loadlib loadlib.cpp adt.cpp wdt.cpp)
# link loadlib with zlib
target_link_libraries (loadlib zlib)
target_link_libraries (loadlib zlib)

View file

@ -30,7 +30,7 @@
#endif
#include <string>
#include "StormLib.h"
#include "..\..\dep\StormLib\src\StormLib.h"
#include <deque>
#ifdef WIN32

View file

@ -1,5 +1,7 @@
# MaNGOS is a full featured server for World of Warcraft, supporting
# the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
#
# This code is part of MaNGOS. Contributor & Copyright details are in AUTHORS/THANKS.
# Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
#
# 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
@ -14,58 +16,69 @@
# 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
#
cmake_minimum_required (VERSION 2.8)
project (MANGOS_VMAP_ASSEMB_IO)
project(MANGOS_VMAP_ASSEMB_IO)
set(EXECUTABLE_NAME "vmap-assembler")
# comment next line to disable debug mode
#TODO: These should be general, not with the -D part for windows to work too?
add_definitions("-DIOMAP_DEBUG")
add_definitions("-DNO_CORE_FUNCS")
include_directories(
"${CMAKE_SOURCE_DIR}/src/shared"
"${CMAKE_SOURCE_DIR}/src/game/vmap/"
"${CMAKE_SOURCE_DIR}/dep/include/g3dlite/"
"${CMAKE_SOURCE_DIR}/src/framework/"
"${ACE_INCLUDE_DIR}"
${CMAKE_SOURCE_DIR}/src/shared
${CMAKE_SOURCE_DIR}/src/game/vmap
${CMAKE_SOURCE_DIR}/dep/g3dlite
${CMAKE_SOURCE_DIR}/dep/g3dlite/G3D
${CMAKE_SOURCE_DIR}/src/framework
${ACE_INCLUDE_DIR}
)
if(WIN32)
# add resource file to windows build
set(EXECUTABLE_SRCS ${EXECUTABLE_SRCS} vmap-assembler.rc)
# add resource file to windows build
set(EXECUTABLE_SRCS ${EXECUTABLE_SRCS} vmap-assembler.rc)
endif()
add_executable(${EXECUTABLE_NAME} vmap_assembler.cpp ${EXECUTABLE_SRCS})
if(NOT ACE_USE_EXTERNAL)
target_link_libraries(${EXECUTABLE_NAME} ace)
target_link_libraries(${EXECUTABLE_NAME} ace)
else()
target_link_libraries(${EXECUTABLE_NAME} ACE)
target_link_libraries(${EXECUTABLE_NAME} ACE)
endif()
if(UNIX)
target_link_libraries(${EXECUTABLE_NAME} rt dl)
endif()
target_link_libraries(${EXECUTABLE_NAME} vmap g3dlite zlib)
set(EXECUTABLE_LINK_FLAGS "")
if(UNIX)
if(CMAKE_C_COMPILER MATCHES "clang" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
set(EXECUTABLE_LINK_FLAGS "-pthread${EXECUTABLE_LINK_FLAGS}")
endif()
endif()
set_target_properties(${EXECUTABLE_NAME} PROPERTIES LINK_FLAGS "${EXECUTABLE_LINK_FLAGS}")
#Output the compiled exes to build/bin/$(Configuration)/tools directory on windows by default
if(WIN32)
if ( MSVC )
set_target_properties(${EXECUTABLE_NAME} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin/Release/tools
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/bin/Debug/tools
)
elseif ( MINGW )
set_target_properties(${EXECUTABLE_NAME} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin/tools
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/bin/tools
)
endif()
if ( MSVC )
set_target_properties(${EXECUTABLE_NAME} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin/Release/tools
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/bin/Debug/tools
)
elseif ( MINGW )
set_target_properties(${EXECUTABLE_NAME} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin/tools
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/bin/tools
)
endif()
endif()
install(TARGETS ${EXECUTABLE_NAME} DESTINATION "${BIN_DIR}/${TOOLS_DIR}")
if(WIN32 AND MSVC)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/\${BUILD_TYPE}/${EXECUTABLE_NAME}.pdb" DESTINATION "${BIN_DIR}/${TOOLS_DIR}" CONFIGURATIONS Debug)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/\${BUILD_TYPE}/${EXECUTABLE_NAME}.pdb" DESTINATION "${BIN_DIR}/${TOOLS_DIR}" CONFIGURATIONS Debug)
endif()

View file

@ -1,5 +1,7 @@
# MaNGOS is a full featured server for World of Warcraft, supporting
# the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
#
# This code is part of MaNGOS. Contributor & Copyright details are in AUTHORS/THANKS.
# Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
#
# 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
@ -14,24 +16,48 @@
# 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
#
cmake_minimum_required (VERSION 2.8)
project (MANGOS_VMAP_EXTRACT_IO)
set(EXECUTABLE_NAME "vmap-extractor")
# uncomment next line to disable debug mode
ADD_DEFINITIONS("-DIOMAP_DEBUG")
# build setup currently only supports libmpq 0.4.x
ADD_DEFINITIONS("-DUSE_LIBMPQ04")
ADD_DEFINITIONS("-Wall")
ADD_DEFINITIONS("-ggdb")
ADD_DEFINITIONS("-O3")
if(WIN32)
# add resource file to windows build
set(EXECUTABLE_SRCS ${EXECUTABLE_SRCS} vmap-extractor.rc)
endif()
include_directories(
"${CMAKE_SOURCE_DIR}/dep/StormLib/src"
#${CMAKE_SOURCE_DIR}/dep/libmpq
${CMAKE_SOURCE_DIR}/dep/StormLib/src
${CMAKE_SOURCE_DIR}/dep/loadlib
)
add_subdirectory(vmapextract)
add_executable(${EXECUTABLE_NAME} ${EXECUTABLE_SRCS}
adtfile.cpp
dbcfile.cpp
gameobject_extract.cpp
model.cpp
vmapexport.cpp
wdtfile.cpp
wmo.cpp
)
target_link_libraries(${EXECUTABLE_NAME} StormLib loadlib bzip2 zlib)
#Output the compiled exes to build/bin/$(Configuration)/tools directory on windows by default
if(WIN32)
if ( MSVC )
set_target_properties(${EXECUTABLE_NAME} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin/Release/tools
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/bin/Debug/tools
)
elseif ( MINGW )
set_target_properties(${EXECUTABLE_NAME} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin/tools
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/bin/tools
)
endif()
endif()
install(TARGETS ${EXECUTABLE_NAME} DESTINATION "${BIN_DIR}/${TOOLS_DIR}")
if(WIN32 AND MSVC)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/\${BUILD_TYPE}/${EXECUTABLE_NAME}.pdb" DESTINATION "${BIN_DIR}/${TOOLS_DIR}" CONFIGURATIONS Debug)
endif()

View file

@ -12,5 +12,6 @@ cmake_minimum_required (VERSION 2.8)
project (MANGOS_IOMAP_EXTRACTOR)
LINK_DIRECTORIES( ${LINK_DIRECTORIES} ${CMAKE_SOURCE_DIR}/../../../dep/StormLib/src )
add_executable(vmapextractor adtfile.cpp dbcfile.cpp gameobject_extract.cpp model.cpp mpqfile.cpp vmapexport.cpp wdtfile.cpp wmo.cpp)
target_link_libraries(vmapextractor StormLib bzip2 zlib)