From 76049024f4ee5515e6da63a07c6c91abd2017867 Mon Sep 17 00:00:00 2001 From: panaut0lordv Date: Fri, 19 Jun 2009 22:46:11 +0200 Subject: [PATCH] CentOS users - please use -DCENTOS=1, as termcap for everyone causes linking errors sometimes. Source - http://www.trinitycore.org/forum/project.php?issueid=3800 We shouldn't install 9999 packets just because on distro need them. So here we are. --HG-- branch : trunk --- CMakeLists.txt | 6 ++++++ src/trinitycore/CMakeLists.txt | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3fa43cc7b2..7dbbe41f19 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,7 @@ OPTION(DO_DEBUG "Debug mode" 0) OPTION(DO_WARN "Enable all compile warnings" 0) OPTION(LARGE_CELL "Large cell size" 0) OPTION(SHORT_SLEEP "Short sleep" 0) +OPTION(CENTOS "Compile with termcap" 0) SET(GENREV_SRC src/tools/genrevision/genrevision.cpp @@ -126,6 +127,11 @@ else(SHORT_SLEEP) message("* System sleep time is 100ms") endif(SHORT_SLEEP) +if(CENTOS) +add_definitions(-DCENTOS) +message("* Building with termcap") +endif(CENTOS) + FIND_ACE(ACE) if(ACE_FOUND) message(STATUS "Found ACE library: ${ACE_LIBRARY}") diff --git a/src/trinitycore/CMakeLists.txt b/src/trinitycore/CMakeLists.txt index 81dfb849ce..dd286adc75 100644 --- a/src/trinitycore/CMakeLists.txt +++ b/src/trinitycore/CMakeLists.txt @@ -43,7 +43,6 @@ trinityauth trinityconfig vmaps ZThread -termcap g3dlite readline gomp @@ -56,6 +55,12 @@ ${ZLIB} ${OSX_LIBS} ) +IF (CENTOS) +target_link_libraries( +termcap +) +ENDIF (CENTOS) + install(TARGETS trinity-core DESTINATION bin)