summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2012-10-04 06:29:07 +0000
committerDon Kjer <don@lindenlab.com>2012-10-04 06:29:07 +0000
commit21df924a10c1c32f7fc28bb29b20dc2179863b24 (patch)
tree1e3786d1da78129a73903bfa083e52423fe89a68 /indra/cmake
parent6d613b61d76c1909021983901920b6b1dc2c80f4 (diff)
Building headless and non-headless libraries side-by-side, removing the need for the BAKING cmake setting.
Diffstat (limited to 'indra/cmake')
-rw-r--r--indra/cmake/LLAppearance.cmake10
-rw-r--r--indra/cmake/LLRender.cmake26
-rw-r--r--indra/cmake/LLWindow.cmake30
-rw-r--r--indra/cmake/OpenGL.cmake10
-rw-r--r--indra/cmake/Variables.cmake3
5 files changed, 35 insertions, 44 deletions
diff --git a/indra/cmake/LLAppearance.cmake b/indra/cmake/LLAppearance.cmake
index 36cebe9816..bd3795a526 100644
--- a/indra/cmake/LLAppearance.cmake
+++ b/indra/cmake/LLAppearance.cmake
@@ -1,7 +1,17 @@
# -*- cmake -*-
+include(Variables)
+
set(LLAPPEARANCE_INCLUDE_DIRS
${LIBS_OPEN_DIR}/llappearance
)
+if (BUILD_HEADLESS)
+ set(LLAPPEARANCE_HEADLESS_LIBRARIES
+ llappearanceheadless
+ )
+endif (BUILD_HEADLESS)
+
set(LLAPPEARANCE_LIBRARIES llappearance)
+
+
diff --git a/indra/cmake/LLRender.cmake b/indra/cmake/LLRender.cmake
index c2f6fc67cd..ae71ee4c0d 100644
--- a/indra/cmake/LLRender.cmake
+++ b/indra/cmake/LLRender.cmake
@@ -1,5 +1,6 @@
# -*- cmake -*-
+include(Variables)
include(FreeType)
include(GLH)
@@ -8,27 +9,12 @@ set(LLRENDER_INCLUDE_DIRS
${GLH_INCLUDE_DIR}
)
-if ((BAKING) AND LINUX)
- set(LLRENDER_LIBRARIES
- llrenderheadless
- )
-else ((BAKING) AND LINUX)
+if (BUILD_HEADLESS)
+ set(LLRENDER_HEADLESS_LIBRARIES
+ llrenderheadless
+ )
+endif (BUILD_HEADLESS)
set(LLRENDER_LIBRARIES
llrender
)
-endif ((BAKING) AND LINUX)
-# mapserver requires certain files to be copied so LL_MESA_HEADLESS can be set
-# differently for different object files.
-macro (copy_server_sources )
- foreach (PREFIX ${ARGV})
- add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${PREFIX}_server.cpp
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${PREFIX}.cpp
- ${CMAKE_CURRENT_BINARY_DIR}/${PREFIX}_server.cpp
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${PREFIX}.cpp
- )
- list(APPEND server_SOURCE_FILES ${PREFIX}_server.cpp)
- endforeach (PREFIX ${_copied_SOURCES})
-endmacro (copy_server_sources _copied_SOURCES)
diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake
index 81e58b2bea..f6c40c174c 100644
--- a/indra/cmake/LLWindow.cmake
+++ b/indra/cmake/LLWindow.cmake
@@ -1,5 +1,6 @@
# -*- cmake -*-
+include(Variables)
include(GLEXT)
include(Prebuilt)
@@ -22,28 +23,21 @@ else (STANDALONE)
endif (LINUX)
endif (STANDALONE)
-if (SDL_FOUND AND NOT BAKING)
- add_definitions(-DLL_SDL=1)
+if (SDL_FOUND)
include_directories(${SDL_INCLUDE_DIR})
-endif (SDL_FOUND AND NOT BAKING)
-
-if (BAKING)
- use_prebuilt_binary(mesa)
- add_definitions(-DLL_MESA_HEADLESS=1)
-endif (BAKING)
+endif (SDL_FOUND)
set(LLWINDOW_INCLUDE_DIRS
${GLEXT_INCLUDE_DIR}
${LIBS_OPEN_DIR}/llwindow
)
-if (BAKING AND LINUX)
- set(LLWINDOW_LIBRARIES
- llwindowheadless
- )
- MESSAGE( STATUS "using headless libraries")
-else (BAKING AND LINUX)
- set(LLWINDOW_LIBRARIES
- llwindow
- )
-endif (BAKING AND LINUX)
+if (BUILD_HEADLESS)
+ set(LLWINDOW_HEADLESS_LIBRARIES
+ llwindowheadless
+ )
+endif (BUILD_HEADLESS)
+
+set(LLWINDOW_LIBRARIES
+ llwindow
+ )
diff --git a/indra/cmake/OpenGL.cmake b/indra/cmake/OpenGL.cmake
index bafb2a460f..181b10b91c 100644
--- a/indra/cmake/OpenGL.cmake
+++ b/indra/cmake/OpenGL.cmake
@@ -1,15 +1,13 @@
# -*- cmake -*-
-#if (INSTALL_PROPRIETARY)
-# set(HEADLESS ON CACHE BOOL "Use headless mesa library.")
-#endif (INSTALL_PROPRIETARY)
-
+include(Variables)
include(Prebuilt)
-if (LINUX AND NOT STANDALONE)
+if (BUILD_HEADLESS)
use_prebuilt_binary(mesa)
SET(OPENGL_glu_LIBRARY GLU)
-endif (LINUX AND NOT STANDALONE)
+ SET(OPENGL_HEADLESS_LIBRARIES OSMesa16 GLU)
+endif (BUILD_HEADLESS)
include(FindOpenGL)
diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake
index d570a8cde4..0bcb3a38b0 100644
--- a/indra/cmake/Variables.cmake
+++ b/indra/cmake/Variables.cmake
@@ -48,6 +48,9 @@ if (EXISTS ${CMAKE_SOURCE_DIR}/Server.cmake)
# We use this as a marker that you can try to use the proprietary libraries.
set(INSTALL_PROPRIETARY ON CACHE BOOL "Install proprietary binaries")
endif (EXISTS ${CMAKE_SOURCE_DIR}/Server.cmake)
+if (INSTALL_PROPRIETARY)
+ set(BUILD_HEADLESS ON CACHE BOOL "Build headless libraries.")
+endif (INSTALL_PROPRIETARY)
set(TEMPLATE_VERIFIER_OPTIONS "" CACHE STRING "Options for scripts/template_verifier.py")
set(TEMPLATE_VERIFIER_MASTER_URL "http://bitbucket.org/lindenlab/master-message-template/raw/tip/message_template.msg" CACHE STRING "Location of the master message template")