aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTartalo <none@none>2010-06-09 14:15:57 +0200
committerTartalo <none@none>2010-06-09 14:15:57 +0200
commit5effc26ad3f6f46d34ca54c27ce96709e4e92462 (patch)
tree0c4b21c7a94a99c37e54b3e55582ae678313f35b
parentf24290b47e873975cf3d9b4cfb95a7603739cb4f (diff)
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
-rw-r--r--CMakeLists.txt26
-rw-r--r--src/server/CMakeLists.txt22
2 files changed, 34 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fab32d81ab6..bdb6a9c512b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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)
diff --git a/src/server/CMakeLists.txt b/src/server/CMakeLists.txt
index 1a6321c23e3..7c2e309da74 100644
--- a/src/server/CMakeLists.txt
+++ b/src/server/CMakeLists.txt
@@ -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)