diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt
index 3e6bcb00e63c4e390e2600ccd0ae48dfe5444c64..db338508a33fb7f5f086503252a4f279c3155c3a 100644
--- a/indra/CMakeLists.txt
+++ b/indra/CMakeLists.txt
@@ -70,7 +70,16 @@ if (VIEWER)
   add_dependencies(viewer secondlife-bin)
 endif (VIEWER)
 
-add_custom_target(server)
+# Linux builds the viewer and server in 2 separate projects
+# In order for ./develop.py build server to work on linux, 
+# the viewer project needs a server target.
+# This is not true for mac and windows.
+if (LINUX) 
+  add_custom_target(server)
+endif (LINUX)
 if (SERVER)
+  if (NOT LINUX)
+    add_custom_target(server)
+  endif (NOT LINUX)
   include(${SERVER_PREFIX}Server.cmake)
 endif (SERVER)
diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake
index 004985d60313a2f150129503eff86e3c04c7a3d2..e537772fa5ef5c19940218ecaae54b7ed35921b9 100644
--- a/indra/cmake/Variables.cmake
+++ b/indra/cmake/Variables.cmake
@@ -81,9 +81,9 @@ set(VIEWER ON CACHE BOOL "Build Second Life viewer.")
 
 set(STANDALONE OFF CACHE BOOL "Do not use Linden-supplied prebuilt libraries.")
 
-if (NOT STANDALONE AND EXISTS ${LIBS_PREBUILT_DIR}/include/havok)
+if (NOT STANDALONE AND EXISTS ${CMAKE_SOURCE_DIR}/llphysics)
     set(SERVER ON CACHE BOOL "Build Second Life server software.")
-endif (NOT STANDALONE AND EXISTS ${LIBS_PREBUILT_DIR}/include/havok)
+endif (NOT STANDALONE AND EXISTS ${CMAKE_SOURCE_DIR}/llphysics)
 
 if (LINUX AND SERVER AND VIEWER)
   MESSAGE(FATAL_ERROR "