diff options
Diffstat (limited to 'linden/indra/cmake/Variables.cmake')
-rw-r--r-- | linden/indra/cmake/Variables.cmake | 100 |
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 | |||
20 | set(LIBS_CLOSED_PREFIX) | ||
21 | set(LIBS_OPEN_PREFIX) | ||
22 | set(LIBS_SERVER_PREFIX) | ||
23 | set(SCRIPTS_PREFIX ../scripts) | ||
24 | set(SERVER_PREFIX) | ||
25 | set(VIEWER_PREFIX) | ||
26 | |||
27 | set(LIBS_CLOSED_DIR ${CMAKE_SOURCE_DIR}/${LIBS_CLOSED_PREFIX}) | ||
28 | set(LIBS_OPEN_DIR ${CMAKE_SOURCE_DIR}/${LIBS_OPEN_PREFIX}) | ||
29 | set(LIBS_SERVER_DIR ${CMAKE_SOURCE_DIR}/${LIBS_SERVER_PREFIX}) | ||
30 | set(SCRIPTS_DIR ${CMAKE_SOURCE_DIR}/${SCRIPTS_PREFIX}) | ||
31 | set(SERVER_DIR ${CMAKE_SOURCE_DIR}/${SERVER_PREFIX}) | ||
32 | set(VIEWER_DIR ${CMAKE_SOURCE_DIR}/${VIEWER_PREFIX}) | ||
33 | |||
34 | set(LIBS_PREBUILT_DIR ${CMAKE_SOURCE_DIR}/../libraries CACHE PATH | ||
35 | "Location of prebuilt libraries.") | ||
36 | |||
37 | if (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") | ||
40 | endif (EXISTS ${CMAKE_SOURCE_DIR}/Server.cmake) | ||
41 | |||
42 | |||
43 | if (${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) | ||
48 | endif (${CMAKE_SYSTEM_NAME} MATCHES "Windows") | ||
49 | |||
50 | if (${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) | ||
56 | endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") | ||
57 | |||
58 | if (${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) | ||
76 | endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | ||
77 | |||
78 | # Default deploy grid | ||
79 | set(GRID agni CACHE STRING "Target Grid") | ||
80 | |||
81 | set(VIEWER ON CACHE BOOL "Build Second Life viewer.") | ||
82 | set(VIEWER_CHANNEL "Developer" CACHE STRING "Viewer Channel Name") | ||
83 | set(VIEWER_LOGIN_CHANNEL ${VIEWER_CHANNEL} CACHE STRING "Fake login channel for A/B Testing") | ||
84 | |||
85 | set(STANDALONE OFF CACHE BOOL "Do not use Linden-supplied prebuilt libraries.") | ||
86 | |||
87 | if (NOT STANDALONE AND EXISTS ${CMAKE_SOURCE_DIR}/llphysics) | ||
88 | set(SERVER ON CACHE BOOL "Build Second Life server software.") | ||
89 | endif (NOT STANDALONE AND EXISTS ${CMAKE_SOURCE_DIR}/llphysics) | ||
90 | |||
91 | if (LINUX AND SERVER AND VIEWER) | ||
92 | MESSAGE(FATAL_ERROR " | ||
93 | The indra source does not currently support building SERVER and VIEWER at the same time. | ||
94 | Please set one of these values to OFF in your CMake cache file. | ||
95 | (either by running ccmake or by editing CMakeCache.txt by hand) | ||
96 | For more information, please see JIRA DEV-14943 - Cmake Linux cannot build both VIEWER and SERVER in one build environment | ||
97 | ") | ||
98 | endif (LINUX AND SERVER AND VIEWER) | ||
99 | |||
100 | source_group("CMake Rules" FILES CMakeLists.txt) | ||