aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/cmake/Variables.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/cmake/Variables.cmake')
-rw-r--r--linden/indra/cmake/Variables.cmake100
1 files changed, 100 insertions, 0 deletions
diff --git a/linden/indra/cmake/Variables.cmake b/linden/indra/cmake/Variables.cmake
new file mode 100644
index 0000000..5868e4d
--- /dev/null
+++ b/linden/indra/cmake/Variables.cmake
@@ -0,0 +1,100 @@
1# -*- cmake -*-
2#
3# Definitions of variables used throughout the Second Life build
4# process.
5#
6# Platform variables:
7#
8# DARWIN - Mac OS X
9# LINUX - Linux
10# WINDOWS - Windows
11#
12# What to build:
13#
14# VIEWER - viewer and other viewer-side components
15# SERVER - simulator and other server-side bits
16
17
18# Relative and absolute paths to subtrees.
19
20set(LIBS_CLOSED_PREFIX)
21set(LIBS_OPEN_PREFIX)
22set(LIBS_SERVER_PREFIX)
23set(SCRIPTS_PREFIX ../scripts)
24set(SERVER_PREFIX)
25set(VIEWER_PREFIX)
26
27set(LIBS_CLOSED_DIR ${CMAKE_SOURCE_DIR}/${LIBS_CLOSED_PREFIX})
28set(LIBS_OPEN_DIR ${CMAKE_SOURCE_DIR}/${LIBS_OPEN_PREFIX})
29set(LIBS_SERVER_DIR ${CMAKE_SOURCE_DIR}/${LIBS_SERVER_PREFIX})
30set(SCRIPTS_DIR ${CMAKE_SOURCE_DIR}/${SCRIPTS_PREFIX})
31set(SERVER_DIR ${CMAKE_SOURCE_DIR}/${SERVER_PREFIX})
32set(VIEWER_DIR ${CMAKE_SOURCE_DIR}/${VIEWER_PREFIX})
33
34set(LIBS_PREBUILT_DIR ${CMAKE_SOURCE_DIR}/../libraries CACHE PATH
35 "Location of prebuilt libraries.")
36
37if (EXISTS ${CMAKE_SOURCE_DIR}/Server.cmake)
38 # We use this as a marker that you can try to use the proprietary libraries.
39 set(INSTALL_PROPRIETARY ON CACHE BOOL "Install proprietary binaries")
40endif (EXISTS ${CMAKE_SOURCE_DIR}/Server.cmake)
41
42
43if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
44 set(WINDOWS ON BOOL FORCE)
45 set(ARCH i686)
46 set(LL_ARCH ${ARCH}_win32)
47 set(LL_ARCH_DIR ${ARCH}-win32)
48endif (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
49
50if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
51 set(LINUX ON BOOl FORCE)
52 execute_process(COMMAND uname -m COMMAND sed s/i.86/i686/
53 OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
54 set(LL_ARCH ${ARCH}_linux)
55 set(LL_ARCH_DIR ${ARCH}-linux)
56endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
57
58if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
59 set(DARWIN 1)
60 # set this dynamically from the build system now -
61 # NOTE: wont have a distributable build unless you add this on the configure line with:
62 # -DCMAKE_OSX_ARCHITECTURES:STRING='i386;ppc'
63 #set(CMAKE_OSX_ARCHITECTURES i386;ppc)
64 set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.4u.sdk)
65 if (CMAKE_OSX_ARCHITECTURES MATCHES "i386" AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc")
66 set(ARCH universal)
67 else (CMAKE_OSX_ARCHITECTURES MATCHES "i386" AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc")
68 if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc")
69 set(ARCH ppc)
70 else (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc")
71 set(ARCH i386)
72 endif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc")
73 endif (CMAKE_OSX_ARCHITECTURES MATCHES "i386" AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc")
74 set(LL_ARCH ${ARCH}_darwin)
75 set(LL_ARCH_DIR universal-darwin)
76endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
77
78# Default deploy grid
79set(GRID agni CACHE STRING "Target Grid")
80
81set(VIEWER ON CACHE BOOL "Build Second Life viewer.")
82set(VIEWER_CHANNEL "Developer" CACHE STRING "Viewer Channel Name")
83set(VIEWER_LOGIN_CHANNEL ${VIEWER_CHANNEL} CACHE STRING "Fake login channel for A/B Testing")
84
85set(STANDALONE OFF CACHE BOOL "Do not use Linden-supplied prebuilt libraries.")
86
87if (NOT STANDALONE AND EXISTS ${CMAKE_SOURCE_DIR}/llphysics)
88 set(SERVER ON CACHE BOOL "Build Second Life server software.")
89endif (NOT STANDALONE AND EXISTS ${CMAKE_SOURCE_DIR}/llphysics)
90
91if (LINUX AND SERVER AND VIEWER)
92 MESSAGE(FATAL_ERROR "
93The indra source does not currently support building SERVER and VIEWER at the same time.
94Please set one of these values to OFF in your CMake cache file.
95(either by running ccmake or by editing CMakeCache.txt by hand)
96For more information, please see JIRA DEV-14943 - Cmake Linux cannot build both VIEWER and SERVER in one build environment
97 ")
98endif (LINUX AND SERVER AND VIEWER)
99
100source_group("CMake Rules" FILES CMakeLists.txt)