aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt11
-rw-r--r--src/trinitycore/CMakeLists.txt8
2 files changed, 10 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7dbbe41f192..70af40a4d18 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,7 +19,6 @@ 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
@@ -127,10 +126,12 @@ else(SHORT_SLEEP)
message("* System sleep time is 100ms")
endif(SHORT_SLEEP)
-if(CENTOS)
-add_definitions(-DCENTOS)
-message("* Building with termcap")
-endif(CENTOS)
+IF(EXISTS /etc/centos-release)
+ SET(CENTOS 1)
+ message("* Building with termcap")
+else(EXISTS /etc/centos-release)
+ SET(CENTOS 0)
+ENDIF(EXISTS /etc/centos-release)
FIND_ACE(ACE)
if(ACE_FOUND)
diff --git a/src/trinitycore/CMakeLists.txt b/src/trinitycore/CMakeLists.txt
index 1a2a27ddf5a..7eb13185d91 100644
--- a/src/trinitycore/CMakeLists.txt
+++ b/src/trinitycore/CMakeLists.txt
@@ -56,10 +56,10 @@ ${OSX_LIBS}
)
IF (CENTOS)
-target_link_libraries(
-trinity-core
-termcap
-)
+ target_link_libraries(
+ trinity-core
+ termcap
+ )
ENDIF (CENTOS)
install(TARGETS trinity-core DESTINATION bin)