Skip to content

Commit

Permalink
Buildsystem/CMake: Include core/script headerfiles in generated MSVC-…
Browse files Browse the repository at this point in the history
…projects.

- Still "work in progress", as in missing filters and MSVC folder layouts.
- external libraries not fully "headerified" (not really required)

--HG--
branch : trunk
  • Loading branch information
click committed Jul 29, 2010
1 parent c44b601 commit f213f2c
Show file tree
Hide file tree
Showing 13 changed files with 190 additions and 327 deletions.
18 changes: 5 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

project(Trinity)
project(TrinityCore)

# CMake policies
cmake_minimum_required(VERSION 2.6)
Expand Down Expand Up @@ -80,8 +80,7 @@ add_custom_target(uninstall
)
endif()

option(AUTHSERVER "Build authserver" 1)
option(WORLDSERVER "Build worldserver" 1)
option(SERVERS "Build servers" 1)
option(CLI "With CLI" 1)
option(DEBUG "Debug mode" 0)
option(PCH "Use precompiled headers" 1)
Expand Down Expand Up @@ -159,16 +158,10 @@ message("* Install libraries to : ${LIBSDIR}")
message("* Install configs to : ${CONF_DIR}")
message("")

if( AUTHSERVER )
message("* Build authserver : Yes (default)")
if( SERVERS )
message("* Build server : Yes (default)")
else()
message("* Build authserver : No")
endif()

if( WORLDSERVER )
message("* Build worldserver : Yes (default)")
else()
message("* Build worldserver : No")
message("* Build server : No")
endif()

if( SCRIPTS )
Expand Down Expand Up @@ -260,4 +253,3 @@ add_subdirectory(src)
if( SQL )
add_subdirectory(sql)
endif()

2 changes: 1 addition & 1 deletion externals/ace/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -334,4 +334,4 @@ add_library(ace SHARED ${ace_STAT_SRCS})

if(PCH)
add_native_precompiled_header(ace ${CMAKE_SOURCE_DIR}/externals/ace/PrecompiledHeaders/WinAcePCH)
endif()
endif()
5 changes: 3 additions & 2 deletions externals/gsoap/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
file(GLOB sources *.cpp)
file(GLOB sources *.cpp *.h)

set(gsoap_STAT_SRCS
${sources}
)
Expand All @@ -7,4 +8,4 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
)

add_library(gsoap STATIC ${gsoap_STAT_SRCS})
add_library(gsoap STATIC ${gsoap_STAT_SRCS})
1 change: 0 additions & 1 deletion externals/zlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


SET(zlib_STAT_SRCS
adler32.c
compress.c
Expand Down
17 changes: 5 additions & 12 deletions src/server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,16 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

if(WORLDSERVER)
if( SERVERS )
add_subdirectory(shared)
add_subdirectory(game)
add_subdirectory(collision)
if(SCRIPTS)
add_subdirectory(authserver)
if( SCRIPTS )
add_subdirectory(scripts)
endif()
add_subdirectory(worldserver)
else()
if(TOOLS)
add_subdirectory(collision)
endif()
endif()

if (AUTHSERVER)
if(NOT WORLDSERVER)
add_subdirectory(shared)
endif()
add_subdirectory(authserver)
if( TOOLS )
add_subdirectory(collision)
endif()
24 changes: 14 additions & 10 deletions src/server/authserver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,24 @@

########### authserver ###############

file(GLOB_RECURSE sources_authentication Authentication/*.cpp Authentication/*.h)
file(GLOB_RECURSE sources_realms Realms/*.cpp Realms/*.h)
file(GLOB_RECURSE sources_server Server/*.cpp Server/*.h)

set(authserver_SRCS
Authentication/AuthCodes.cpp
Realms/RealmList.cpp
Server/AuthSocket.cpp
Server/RealmSocket.cpp
${sources_authentication}
${sources_realms}
${sources_server}
Main.cpp
)

if( WIN32 )
set(authserver_SRCS
${authserver_SRCS}
authserver.rc
)
endif()

include_directories(
${ACE_INCLUDE_DIR}
${MYSQL_INCLUDE_DIR}
Expand Down Expand Up @@ -62,9 +72,6 @@ if( WIN32 )
target_link_libraries(
authserver
shared
trinitydatabase
trinityauth
trinityconfig
${MYSQL_LIBRARY}
${OPENSSL_LIBRARIES}
${OPENSSL_EXTRA_LIBRARIES}
Expand All @@ -73,9 +80,6 @@ else()
target_link_libraries(
authserver
shared
trinitydatabase
trinityauth
trinityconfig
${MYSQL_LIBRARY}
${OPENSSL_LIBRARIES}
${OSX_LIBS}
Expand Down
10 changes: 2 additions & 8 deletions src/server/collision/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,10 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

########### collision ###############
file(GLOB_RECURSE sources *.cpp *.h)

set(collision_STAT_SRCS
BoundingIntervalHierarchy.cpp
Maps/MapTree.cpp
Maps/TileAssembler.cpp
Models/ModelInstance.cpp
Models/WorldModel.cpp
Management/VMapFactory.cpp
Management/VMapManager2.cpp
${sources}
)

include_directories(
Expand Down
Loading

0 comments on commit f213f2c

Please sign in to comment.