From d1f4f89c64280d96ebc3cf1a113fd7b4787c1437 Mon Sep 17 00:00:00 2001
From: Kyle Ambroff <ambroff@lindenlab.com>
Date: Fri, 6 Feb 2009 08:40:02 +0000
Subject: [PATCH] DEV-26150 (VWR-11474): CMake 2.6.2 adds multiple `-lndofdev'
 when linking secondlife-bin on Linux.

CMake will insert multiple -lndofdev parameters into the Makefile that
links secondlife-bin IFF ${NDOF_LIBRARY} is listed *after* Xinerama in
the target_link_libraries() call in indra/newview/CMakeLists.txt file.
Moving the reference to NDOF_LIBRARY above viewer_LIBRARIES seems to fix
it, and doesn't break Windows or MacOS.

Not reviewed.
---
 indra/newview/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 9ec838ad46b..8de3ec0fc73 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1418,6 +1418,7 @@ target_link_libraries(${VIEWER_BINARY_NAME}
     ${LSCRIPT_LIBRARIES}
     ${LLMATH_LIBRARIES}
     ${LLCOMMON_LIBRARIES}
+    ${NDOF_LIBRARY}
     ${viewer_LIBRARIES}
     ${BOOST_PROGRAM_OPTIONS_LIBRARY}
     ${BOOST_REGEX_LIBRARY}
@@ -1429,7 +1430,6 @@ target_link_libraries(${VIEWER_BINARY_NAME}
     ${SDL_LIBRARY}
     ${SMARTHEAP_LIBRARY}
     ${UI_LIBRARIES}
-    ${NDOF_LIBRARY}
     ${QUICKTIME_LIBRARY}
     ${WINDOWS_LIBRARIES}
     ${XMLRPCEPI_LIBRARIES}
-- 
GitLab