server/src/game/CMakeLists.txt
cipherCOM a81cf28610 [11167] Added CMake support
(based on cipherCOM's commit 0039476)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2011-02-14 12:56:50 +03:00

108 lines
2.9 KiB
CMake

#
# Copyright (C) 2005-2011 MaNGOS project <http://getmangos.com/>
#
# 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()