diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 5fc7b0d116..2bcb6a09a4 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1631,6 +1631,13 @@ configure_file(
list(APPEND viewer_HEADER_FILES ${CMAKE_CURRENT_BINARY_DIR}/exoflickrkeys.h)
#
+# Discord rich presence
+ if (USE_DISCORD)
+ LIST(APPEND viewer_HEADER_FILES fsfloaterdiscord.h fsdiscordconnect.h)
+ LIST(APPEND viewer_SOURCE_FILES fsfloaterdiscord.cpp fsdiscordconnect.cpp)
+ endif (USE_DISCORD)
+#
+
# Generate the version information header file.
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/fsversionvalues.h.in
@@ -1687,13 +1694,6 @@ if (DARWIN)
)
# [FS]
-# Discord rich presence
- if( USE_DISCORD )
- LIST(APPEND viewer_HEADER_FILES fsfloaterdiscord.h fsdiscordconnect.h)
- LIST(APPEND viewer_SOURCE_FILES fsfloaterdiscord.cpp fsdiscordconnect.cpp)
- endif()
-#
-
find_library(AGL_LIBRARY AGL)
find_library(APPKIT_LIBRARY AppKit)
find_library(COCOA_LIBRARY Cocoa)
@@ -1753,13 +1753,6 @@ if (LINUX)
LIST(APPEND viewer_SOURCE_FILES desktopnotifierlinux.cpp growlmanager.cpp)
# [FS] Growl support
-# Discord rich presence
- if( USE_DISCORD )
- LIST(APPEND viewer_HEADER_FILES fsfloaterdiscord.h fsdiscordconnect.h)
- LIST(APPEND viewer_SOURCE_FILES fsfloaterdiscord.cpp fsdiscordconnect.cpp)
- endif()
-#
-
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed")
set(viewer_LIBRARIES
@@ -1803,13 +1796,6 @@ if (WINDOWS)
# [FS]
)
-# Discord rich presence
- if( USE_DISCORD )
- LIST(APPEND viewer_HEADER_FILES fsfloaterdiscord.h fsdiscordconnect.h)
- LIST(APPEND viewer_SOURCE_FILES fsfloaterdiscord.cpp fsdiscordconnect.cpp)
- endif()
-#
-
# precompiled header configuration
# llviewerprecompiledheaders.cpp generates
# the .pch file.