aboutsummaryrefslogtreecommitdiff
path: root/src/trinityrealm
diff options
context:
space:
mode:
authormegamage <none@none>2009-01-17 13:33:07 -0600
committermegamage <none@none>2009-01-17 13:33:07 -0600
commitc5dfe7dac27a0441192af758dc55e6c71c83ccb4 (patch)
treee9075c32f9cd1176090e1530f5aaae247d3bc867 /src/trinityrealm
parent88fd7455323b0e58ea2b808510d8c7e5aa1cd599 (diff)
parentadeb696f756739e2ed5b9c3ef4f7551ce023ff2b (diff)
*Merge.
--HG-- branch : trunk
Diffstat (limited to 'src/trinityrealm')
-rw-r--r--src/trinityrealm/CMakeLists.txt45
-rw-r--r--src/trinityrealm/Main.cpp8
2 files changed, 53 insertions, 0 deletions
diff --git a/src/trinityrealm/CMakeLists.txt b/src/trinityrealm/CMakeLists.txt
new file mode 100644
index 00000000000..cddea04ea47
--- /dev/null
+++ b/src/trinityrealm/CMakeLists.txt
@@ -0,0 +1,45 @@
+########### next target ###############
+
+SET(trinity-realm_SRCS
+AuthCodes.h
+AuthSocket.cpp
+AuthSocket.h
+Main.cpp
+RealmList.cpp
+RealmList.h
+)
+
+add_executable(trinity-realm ${trinity-realm_SRCS})
+add_definitions(
+-D_TRINITY_REALM_CONFIG='"${CONF_DIR}/trinityrealm.conf"'
+)
+IF (DO_MYSQL)
+ #SET_TARGET_PROPERTIES(mangos-realmd PROPERTIES LINK_FLAGS ${MYSQL_LIBS})
+ SET_TARGET_PROPERTIES(trinity-realm PROPERTIES LINK_FLAGS "-pthread")
+ENDIF(DO_MYSQL)
+IF (DO_POSTGRE)
+ SET_TARGET_PROPERTIES(trinity-realmd PROPERTIES LINK_FLAGS ${POSTGRE_LIBS})
+ENDIF(DO_POSTGRE)
+
+
+target_link_libraries(
+trinity-realm
+shared
+trinityframework
+trinitysockets
+trinitydatabase
+trinityauth
+trinityconfig
+ZThread
+zlib
+${SSLLIB}
+${MYSQL_LIBRARIES}
+)
+
+install(TARGETS trinity-realm DESTINATION bin)
+
+
+########### install files ###############
+
+install(FILES trinityrealm.conf.dist DESTINATION etc)
+
diff --git a/src/trinityrealm/Main.cpp b/src/trinityrealm/Main.cpp
index e74cd5144d3..3e2739ec6b5 100644
--- a/src/trinityrealm/Main.cpp
+++ b/src/trinityrealm/Main.cpp
@@ -31,6 +31,7 @@
#include "sockets/ListenSocket.h"
#include "AuthSocket.h"
#include "SystemConfig.h"
+#include "revision.h"
#include "Util.h"
// Format is YYYYMMDDRR where RR is the change in the conf file
@@ -70,6 +71,7 @@ DatabaseType LoginDatabase; ///< Accessor to the
void usage(const char *prog)
{
sLog.outString("Usage: \n %s [<options>]\n"
+ " --version print version and exist\n\r"
" -c config_file use config_file as configuration file\n\r"
#ifdef WIN32
" Running as service functions:\n\r"
@@ -100,6 +102,12 @@ extern int main(int argc, char **argv)
cfg_file = argv[c];
}
+ if( strcmp(argv[c],"--version") == 0)
+ {
+ printf("%s\n", _FULLVERSION);
+ return 0;
+ }
+
#ifdef WIN32
////////////
//Services//