Implement DO_WORLDSERVER and DO_AUTHSERVER options for cmake, both enabled by default

Needs more work to split shared/ and so on but it works

--HG--
branch : trunk
This commit is contained in:
Tartalo
2010-06-09 14:15:57 +02:00
parent f24290b47e
commit 5effc26ad3
2 changed files with 34 additions and 14 deletions
+19 -7
View File
@@ -30,6 +30,8 @@ add_custom_target(uninstall
) )
option(CENTOS "CENTOS" 0) option(CENTOS "CENTOS" 0)
option(DO_AUTHSERVER "Build authserver" 1)
option(DO_WORLDSERVER "Build worldserver" 1)
option(DO_CLI "With CLI" 1) option(DO_CLI "With CLI" 1)
option(DO_DEBUG "Debug mode" 0) option(DO_DEBUG "Debug mode" 0)
option(DO_MYSQL "With MySQL support" 1) option(DO_MYSQL "With MySQL support" 1)
@@ -37,7 +39,7 @@ option(DO_PCH "Use precompiled headers" 1)
option(DO_RA "With RA" 0) option(DO_RA "With RA" 0)
option(DO_SCRIPTS "With trinityscripts" 1) option(DO_SCRIPTS "With trinityscripts" 1)
option(DO_SQL "Copy SQL files" 0) option(DO_SQL "Copy SQL files" 0)
option(DO_TOOLS "Compile tools" 0) option(DO_TOOLS "Build tools" 0)
option(DO_WARN "Enable all compile warnings" 0) option(DO_WARN "Enable all compile warnings" 0)
set(GENREV_SRC set(GENREV_SRC
@@ -93,6 +95,22 @@ message("* Libs install dir at: ${LIBSDIR}")
find_library(SSLLIB NAMES ssl DOC "SSL library") find_library(SSLLIB NAMES ssl DOC "SSL library")
find_library(ZLIB z "Zlib library") find_library(ZLIB z "Zlib library")
if(DO_AUTHSERVER)
message("Build authserver")
else(DO_ATUHSERVER)
message("DON'T build authserver")
endif(DO_AUTHSERVER)
if(DO_WORLDSERVER)
message("Build worldserver")
else(DO_WORLDSERVER)
message("DON'T build worldserver")
endif(DO_WORLDSERVER)
if(DO_TOOLS)
message("Build tools")
else(DO_TOOLS)
message("DON'T build tools")
endif(DO_TOOLS)
if(DO_MYSQL) if(DO_MYSQL)
message("* With MySQL") message("* With MySQL")
FIND_MYSQL() FIND_MYSQL()
@@ -145,12 +163,6 @@ else (DO_PCH)
message("* NOT using precompiled headers") message("* NOT using precompiled headers")
endif(DO_PCH) endif(DO_PCH)
if(DO_TOOLS)
message("* With Tools")
else (DO_TOOLS)
message("* Without Tools")
endif(DO_TOOLS)
if(UNIX) if(UNIX)
if(CENTOS) if(CENTOS)
add_definitions(-DCENTOS) add_definitions(-DCENTOS)
+15 -7
View File
@@ -1,8 +1,16 @@
add_subdirectory(shared) add_subdirectory(shared)
add_subdirectory(game) if (DO_AUTHSERVER)
add_subdirectory(collision) add_subdirectory(authserver)
if (DO_SCRIPTS) endif(DO_AUTHSERVER)
add_subdirectory(scripts) if(DO_WORLDSERVER)
endif (DO_SCRIPTS) add_subdirectory(game)
add_subdirectory(authserver) add_subdirectory(collision)
add_subdirectory(worldserver) if(DO_SCRIPTS)
add_subdirectory(scripts)
endif(DO_SCRIPTS)
add_subdirectory(worldserver)
else(DO_WORLDSERVER)
if(DO_TOOLS)
add_subdirectory(collision)
endif(DO_TOOLS)
endif(DO_WORLDSERVER)