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:
+19
-7
@@ -30,6 +30,8 @@ add_custom_target(uninstall
|
||||
)
|
||||
|
||||
option(CENTOS "CENTOS" 0)
|
||||
option(DO_AUTHSERVER "Build authserver" 1)
|
||||
option(DO_WORLDSERVER "Build worldserver" 1)
|
||||
option(DO_CLI "With CLI" 1)
|
||||
option(DO_DEBUG "Debug mode" 0)
|
||||
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_SCRIPTS "With trinityscripts" 1)
|
||||
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)
|
||||
|
||||
set(GENREV_SRC
|
||||
@@ -93,6 +95,22 @@ message("* Libs install dir at: ${LIBSDIR}")
|
||||
find_library(SSLLIB NAMES ssl DOC "SSL 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)
|
||||
message("* With MySQL")
|
||||
FIND_MYSQL()
|
||||
@@ -145,12 +163,6 @@ else (DO_PCH)
|
||||
message("* NOT using precompiled headers")
|
||||
endif(DO_PCH)
|
||||
|
||||
if(DO_TOOLS)
|
||||
message("* With Tools")
|
||||
else (DO_TOOLS)
|
||||
message("* Without Tools")
|
||||
endif(DO_TOOLS)
|
||||
|
||||
if(UNIX)
|
||||
if(CENTOS)
|
||||
add_definitions(-DCENTOS)
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
add_subdirectory(shared)
|
||||
add_subdirectory(game)
|
||||
add_subdirectory(collision)
|
||||
if (DO_SCRIPTS)
|
||||
add_subdirectory(scripts)
|
||||
endif (DO_SCRIPTS)
|
||||
add_subdirectory(authserver)
|
||||
add_subdirectory(worldserver)
|
||||
if (DO_AUTHSERVER)
|
||||
add_subdirectory(authserver)
|
||||
endif(DO_AUTHSERVER)
|
||||
if(DO_WORLDSERVER)
|
||||
add_subdirectory(game)
|
||||
add_subdirectory(collision)
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user