diff --git a/CMakeLists.txt b/CMakeLists.txt index 467bbb10..ea92d995 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 # # 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,7 +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 -# project(MaNGOS) set(MANGOS_VERSION 0.21) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7ef7c1b8..2c767bb0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,10 +1,8 @@ # MaNGOS is a full featured server for World of Warcraft, supporting -# the following clients: 1.12.x, 2.4.3, 3.2.5a, 4.2.3 and 5.4.8 +# the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8 # # Copyright (C) 2005-2015 MaNGOS project # -# ***** BEGIN GPL LICENSE BLOCK ***** -# # 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 @@ -18,48 +16,32 @@ # 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 -# -# ***** END GPL LICENSE BLOCK ***** -# -# World of Warcraft, and all World of Warcraft or Warcraft art, images, -# and lore are copyrighted by Blizzard Entertainment, Inc. -# Needs to link against mangos_worldd.lib +# Needs to link against mangos_world.lib if(WIN32) - link_directories( - "${CMAKE_BINARY_DIR}/src/mangosd/${CMAKE_CFG_INTDIR}" - ) - include_directories( - "${CMAKE_SOURCE_DIR}/dep/include" - ) + link_directories("${CMAKE_BINARY_DIR}/src/mangosd/${CMAKE_CFG_INTDIR}") + include_directories(${CMAKE_SOURCE_DIR}/dep/include) endif() -#----------------------------------------------------------------------------- # Build the mangos framework library add_subdirectory(framework) -#----------------------------------------------------------------------------- # Build the mangos shared library add_subdirectory(shared) -#----------------------------------------------------------------------------- # Build the mangos game library add_subdirectory(game) -#----------------------------------------------------------------------------- # Build the mangos realm authentication server add_subdirectory(realmd) -#----------------------------------------------------------------------------- # Build the mangos world server add_subdirectory(mangosd) -#----------------------------------------------------------------------------- # Build the selected modules add_subdirectory(modules) -#----------------------------------------------------------------------------- # If we want the tools for map/vmap/mmap extraction if(BUILD_TOOLS) add_subdirectory(tools) -endif() +endif() \ No newline at end of file diff --git a/src/framework/CMakeLists.txt b/src/framework/CMakeLists.txt index 84c62310..b7222dac 100644 --- a/src/framework/CMakeLists.txt +++ b/src/framework/CMakeLists.txt @@ -1,4 +1,7 @@ -# 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 +# +# Copyright (C) 2005-2015 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 @@ -16,102 +19,40 @@ set(LIBRARY_NAME framework) -set(SRC_GRP_DYNAMIC - Dynamic/FactoryHolder.h - Dynamic/ObjectRegistry.h -) +file(GLOB SRC_GRP_DYNAMIC Dynamic/*.h) +source_group("Dynamic" FILES ${SRC_GRP_DYNAMIC}) -set(SRC_GRP_GAMESYSTEM - GameSystem/Grid.h - GameSystem/GridLoader.h - GameSystem/GridReference.h - GameSystem/GridRefManager.h - GameSystem/NGrid.h - GameSystem/TypeContainer.h - GameSystem/TypeContainerFunctions.h - GameSystem/TypeContainerVisitor.h -) +file(GLOB SRC_GRP_GAMESYSTEM GameSystem/*.h) +source_group("GameSystem" FILES ${SRC_GRP_GAMESYSTEM}) -set(SRC_GRP_PLATFORM - Platform/CompilerDefs.h - Platform/Define.h -) +file(GLOB SRC_GRP_PLATFORM Platform/*.h) +source_group("Platform" FILES ${SRC_GRP_PLATFORM}) -set(SRC_GRP_POLICIES - Policies/CreationPolicy.h - Policies/ObjectLifeTime.cpp - Policies/ObjectLifeTime.h - Policies/Singleton.h - Policies/ThreadingModel.h -) +file(GLOB SRC_GRP_POLICIES Policies/*.h Policies/*.cpp) +source_group("Policies" FILES ${SRC_GRP_POLICIES}) -set(SRC_GRP_UTIL - Utilities/ByteConverter.h - Utilities/Callback.h - Utilities/EventProcessor.cpp - Utilities/EventProcessor.h - Utilities/LinkedList.h - Utilities/TypeList.h - Utilities/UnorderedMapSet.h -) +file(GLOB SRC_GRP_UTILITIES Utilities/*.h Utilities/*.cpp) +source_group("Utilities" FILES ${SRC_GRP_UTILITIES}) -set(SRC_GRP_LINKED_REFERENCE - Utilities/LinkedReference/Reference.h - Utilities/LinkedReference/RefManager.h -) +file(GLOB SRC_GRP_LINKED_REFERENCE Utilities/LinkedReference/*.h) +source_group("Utilities\\LinkedReference" FILES ${SRC_GRP_LINKED_REFERENCE}) set(LIBRARY_SRCS ${SRC_GRP_DYNAMIC} ${SRC_GRP_GAMESYSTEM} ${SRC_GRP_PLATFORM} ${SRC_GRP_POLICIES} - ${SRC_GRP_UTIL} - ${SRC_GRP_LINKED_REFERENCE} -) - -source_group("Dynamic" - FILES - ${SRC_GRP_DYNAMIC} -) - -source_group("GameSystem" - FILES - ${SRC_GRP_GAMESYSTEM} -) - -source_group("Platform" - FILES - ${SRC_GRP_PLATFORM} -) - -source_group("Policies" - FILES - ${SRC_GRP_POLICIES} -) - -source_group("Utilities" - FILES - ${SRC_GRP_UTIL} -) - -source_group("Utilities\\LinkedReference" - FILES + ${SRC_GRP_UTILITIES} ${SRC_GRP_LINKED_REFERENCE} ) include_directories( - "${CMAKE_CURRENT_SOURCE_DIR}" - "${ACE_INCLUDE_DIR}" + ${CMAKE_CURRENT_SOURCE_DIR} + ${ACE_INCLUDE_DIR} ) -add_library(${LIBRARY_NAME} STATIC - ${LIBRARY_SRCS} -) +add_library(${LIBRARY_NAME} STATIC ${LIBRARY_SRCS}) if(NOT ACE_USE_EXTERNAL) - add_dependencies(${LIBRARY_NAME} ace) -endif() - -target_link_libraries(${LIBRARY_NAME} - ${TBB_LIBRARIES} -) + add_dependencies(${LIBRARY_NAME} ace) +endif() \ No newline at end of file diff --git a/src/game/CMakeLists.txt b/src/game/CMakeLists.txt index c558987a..7aa2ce1f 100644 --- a/src/game/CMakeLists.txt +++ b/src/game/CMakeLists.txt @@ -1,4 +1,7 @@ -# 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 +# +# Copyright (C) 2005-2015 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 @@ -19,148 +22,102 @@ set(LIBRARY_NAME game) add_definitions(-DDT_POLYREF64) include_directories( - "${CMAKE_CURRENT_SOURCE_DIR}" - "${CMAKE_CURRENT_SOURCE_DIR}/AuctionHouseBot" - "${CMAKE_CURRENT_SOURCE_DIR}/BattleGround" - "${CMAKE_CURRENT_SOURCE_DIR}/ChatCommands" - "${CMAKE_CURRENT_SOURCE_DIR}/Maps" - "${CMAKE_CURRENT_SOURCE_DIR}/MotionGenerators" - "${CMAKE_CURRENT_SOURCE_DIR}/Object" - "${CMAKE_CURRENT_SOURCE_DIR}/OutdoorPvP" - "${CMAKE_CURRENT_SOURCE_DIR}/References" - "${CMAKE_CURRENT_SOURCE_DIR}/Server" - "${CMAKE_CURRENT_SOURCE_DIR}/Tools" - "${CMAKE_CURRENT_SOURCE_DIR}/vmap" - "${CMAKE_CURRENT_SOURCE_DIR}/Warden" - "${CMAKE_CURRENT_SOURCE_DIR}/Warden/Modules" - "${CMAKE_CURRENT_SOURCE_DIR}/WorldHandlers" - "${CMAKE_SOURCE_DIR}/dep/g3dlite" - "${CMAKE_SOURCE_DIR}/dep/zlib" - "${CMAKE_SOURCE_DIR}/dep/recastnavigation/Detour/Include" - "${CMAKE_SOURCE_DIR}/dep/recastnavigation/Detour" - "${CMAKE_SOURCE_DIR}/dep/recastnavigation/" - "${CMAKE_SOURCE_DIR}/dep/include" - "${CMAKE_SOURCE_DIR}/src/shared" - "${CMAKE_SOURCE_DIR}/src/shared/Auth" - "${CMAKE_SOURCE_DIR}/src/shared/Config" - "${CMAKE_SOURCE_DIR}/src/shared/Common" - "${CMAKE_SOURCE_DIR}/src/shared/Database" - "${CMAKE_SOURCE_DIR}/src/shared/DataStores" - "${CMAKE_SOURCE_DIR}/src/shared/Utilities" - "${CMAKE_SOURCE_DIR}/src/shared/Log" - "${CMAKE_SOURCE_DIR}/src/shared/Threading" - "${CMAKE_SOURCE_DIR}/src/framework" - "${CMAKE_BINARY_DIR}/src/shared" - "${MYSQL_INCLUDE_DIR}" - "${OPENSSL_INCLUDE_DIR}" - "${ACE_INCLUDE_DIR}" + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/AuctionHouseBot + ${CMAKE_CURRENT_SOURCE_DIR}/BattleGround + ${CMAKE_CURRENT_SOURCE_DIR}/ChatCommands + ${CMAKE_CURRENT_SOURCE_DIR}/Maps + ${CMAKE_CURRENT_SOURCE_DIR}/MotionGenerators + ${CMAKE_CURRENT_SOURCE_DIR}/Object + ${CMAKE_CURRENT_SOURCE_DIR}/OutdoorPvP + ${CMAKE_CURRENT_SOURCE_DIR}/References + ${CMAKE_CURRENT_SOURCE_DIR}/Server + ${CMAKE_CURRENT_SOURCE_DIR}/Tools + ${CMAKE_CURRENT_SOURCE_DIR}/vmap + ${CMAKE_CURRENT_SOURCE_DIR}/Warden + ${CMAKE_CURRENT_SOURCE_DIR}/Warden/Modules + ${CMAKE_CURRENT_SOURCE_DIR}/WorldHandlers + ${CMAKE_SOURCE_DIR}/dep/g3dlite + ${CMAKE_SOURCE_DIR}/dep/zlib + ${CMAKE_SOURCE_DIR}/dep/recastnavigation/Detour/Include + ${CMAKE_SOURCE_DIR}/dep/recastnavigation/Detour + ${CMAKE_SOURCE_DIR}/dep/recastnavigation + ${CMAKE_SOURCE_DIR}/dep/include + ${CMAKE_SOURCE_DIR}/src/shared + ${CMAKE_SOURCE_DIR}/src/shared/Auth + ${CMAKE_SOURCE_DIR}/src/shared/Config + ${CMAKE_SOURCE_DIR}/src/shared/Common + ${CMAKE_SOURCE_DIR}/src/shared/Database + ${CMAKE_SOURCE_DIR}/src/shared/DataStores + ${CMAKE_SOURCE_DIR}/src/shared/Utilities + ${CMAKE_SOURCE_DIR}/src/shared/Log + ${CMAKE_SOURCE_DIR}/src/shared/Threading + ${CMAKE_SOURCE_DIR}/src/framework + ${CMAKE_BINARY_DIR}/src/shared + ${MYSQL_INCLUDE_DIR} + ${OPENSSL_INCLUDE_DIR} + ${ACE_INCLUDE_DIR} ) #AH Bot group file(GLOB SRC_GRP_AHBOT AuctionHouseBot/*.cpp AuctionHouseBot/*.h) -source_group("AhBot" - FILES - ${SRC_GRP_AHBOT} -) +source_group("AhBot" FILES ${SRC_GRP_AHBOT}) #Battlegrounds group file(GLOB SRC_GRP_BATTLEGROUND BattleGround/*.cpp BattleGround/*.h) -source_group("BattleGround" - FILES - ${SRC_GRP_BATTLEGROUND} -) - +source_group("BattleGround" FILES ${SRC_GRP_BATTLEGROUND}) #Chat Commands group file(GLOB SRC_GRP_CHAT_COMMANDS ChatCommands/*.cpp ChatCommands/*.h) -source_group("Chat Commands" - FILES - ${SRC_GRP_CHAT_COMMANDS} -) +source_group("Chat Commands" FILES ${SRC_GRP_CHAT_COMMANDS}) #Map Threading group file(GLOB SRC_GRP_MAP_THREAD Maps/*.cpp Maps/*.h) -source_group("Map Threading" - FILES - ${SRC_GRP_MAP_THREAD} -) +source_group("Map Threading" FILES ${SRC_GRP_MAP_THREAD}) #Motion Generator group file(GLOB SRC_GRP_MOTION_GEN MotionGenerators/*.cpp MotionGenerators/*.h) -source_group("Motion generators" - FILES - ${SRC_GRP_MOTION_GEN} -) +source_group("Motion generators" FILES ${SRC_GRP_MOTION_GEN}) #Movement group file(GLOB SRC_GRP_MOVEMENT movement/*.cpp movement/*.h) -source_group("Movement" - FILES - ${SRC_GRP_MOVEMENT} -) +source_group("Movement" FILES ${SRC_GRP_MOVEMENT}) #Object group file(GLOB SRC_GRP_OBJECT Object/*.cpp Object/*.h) -source_group("Object" - FILES - ${SRC_GRP_OBJECT} -) +source_group("Object" FILES ${SRC_GRP_OBJECT}) #Outdoors PvP group file(GLOB SRC_GRP_OUTDOOR_PVP OutdoorPvP/*.cpp OutdoorPvP/*.h) -source_group("Outdoor PvP" - FILES - ${SRC_GRP_OUTDOOR_PVP} -) +source_group("Outdoor PvP" FILES ${SRC_GRP_OUTDOOR_PVP}) #References group file(GLOB SRC_GRP_REFERENCES References/*.cpp References/*.h) -source_group("References" - FILES - ${SRC_GRP_REFERENCES} -) +source_group("References" FILES ${SRC_GRP_REFERENCES}) #Server group file(GLOB SRC_GRP_SERVER Server/*.cpp Server/*.h) -source_group("Server" - FILES - ${SRC_GRP_SERVER} -) +source_group("Server" FILES ${SRC_GRP_SERVER}) #Tools group file(GLOB SRC_GRP_TOOL Tools/*.cpp Tools/*.h) -source_group("Tool" - FILES - ${SRC_GRP_TOOL} -) +source_group("Tool" FILES ${SRC_GRP_TOOL}) #VMap group file(GLOB SRC_GRP_VMAPS vmap/*.cpp vmap/*.h) -source_group("vmaps" - FILES - ${SRC_GRP_VMAPS} -) +source_group("vmaps" FILES ${SRC_GRP_VMAPS}) #Warden group file(GLOB SRC_GRP_WARDEN Warden/*.cpp Warden/*.h) -source_group("Warden" - FILES - ${SRC_GRP_WARDEN} -) +source_group("Warden" FILES ${SRC_GRP_WARDEN}) #Warden Modules group file(GLOB SRC_GRP_WARDEN_MODULES Warden/Modules/*.cpp Warden/Modules/*.h) -source_group("Warden\\Modules" - FILES - ${SRC_GRP_WARDEN_MODULES} -) +source_group("Warden\\Modules" FILES ${SRC_GRP_WARDEN_MODULES}) #World and Handlers group file(GLOB SRC_GRP_WORLD_HANDLERS WorldHandlers/*.cpp WorldHandlers/*.h) -source_group("World/Handlers" - FILES - ${SRC_GRP_WORLD_HANDLERS} -) +source_group("World/Handlers" FILES ${SRC_GRP_WORLD_HANDLERS}) set(LIBRARY_SRCS ${SRC_GRP_AHBOT} @@ -183,25 +140,18 @@ set(LIBRARY_SRCS ) if(PCH) - include_directories("${CMAKE_CURRENT_BINARY_DIR}") + include_directories(${CMAKE_CURRENT_BINARY_DIR}) endif() -add_library(${LIBRARY_NAME} STATIC - ${LIBRARY_SRCS} -) +add_library(${LIBRARY_NAME} STATIC ${LIBRARY_SRCS}) -target_link_libraries(${LIBRARY_NAME} - shared - detour -) +target_link_libraries(${LIBRARY_NAME} shared detour) 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(${LIBRARY_NAME} - dl - ) - endif() + # 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(${LIBRARY_NAME} dl) + endif() endif() if(NOT ACE_USE_EXTERNAL) @@ -217,39 +167,27 @@ add_subdirectory(AuctionHouseBot) if(PLAYERBOTS) include_directories( - "${CMAKE_SOURCE_DIR}/src/modules/Bots/playerbot" - "${CMAKE_SOURCE_DIR}/src/modules/Bots/ahbot" - ) - target_link_libraries(${LIBRARY_NAME} - Bots + ${CMAKE_SOURCE_DIR}/src/modules/Bots/playerbot + ${CMAKE_SOURCE_DIR}/src/modules/Bots/ahbot ) + target_link_libraries(${LIBRARY_NAME} Bots) add_dependencies(${LIBRARY_NAME} Bots) endif() if(SCRIPT_LIB_SD2) - include_directories( - "${CMAKE_SOURCE_DIR}/src/modules/SD2" - ) - target_link_libraries(${LIBRARY_NAME} - mangosscript - ) + include_directories(${CMAKE_SOURCE_DIR}/src/modules/SD2) + target_link_libraries(${LIBRARY_NAME} mangosscript) add_dependencies(${LIBRARY_NAME} mangosscript) endif() -#Eluna specific start - if(SCRIPT_LIB_ELUNA) - include_directories( - "${CMAKE_SOURCE_DIR}/dep/lualib" - "${CMAKE_SOURCE_DIR}/src/modules/Eluna" - ) + include_directories( + ${CMAKE_SOURCE_DIR}/dep/lualib + ${CMAKE_SOURCE_DIR}/src/modules/Eluna + ) list(APPEND LIBRARY_SRCS ${SRC_GRP_LUAENGINE}) - target_link_libraries(${LIBRARY_NAME} LuaEngine) target_link_libraries(${LIBRARY_NAME} lualib) - add_dependencies(${LIBRARY_NAME} LuaEngine) add_dependencies(${LIBRARY_NAME} lualib) -endif() - -#Eluna specific end +endif() \ No newline at end of file diff --git a/src/mangosd/CMakeLists.txt b/src/mangosd/CMakeLists.txt index bd2b5262..0316d845 100644 --- a/src/mangosd/CMakeLists.txt +++ b/src/mangosd/CMakeLists.txt @@ -1,4 +1,7 @@ -# 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 +# +# Copyright (C) 2005-2015 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 @@ -16,26 +19,26 @@ set(EXECUTABLE_NAME mangosd) -#Command Line -file(GLOB_RECURSE SRC_GRP_COMM Comm/*.cpp Comm/*.h) +#Main Files +file(GLOB SRC_GRP_MAIN *.cpp *.h) +source_group("Main" FILES ${SRC_GRP_MAIN}) + +#Command Line Files +file(GLOB SRC_GRP_COMM Comm/*.cpp Comm/*.h) source_group("Command Line" FILES ${SRC_GRP_COMM}) -#Remote Access -file(GLOB_RECURSE SRC_GRP_RA RA/*.cpp RA/*.h) +#Remote Access Files +file(GLOB SRC_GRP_RA RA/*.cpp RA/*.h) source_group("Remote Access" FILES ${SRC_GRP_RA}) set(EXECUTABLE_SRCS ${SRC_GRP_COMM} ${SRC_GRP_RA} - Main.cpp - Master.cpp - Master.h - WorldRunnable.cpp - WorldRunnable.h + ${SRC_GRP_MAIN} ) if(SOAP) - file(GLOB_RECURSE SRC_GRP_SOAP SOAP/*.cpp SOAP/*.h) + file(GLOB SRC_GRP_SOAP SOAP/*.cpp SOAP/*.h) source_group("SOAP" FILES ${SRC_GRP_SOAP}) LIST(APPEND EXECUTABLE_SRCS ${SRC_GRP_SOAP}) endif() @@ -73,8 +76,8 @@ include_directories( if(PLAYERBOTS) include_directories( - "${CMAKE_SOURCE_DIR}/src/modules/Bots/playerbot" - "${CMAKE_SOURCE_DIR}/src/modules/Bots/ahbot" + ${CMAKE_SOURCE_DIR}/src/modules/Bots/playerbot + ${CMAKE_SOURCE_DIR}/src/modules/Bots/ahbot ) endif() diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt index 0c085d3e..b91ef2c7 100644 --- a/src/modules/CMakeLists.txt +++ b/src/modules/CMakeLists.txt @@ -1,17 +1,33 @@ -#----------------------------------------------------------------------------- -# Build the mangos script library if wished for +# 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 +# +# Copyright (C) 2005-2015 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 + +# Build the mangos script library if enabled if(SCRIPT_LIB_SD2) add_subdirectory(SD2) endif() -#----------------------------------------------------------------------------- -# Build the Eluna library if wished for +# Build the Eluna library if enabled if(SCRIPT_LIB_ELUNA) add_subdirectory(Eluna) endif() -#----------------------------------------------------------------------------- -# Include Player Bots if wished for +# Include Player Bots if enabled if(PLAYERBOTS) add_subdirectory(Bots) endif() \ No newline at end of file diff --git a/src/modules/SD2/CMakeLists.txt b/src/modules/SD2/CMakeLists.txt index d7aef327..3e0b7e05 100644 --- a/src/modules/SD2/CMakeLists.txt +++ b/src/modules/SD2/CMakeLists.txt @@ -1,5 +1,8 @@ +# 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 # -# Copyright (C) 2005-2015 MaNGOS +# Copyright (C) 2005-2015 MaNGOS project +# Copyright (C) 2006-2013 ScriptDev2 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 @@ -14,11 +17,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 -# -# ***** END GPL LICENSE BLOCK ***** -# -# World of Warcraft, and all World of Warcraft or Warcraft art, images, -# and lore are copyrighted by Blizzard Entertainment, Inc. include(MacroMangosSourceGroup) @@ -210,9 +208,7 @@ file(GLOB sources_raid_k_taq scripts/kalimdor/temple_of_ahnqiraj/*.cpp scripts/k LIST(APPEND mangosscript_LIB_SRCS ${sources_raid_k_taq}) source_group("Kalimdor Scripts\\Raids\\Temple of AQ" FILES ${sources_raid_k_taq}) -add_library(mangosscript STATIC - ${mangosscript_LIB_SRCS} -) +add_library(mangosscript STATIC ${mangosscript_LIB_SRCS}) # Generate PCH if(PCH) @@ -247,4 +243,4 @@ if(UNIX) LINK_FLAGS ${mangosscript_LINK_FLAGS} ${mangosscript_PROPERTIES} ) -endif() +endif() \ No newline at end of file diff --git a/src/shared/CMakeLists.txt b/src/shared/CMakeLists.txt index 908dcdfa..18a57d7f 100644 --- a/src/shared/CMakeLists.txt +++ b/src/shared/CMakeLists.txt @@ -1,6 +1,7 @@ -# 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 # -# ***** BEGIN GPL LICENSE BLOCK ***** +# Copyright (C) 2005-2015 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 @@ -15,39 +16,34 @@ # 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 -# -# ***** END GPL LICENSE BLOCK ***** -# -# World of Warcraft, and all World of Warcraft or Warcraft art, images, -# and lore are copyrighted by Blizzard Entertainment, Inc. set(LIBRARY_NAME shared) -file(GLOB_RECURSE SRC_GRP_AUTH Auth/*.cpp Auth/*.h) +file(GLOB SRC_GRP_AUTH Auth/*.cpp Auth/*.h) source_group("Auth" FILES ${SRC_GRP_AUTH}) -file(GLOB_RECURSE SRC_GRP_COMMON Common/*.cpp Common/*.h) +file(GLOB SRC_GRP_COMMON Common/*.cpp Common/*.h) source_group("Common" FILES ${SRC_GRP_COMMON}) -file(GLOB_RECURSE SRC_GRP_CONFIG Config/*.cpp Config/*.h) +file(GLOB SRC_GRP_CONFIG Config/*.cpp Config/*.h) source_group("Config" FILES ${SRC_GRP_CONFIG}) -file(GLOB_RECURSE SRC_GRP_DATABASE Database/*.cpp Database/*.h) +file(GLOB SRC_GRP_DATABASE Database/*.cpp Database/*.h) source_group("Database" FILES ${SRC_GRP_DATABASE}) -file(GLOB_RECURSE SRC_GRP_DATASTORE DataStores/*.cpp DataStores/*.h) +file(GLOB SRC_GRP_DATASTORE DataStores/*.cpp DataStores/*.h) source_group("DataStores" FILES ${SRC_GRP_DATASTORE}) -file(GLOB_RECURSE SRC_GRP_LOCKQ LockedQueue/*.cpp LockedQueue/*.h) +file(GLOB SRC_GRP_LOCKQ LockedQueue/*.cpp LockedQueue/*.h) source_group("LockedQueue" FILES ${SRC_GRP_LOCKQ}) -file(GLOB_RECURSE SRC_GRP_LOG Log/*.cpp Log/*.h) +file(GLOB SRC_GRP_LOG Log/*.cpp Log/*.h) source_group("Log" FILES ${SRC_GRP_LOG}) -file(GLOB_RECURSE SRC_GRP_THREAD Threading/*.cpp Threading/*.h) +file(GLOB SRC_GRP_THREAD Threading/*.cpp Threading/*.h) source_group("Threading" FILES ${SRC_GRP_THREAD}) -file(GLOB_RECURSE SRC_GRP_UTIL Utilities/*.cpp Utilities/*.h) +file(GLOB SRC_GRP_UTIL Utilities/*.cpp Utilities/*.h) source_group("Utilities" FILES ${SRC_GRP_UTIL}) set(LIBRARY_SRCS @@ -65,10 +61,10 @@ set(LIBRARY_SRCS # OS specific files if(WIN32) - file(GLOB_RECURSE SRC_GRP_WIN Win/*.cpp Win/*.h) + file(GLOB SRC_GRP_WIN Win/*.cpp Win/*.h) LIST(APPEND LIBRARY_SRCS ${SRC_GRP_WIN}) else() - file(GLOB_RECURSE SRC_GRP_LINUX Linux/*.cpp Linux/*.h) + file(GLOB SRC_GRP_LINUX Linux/*.cpp Linux/*.h) LIST(APPEND LIBRARY_SRCS ${SRC_GRP_LINUX}) endif() @@ -89,9 +85,7 @@ endif() configure_file("${CMAKE_CURRENT_SOURCE_DIR}/SystemConfig.h.in" "${CMAKE_CURRENT_BINARY_DIR}/SystemConfig.h") -add_library(${LIBRARY_NAME} STATIC - ${LIBRARY_SRCS} -) +add_library(${LIBRARY_NAME} STATIC ${LIBRARY_SRCS}) if(POSTGRESQL) target_link_libraries(${LIBRARY_NAME} ${PostgreSQL_LIBRARIES}) diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt index c2af286f..181abb9f 100644 --- a/src/tools/CMakeLists.txt +++ b/src/tools/CMakeLists.txt @@ -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 # # 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/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) diff --git a/src/tools/Movemap-Generator/CMakeLists.txt b/src/tools/Movemap-Generator/CMakeLists.txt index e879f30e..50ab3573 100644 --- a/src/tools/Movemap-Generator/CMakeLists.txt +++ b/src/tools/Movemap-Generator/CMakeLists.txt @@ -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 # # 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,17 +38,17 @@ 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/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" + ${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 @@ -63,30 +62,30 @@ set(SOURCES add_executable(${EXECUTABLE_NAME} ${SOURCES} ${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) + 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() + 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}") diff --git a/src/tools/map-extractor/CMakeLists.txt b/src/tools/map-extractor/CMakeLists.txt index 426e6fa3..d2af7dc9 100644 --- a/src/tools/map-extractor/CMakeLists.txt +++ b/src/tools/map-extractor/CMakeLists.txt @@ -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 # # 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,22 +16,19 @@ # 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_MAP_EXTRACTOR) set(EXECUTABLE_NAME "map-extractor") if(WIN32) - # add resource file to windows build - set(EXECUTABLE_SRCS ${EXECUTABLE_SRCS} map-extractor.rc) + # add resource file to windows build + set(EXECUTABLE_SRCS ${EXECUTABLE_SRCS} map-extractor.rc) endif() include_directories( - "${CMAKE_SOURCE_DIR}/dep/libmpq" - "${CMAKE_SOURCE_DIR}/dep/loadlib" + ${CMAKE_SOURCE_DIR}/dep/libmpq + ${CMAKE_SOURCE_DIR}/dep/loadlib ) add_executable(${EXECUTABLE_NAME} dbcfile.cpp System.cpp ${EXECUTABLE_SRCS}) @@ -38,49 +37,49 @@ target_link_libraries(${EXECUTABLE_NAME} libmpq 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() + 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() #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}" + 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}" ) 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() + 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() \ No newline at end of file diff --git a/src/tools/vmap-assembler/CMakeLists.txt b/src/tools/vmap-assembler/CMakeLists.txt index aa52e904..96e65f54 100644 --- a/src/tools/vmap-assembler/CMakeLists.txt +++ b/src/tools/vmap-assembler/CMakeLists.txt @@ -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 # # 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,26 +16,22 @@ # 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) 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/g3dlite/" - "${CMAKE_SOURCE_DIR}/dep/g3dlite/G3D" - "${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) @@ -50,7 +48,7 @@ else() endif() if(UNIX) - target_link_libraries(${EXECUTABLE_NAME} rt dl) + target_link_libraries(${EXECUTABLE_NAME} rt dl) endif() target_link_libraries(${EXECUTABLE_NAME} vmap g3dlite zlib) diff --git a/src/tools/vmap-extractor/CMakeLists.txt b/src/tools/vmap-extractor/CMakeLists.txt index a1eaba1d..63f1564e 100644 --- a/src/tools/vmap-extractor/CMakeLists.txt +++ b/src/tools/vmap-extractor/CMakeLists.txt @@ -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 # # 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,20 +16,17 @@ # 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) set(EXECUTABLE_NAME "vmap-extractor") if(WIN32) - # add resource file to windows build - set(EXECUTABLE_SRCS ${EXECUTABLE_SRCS} vmap-extractor.rc) + # add resource file to windows build + set(EXECUTABLE_SRCS ${EXECUTABLE_SRCS} vmap-extractor.rc) endif() include_directories( - "${CMAKE_SOURCE_DIR}/dep/libmpq" - "${CMAKE_SOURCE_DIR}/dep/loadlib" + ${CMAKE_SOURCE_DIR}/dep/libmpq + ${CMAKE_SOURCE_DIR}/dep/loadlib ) add_executable(${EXECUTABLE_NAME} ${EXECUTABLE_SRCS} @@ -44,20 +43,20 @@ target_link_libraries(${EXECUTABLE_NAME} libmpq 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() + 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()