aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra
diff options
context:
space:
mode:
authorunknown2008-12-30 11:34:13 -0700
committerunknown2008-12-30 11:34:13 -0700
commit5e0090c8daa5ae53f7907bbd2b6145f252f278cd (patch)
treec561ebc755dc77e99a58017a76e722d3259ea078 /linden/indra
parentRemoved llkdu from cmake (diff)
downloadmeta-impy-5e0090c8daa5ae53f7907bbd2b6145f252f278cd.zip
meta-impy-5e0090c8daa5ae53f7907bbd2b6145f252f278cd.tar.gz
meta-impy-5e0090c8daa5ae53f7907bbd2b6145f252f278cd.tar.bz2
meta-impy-5e0090c8daa5ae53f7907bbd2b6145f252f278cd.tar.xz
Added fix for VWR-10392 as well as other fixes
Diffstat (limited to 'linden/indra')
-rw-r--r--linden/indra/CMakeLists.txt4
-rw-r--r--linden/indra/cmake/00-Common.cmake8
-rw-r--r--linden/indra/cmake/APR.cmake23
-rw-r--r--linden/indra/cmake/CopyWinLibs.cmake57
-rw-r--r--linden/indra/cmake/DBusGlib.cmake29
-rw-r--r--linden/indra/cmake/DirectX.cmake22
-rw-r--r--linden/indra/cmake/FindMono.cmake18
-rw-r--r--linden/indra/cmake/GooglePerfTools.cmake6
-rw-r--r--linden/indra/cmake/LLXML.cmake2
-rw-r--r--linden/indra/cmake/Linking.cmake8
-rw-r--r--linden/indra/cmake/NDOF.cmake6
-rw-r--r--linden/indra/cmake/Python.cmake1
-rw-r--r--linden/indra/cmake/QuickTime.cmake22
-rwxr-xr-xlinden/indra/develop.py125
-rw-r--r--linden/indra/newview/CMakeLists.txt58
15 files changed, 287 insertions, 102 deletions
diff --git a/linden/indra/CMakeLists.txt b/linden/indra/CMakeLists.txt
index 09fa753..1453fe4 100644
--- a/linden/indra/CMakeLists.txt
+++ b/linden/indra/CMakeLists.txt
@@ -65,7 +65,11 @@ if (VIEWER)
65 add_dependencies(viewer mac-updater mac-crash-logger) 65 add_dependencies(viewer mac-updater mac-crash-logger)
66 elseif (WINDOWS) 66 elseif (WINDOWS)
67 add_subdirectory(${VIEWER_PREFIX}win_crash_logger) 67 add_subdirectory(${VIEWER_PREFIX}win_crash_logger)
68 if (EXISTS ${VIEWER_PREFIX}win_setup)
69 add_subdirectory(${VIEWER_PREFIX}win_setup)
70 endif (EXISTS ${VIEWER_PREFIX}win_setup)
68 add_subdirectory(${VIEWER_PREFIX}win_updater) 71 add_subdirectory(${VIEWER_PREFIX}win_updater)
72 # add_dependencies(viewer windows-updater windows-setup windows-crash-logger)
69 add_dependencies(viewer windows-updater windows-crash-logger) 73 add_dependencies(viewer windows-updater windows-crash-logger)
70 elseif (SOLARIS) 74 elseif (SOLARIS)
71 add_subdirectory(solaris_crash_logger) 75 add_subdirectory(solaris_crash_logger)
diff --git a/linden/indra/cmake/00-Common.cmake b/linden/indra/cmake/00-Common.cmake
index 977e588..c41591f 100644
--- a/linden/indra/cmake/00-Common.cmake
+++ b/linden/indra/cmake/00-Common.cmake
@@ -49,6 +49,10 @@ if (WINDOWS)
49 ) 49 )
50 50
51 if(MSVC80 OR MSVC90) 51 if(MSVC80 OR MSVC90)
52 set(CMAKE_CXX_FLAGS_RELEASE
53 "${CMAKE_CXX_FLAGS_RELEASE} -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0"
54 CACHE STRING "C++ compiler release options" FORCE)
55
52 add_definitions( 56 add_definitions(
53 /Zc:wchar_t- 57 /Zc:wchar_t-
54 ) 58 )
@@ -165,6 +169,10 @@ if (DARWIN)
165 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}") 169 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}")
166 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mlong-branch") 170 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mlong-branch")
167 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mlong-branch") 171 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mlong-branch")
172 # NOTE: it's critical that the optimization flag is put in front.
173 # NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered.
174 set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
175 set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
168endif (DARWIN) 176endif (DARWIN)
169 177
170 178
diff --git a/linden/indra/cmake/APR.cmake b/linden/indra/cmake/APR.cmake
index 2a96d70..2563a98 100644
--- a/linden/indra/cmake/APR.cmake
+++ b/linden/indra/cmake/APR.cmake
@@ -15,24 +15,16 @@ if (STANDALONE)
15else (STANDALONE) 15else (STANDALONE)
16 use_prebuilt_binary(apr_suite) 16 use_prebuilt_binary(apr_suite)
17 if (WINDOWS) 17 if (WINDOWS)
18 set(WINLIBS_PREBUILT_DEBUG_DIR
19 ${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug
20 )
21 set(WINLIBS_PREBUILT_RELEASE_DIR
22 ${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release
23 )
24 set(APR_LIBRARIES 18 set(APR_LIBRARIES
25 debug ${WINLIBS_PREBUILT_DEBUG_DIR}/apr-1.lib 19 debug ${ARCH_PREBUILT_DIRS_DEBUG}/apr-1.lib
26 optimized ${WINLIBS_PREBUILT_RELEASE_DIR}/apr-1.lib 20 optimized ${ARCH_PREBUILT_DIRS_RELEASE}/apr-1.lib
27 ) 21 )
28 set(APRUTIL_LIBRARIES 22 set(APRUTIL_LIBRARIES
29 debug ${WINLIBS_PREBUILT_DEBUG_DIR}/aprutil-1.lib 23 debug ${ARCH_PREBUILT_DIRS_DEBUG}/aprutil-1.lib
30 optimized ${WINLIBS_PREBUILT_RELEASE_DIR}/aprutil-1.lib 24 optimized ${ARCH_PREBUILT_DIRS_RELEASE}/aprutil-1.lib
31 )
32 set(APRICONV_LIBRARIES
33 debug ${WINLIBS_PREBUILT_DEBUG_DIR}/apriconv-1.lib
34 optimized ${WINLIBS_PREBUILT_RELEASE_DIR}/apriconv-1.lib
35 ) 25 )
26 # Doesn't need to link with iconv.dll
27 set(APRICONV_LIBRARIES "")
36 elseif (DARWIN) 28 elseif (DARWIN)
37 set(APR_LIBRARIES 29 set(APR_LIBRARIES
38 debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapr-1.a 30 debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapr-1.a
@@ -42,10 +34,11 @@ else (STANDALONE)
42 debug ${ARCH_PREBUILT_DIRS_DEBUG}/libaprutil-1.a 34 debug ${ARCH_PREBUILT_DIRS_DEBUG}/libaprutil-1.a
43 optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.a 35 optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.a
44 ) 36 )
45 set(APRICONV_LIBRARIES apriconv-1) 37 set(APRICONV_LIBRARIES iconv)
46 else (WINDOWS) 38 else (WINDOWS)
47 set(APR_LIBRARIES apr-1) 39 set(APR_LIBRARIES apr-1)
48 set(APRUTIL_LIBRARIES aprutil-1) 40 set(APRUTIL_LIBRARIES aprutil-1)
41 set(APRICONV_LIBRARIES iconv)
49 endif (WINDOWS) 42 endif (WINDOWS)
50 set(APR_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/apr-1) 43 set(APR_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/apr-1)
51 44
diff --git a/linden/indra/cmake/CopyWinLibs.cmake b/linden/indra/cmake/CopyWinLibs.cmake
index e2c45fd..3234bfa 100644
--- a/linden/indra/cmake/CopyWinLibs.cmake
+++ b/linden/indra/cmake/CopyWinLibs.cmake
@@ -106,4 +106,59 @@ copy_if_different(
106set(all_targets ${all_targets} ${out_targets}) 106set(all_targets ${all_targets} ${out_targets})
107 107
108 108
109add_custom_target(copy_win_libs ALL DEPENDS ${all_targets}) \ No newline at end of file 109# Copy MS C runtime dlls, required for packaging.
110# *TODO - Adapt this to support VC9
111if (MSVC80)
112 FIND_PATH(debug_msvc8_redist_path msvcr80d.dll
113 PATHS
114 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT
115 )
116
117 if(EXISTS ${debug_msvc8_redist_path})
118 set(debug_msvc8_files
119 msvcr80d.dll
120 msvcp80d.dll
121 Microsoft.VC80.DebugCRT.manifest
122 )
123
124 copy_if_different(
125 ${debug_msvc8_redist_path}
126 "${CMAKE_CURRENT_BINARY_DIR}/Debug"
127 out_targets
128 ${debug_msvc8_files}
129 )
130 set(all_targets ${all_targets} ${out_targets})
131 endif (EXISTS ${debug_msvc8_redist_path})
132
133 FIND_PATH(release_msvc8_redist_path msvcr80.dll
134 PATHS
135 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC80.CRT
136 )
137
138 if(EXISTS ${release_msvc8_redist_path})
139 set(release_msvc8_files
140 msvcr80.dll
141 msvcp80.dll
142 Microsoft.VC80.CRT.manifest
143 )
144
145 copy_if_different(
146 ${release_msvc8_redist_path}
147 "${CMAKE_CURRENT_BINARY_DIR}/Release"
148 out_targets
149 ${release_msvc8_files}
150 )
151 set(all_targets ${all_targets} ${out_targets})
152
153 copy_if_different(
154 ${release_msvc8_redist_path}
155 "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo"
156 out_targets
157 ${release_msvc8_files}
158 )
159 set(all_targets ${all_targets} ${out_targets})
160
161 endif (EXISTS ${release_msvc8_redist_path})
162endif (MSVC80)
163
164add_custom_target(copy_win_libs ALL DEPENDS ${all_targets})
diff --git a/linden/indra/cmake/DBusGlib.cmake b/linden/indra/cmake/DBusGlib.cmake
new file mode 100644
index 0000000..cfc4ccd
--- /dev/null
+++ b/linden/indra/cmake/DBusGlib.cmake
@@ -0,0 +1,29 @@
1# -*- cmake -*-
2include(Prebuilt)
3
4if (STANDALONE)
5 include(FindPkgConfig)
6
7 pkg_check_modules(DBUSGLIB REQUIRED dbus-glib-1)
8
9elseif (LINUX)
10 use_prebuilt_binary(dbusglib)
11 set(DBUSGLIB_FOUND ON FORCE BOOL)
12 set(DBUSGLIB_INCLUDE_DIRS
13 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/glib-2.0
14 )
15 # We don't need to explicitly link against dbus-glib itself, because
16 # the viewer probes for the system's copy at runtime.
17 set(DBUSGLIB_LIBRARIES
18 gobject-2.0
19 glib-2.0
20 )
21endif (STANDALONE)
22
23if (DBUSGLIB_FOUND)
24 set(DBUSGLIB ON CACHE BOOL "Build with dbus-glib message bus support.")
25endif (DBUSGLIB_FOUND)
26
27if (DBUSGLIB)
28 add_definitions(-DLL_DBUS_ENABLED=1)
29endif (DBUSGLIB)
diff --git a/linden/indra/cmake/DirectX.cmake b/linden/indra/cmake/DirectX.cmake
index 4d2d5e0..d406f37 100644
--- a/linden/indra/cmake/DirectX.cmake
+++ b/linden/indra/cmake/DirectX.cmake
@@ -3,12 +3,13 @@
3if (VIEWER AND WINDOWS) 3if (VIEWER AND WINDOWS)
4 find_path(DIRECTX_INCLUDE_DIR dxdiag.h 4 find_path(DIRECTX_INCLUDE_DIR dxdiag.h
5 "$ENV{DXSDK_DIR}/Include" 5 "$ENV{DXSDK_DIR}/Include"
6 "C:/Program Files/Microsoft DirectX SDK (June 2008)/Include" 6 "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2008)/Include"
7 "C:/Program Files/Microsoft DirectX SDK (March 2008)/Include" 7 "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2008)/Include"
8 "C:/Program Files/Microsoft DirectX SDK (November 2007)/Include" 8 "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2008)/Include"
9 "C:/Program Files/Microsoft DirectX SDK (August 2007)/Include" 9 "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (November 2007)/Include"
10 "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2007)/Include"
10 "C:/DX90SDK/Include" 11 "C:/DX90SDK/Include"
11 "C:/Program Files/DX90SDK/Include" 12 "$ENV{PROGRAMFILES}/DX90SDK/Include"
12 ) 13 )
13 if (DIRECTX_INCLUDE_DIR) 14 if (DIRECTX_INCLUDE_DIR)
14 include_directories(${DIRECTX_INCLUDE_DIR}) 15 include_directories(${DIRECTX_INCLUDE_DIR})
@@ -22,12 +23,13 @@ if (VIEWER AND WINDOWS)
22 23
23 find_path(DIRECTX_LIBRARY_DIR dxguid.lib 24 find_path(DIRECTX_LIBRARY_DIR dxguid.lib
24 "$ENV{DXSDK_DIR}/Lib/x86" 25 "$ENV{DXSDK_DIR}/Lib/x86"
25 "C:/Program Files/Microsoft DirectX SDK (June 2008)/Lib/x86" 26 "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2008)/Lib/x86"
26 "C:/Program Files/Microsoft DirectX SDK (March 2008)/Lib/x86" 27 "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2008)/Lib/x86"
27 "C:/Program Files/Microsoft DirectX SDK (November 2007)/Lib/x86" 28 "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2008)/Lib/x86"
28 "C:/Program Files/Microsoft DirectX SDK (August 2007)/Lib/x86" 29 "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (November 2007)/Lib/x86"
30 "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2007)/Lib/x86"
29 "C:/DX90SDK/Lib" 31 "C:/DX90SDK/Lib"
30 "C:/Program Files/DX90SDK/Lib" 32 "$ENV{PROGRAMFILES}/DX90SDK/Lib"
31 ) 33 )
32 if (DIRECTX_LIBRARY_DIR) 34 if (DIRECTX_LIBRARY_DIR)
33 if (DIRECTX_FIND_QUIETLY) 35 if (DIRECTX_FIND_QUIETLY)
diff --git a/linden/indra/cmake/FindMono.cmake b/linden/indra/cmake/FindMono.cmake
index f0a0705..c36d725 100644
--- a/linden/indra/cmake/FindMono.cmake
+++ b/linden/indra/cmake/FindMono.cmake
@@ -14,29 +14,29 @@
14# Removed the check for gmcs 14# Removed the check for gmcs
15 15
16FIND_PROGRAM (MONO_EXECUTABLE mono 16FIND_PROGRAM (MONO_EXECUTABLE mono
17 "C:/Program Files/Mono-1.9.1/bin" 17 "$ENV{PROGRAMFILES}/Mono-1.9.1/bin"
18 "C:/Program Files/Mono-1.2.6/bin" 18 "$ENV{PROGRAMFILES}/Mono-1.2.6/bin"
19 /bin 19 /bin
20 /usr/bin 20 /usr/bin
21 /usr/local/bin 21 /usr/local/bin
22) 22)
23FIND_PROGRAM (MCS_EXECUTABLE mcs 23FIND_PROGRAM (MCS_EXECUTABLE mcs
24 "C:/Program Files/Mono-1.9.1/bin" 24 "$ENV{PROGRAMFILES}/Mono-1.9.1/bin"
25 "C:/Program Files/Mono-1.2.6/bin" 25 "$ENV{PROGRAMFILES}/Mono-1.2.6/bin"
26 /bin 26 /bin
27 /usr/bin 27 /usr/bin
28 /usr/local/bin 28 /usr/local/bin
29) 29)
30FIND_PROGRAM (GMCS_EXECUTABLE gmcs 30FIND_PROGRAM (GMCS_EXECUTABLE gmcs
31 "C:/Program Files/Mono-1.9.1/bin" 31 "$ENV{PROGRAMFILES}/Mono-1.9.1/bin"
32 "C:/Program Files/Mono-1.2.6/bin" 32 "$ENV{PROGRAMFILES}/Mono-1.2.6/bin"
33 /bin 33 /bin
34 /usr/bin 34 /usr/bin
35 /usr/local/bin 35 /usr/local/bin
36) 36)
37FIND_PROGRAM (GACUTIL_EXECUTABLE gacutil 37FIND_PROGRAM (GACUTIL_EXECUTABLE gacutil
38 "C:/Program Files/Mono-1.9.1/bin" 38 "$ENV{PROGRAMFILES}/Mono-1.9.1/bin"
39 "C:/Program Files/Mono-1.2.6/bin" 39 "$ENV{PROGRAMFILES}/Mono-1.2.6/bin"
40 /bin 40 /bin
41 /usr/bin 41 /usr/bin
42 /usr/local/bin 42 /usr/local/bin
@@ -44,7 +44,7 @@ FIND_PROGRAM (GACUTIL_EXECUTABLE gacutil
44FIND_PROGRAM (ILASM_EXECUTABLE 44FIND_PROGRAM (ILASM_EXECUTABLE
45 ilasm 45 ilasm
46 NO_DEFAULT_PATH 46 NO_DEFAULT_PATH
47 PATHS "C:/Program Files/Mono-1.9.1/bin" "C:/Apps/Mono-1.2.6/bin" "C:/Program Files/Mono-1.2.6/bin" /bin /usr/bin /usr/local/bin 47 PATHS "$ENV{PROGRAMFILES}/Mono-1.9.1/bin" "$ENV{PROGRAMFILES}/Mono-1.2.6/bin" /bin /usr/bin /usr/local/bin
48) 48)
49 49
50SET (MONO_FOUND FALSE) 50SET (MONO_FOUND FALSE)
diff --git a/linden/indra/cmake/GooglePerfTools.cmake b/linden/indra/cmake/GooglePerfTools.cmake
index 9b3eca0..25e9f6d 100644
--- a/linden/indra/cmake/GooglePerfTools.cmake
+++ b/linden/indra/cmake/GooglePerfTools.cmake
@@ -19,10 +19,14 @@ if (GOOGLE_PERFTOOLS_FOUND)
19 set(USE_GOOGLE_PERFTOOLS ON CACHE BOOL "Build with Google PerfTools support.") 19 set(USE_GOOGLE_PERFTOOLS ON CACHE BOOL "Build with Google PerfTools support.")
20endif (GOOGLE_PERFTOOLS_FOUND) 20endif (GOOGLE_PERFTOOLS_FOUND)
21 21
22# XXX Disable temporarily, until we have compilation issues on 64-bit
23# Etch sorted.
24set(USE_GOOGLE_PERFTOOLS OFF)
25
22if (USE_GOOGLE_PERFTOOLS) 26if (USE_GOOGLE_PERFTOOLS)
23 set(TCMALLOC_FLAG -DLL_USE_TCMALLOC=1) 27 set(TCMALLOC_FLAG -DLL_USE_TCMALLOC=1)
24 include_directories(${GOOGLE_PERFTOOLS_INCLUDE_DIR}) 28 include_directories(${GOOGLE_PERFTOOLS_INCLUDE_DIR})
25 set(GOOGLE_PERFTOOLS_LIBRARIES ${TCMALLOC_LIBRARIES} ${STACKTRACE_LIBRARIES}) 29 set(GOOGLE_PERFTOOLS_LIBRARIES ${TCMALLOC_LIBRARIES} ${STACKTRACE_LIBRARIES} ${PROFILER_LIBRARIES})
26else (USE_GOOGLE_PERFTOOLS) 30else (USE_GOOGLE_PERFTOOLS)
27 set(TCMALLOC_FLAG -ULL_USE_TCMALLOC) 31 set(TCMALLOC_FLAG -ULL_USE_TCMALLOC)
28endif (USE_GOOGLE_PERFTOOLS) 32endif (USE_GOOGLE_PERFTOOLS)
diff --git a/linden/indra/cmake/LLXML.cmake b/linden/indra/cmake/LLXML.cmake
index 1ce93c0..dd2ebca 100644
--- a/linden/indra/cmake/LLXML.cmake
+++ b/linden/indra/cmake/LLXML.cmake
@@ -1,9 +1,11 @@
1# -*- cmake -*- 1# -*- cmake -*-
2 2
3include(Boost)
3include(EXPAT) 4include(EXPAT)
4 5
5set(LLXML_INCLUDE_DIRS 6set(LLXML_INCLUDE_DIRS
6 ${LIBS_OPEN_DIR}/llxml 7 ${LIBS_OPEN_DIR}/llxml
8 ${Boost_INCLUDE_DIRS}
7 ${EXPAT_INCLUDE_DIRS} 9 ${EXPAT_INCLUDE_DIRS}
8 ) 10 )
9 11
diff --git a/linden/indra/cmake/Linking.cmake b/linden/indra/cmake/Linking.cmake
index c9748e3..167c5dd 100644
--- a/linden/indra/cmake/Linking.cmake
+++ b/linden/indra/cmake/Linking.cmake
@@ -7,15 +7,15 @@ if (NOT STANDALONE)
7 set(ARCH_PREBUILT_DIRS_DEBUG ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib/debug) 7 set(ARCH_PREBUILT_DIRS_DEBUG ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib/debug)
8 elseif (LINUX) 8 elseif (LINUX)
9 if (VIEWER) 9 if (VIEWER)
10 set(ARCH_PREBUILT_DIRS 10 set(ARCH_PREBUILT_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib_release_client)
11 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib_release_client)
12 set(ARCH_PREBUILT_DIRS_RELEASE ${ARCH_PREBUILT_DIRS})
13 set(ARCH_PREBUILT_DIRS_DEBUG ${ARCH_PREBUILT_DIRS})
14 else (VIEWER) 11 else (VIEWER)
15 set(ARCH_PREBUILT_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib_release) 12 set(ARCH_PREBUILT_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib_release)
16 endif (VIEWER) 13 endif (VIEWER)
14 set(ARCH_PREBUILT_DIRS_RELEASE ${ARCH_PREBUILT_DIRS})
15 set(ARCH_PREBUILT_DIRS_DEBUG ${ARCH_PREBUILT_DIRS})
17 elseif (DARWIN) 16 elseif (DARWIN)
18 set(ARCH_PREBUILT_DIRS_RELEASE ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib_release) 17 set(ARCH_PREBUILT_DIRS_RELEASE ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib_release)
18 set(ARCH_PREBUILT_DIRS ${ARCH_PREBUILT_DIRS_RELEASE})
19 set(ARCH_PREBUILT_DIRS_DEBUG ${ARCH_PREBUILT_DIRS_RELEASE}) 19 set(ARCH_PREBUILT_DIRS_DEBUG ${ARCH_PREBUILT_DIRS_RELEASE})
20 endif (WINDOWS) 20 endif (WINDOWS)
21endif (NOT STANDALONE) 21endif (NOT STANDALONE)
diff --git a/linden/indra/cmake/NDOF.cmake b/linden/indra/cmake/NDOF.cmake
index 3f715a2..dad74e9 100644
--- a/linden/indra/cmake/NDOF.cmake
+++ b/linden/indra/cmake/NDOF.cmake
@@ -3,12 +3,12 @@ include(Prebuilt)
3 3
4use_prebuilt_binary(ndofdev) 4use_prebuilt_binary(ndofdev)
5 5
6if (WINDOWS OR DARWIN) 6if (WINDOWS OR DARWIN OR LINUX)
7 add_definitions(-DLIB_NDOF=1) 7 add_definitions(-DLIB_NDOF=1)
8endif (WINDOWS OR DARWIN) 8endif (WINDOWS OR DARWIN OR LINUX)
9 9
10if (WINDOWS) 10if (WINDOWS)
11 set(NDOF_LIBRARY libndofdev) 11 set(NDOF_LIBRARY libndofdev)
12elseif (DARWIN) 12elseif (DARWIN OR LINUX)
13 set(NDOF_LIBRARY ndofdev) 13 set(NDOF_LIBRARY ndofdev)
14endif (WINDOWS) 14endif (WINDOWS)
diff --git a/linden/indra/cmake/Python.cmake b/linden/indra/cmake/Python.cmake
index e9505fb..4f86d32 100644
--- a/linden/indra/cmake/Python.cmake
+++ b/linden/indra/cmake/Python.cmake
@@ -9,6 +9,7 @@ if (WINDOWS)
9 NAMES python25.exe python23.exe python.exe 9 NAMES python25.exe python23.exe python.exe
10 NO_DEFAULT_PATH # added so that cmake does not find cygwin python 10 NO_DEFAULT_PATH # added so that cmake does not find cygwin python
11 PATHS 11 PATHS
12 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath]
12 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath] 13 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]
13 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath] 14 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]
14 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath] 15 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]
diff --git a/linden/indra/cmake/QuickTime.cmake b/linden/indra/cmake/QuickTime.cmake
index b79ac11..4352709 100644
--- a/linden/indra/cmake/QuickTime.cmake
+++ b/linden/indra/cmake/QuickTime.cmake
@@ -9,13 +9,29 @@ if (DARWIN)
9 include(CMakeFindFrameworks) 9 include(CMakeFindFrameworks)
10 find_library(QUICKTIME_LIBRARY QuickTime) 10 find_library(QUICKTIME_LIBRARY QuickTime)
11elseif (WINDOWS) 11elseif (WINDOWS)
12 set(QUICKTIME_SDK_DIR "C:\\Program Files\\QuickTime SDK" 12 set(QUICKTIME_SDK_DIR "$ENV{PROGRAMFILES}/QuickTime SDK"
13 CACHE PATH "Location of the QuickTime SDK.") 13 CACHE PATH "Location of the QuickTime SDK.")
14 find_library(QUICKTIME_LIBRARY qtmlclient 14
15 find_library(DEBUG_QUICKTIME_LIBRARY qtmlclient
16 PATHS
17 ${ARCH_PREBUILT_DIRS_DEBUG}
18 "${QUICKTIME_SDK_DIR}\\libraries"
19 )
20
21 find_library(RELEASE_QUICKTIME_LIBRARY qtmlclient
15 PATHS 22 PATHS
16 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib/release 23 ${ARCH_PREBUILT_DIRS_RELEASE}
17 "${QUICKTIME_SDK_DIR}\\libraries" 24 "${QUICKTIME_SDK_DIR}\\libraries"
18 ) 25 )
26
27 if (DEBUG_QUICKTIME_LIBRARY AND RELEASE_QUICKTIME_LIBRARY)
28 set(QUICKTIME_LIBRARY
29 optimized ${RELEASE_QUICKTIME_LIBRARY}
30 debug ${DEBUG_QUICKTIME_LIBRARY}
31 )
32
33 endif (DEBUG_QUICKTIME_LIBRARY AND RELEASE_QUICKTIME_LIBRARY)
34
19 include_directories( 35 include_directories(
20 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/quicktime 36 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/quicktime
21 "${QUICKTIME_SDK_DIR}\\CIncludes" 37 "${QUICKTIME_SDK_DIR}\\CIncludes"
diff --git a/linden/indra/develop.py b/linden/indra/develop.py
index a0b11c6..830f74d 100755
--- a/linden/indra/develop.py
+++ b/linden/indra/develop.py
@@ -53,6 +53,16 @@ def mkdir(path):
53 if err.errno != errno.EEXIST or not os.path.isdir(path): 53 if err.errno != errno.EEXIST or not os.path.isdir(path):
54 raise 54 raise
55 55
56def getcwd():
57 cwd = os.getcwd()
58 if 'a' <= cwd[0] <= 'z' and cwd[1] == ':':
59 # CMake wants DOS drive letters to be in uppercase. The above
60 # condition never asserts on platforms whose full path names
61 # always begin with a slash, so we don't need to test whether
62 # we are running on Windows.
63 cwd = cwd[0].upper() + cwd[1:]
64 return cwd
65
56def quote(opts): 66def quote(opts):
57 return '"' + '" "'.join([ opt.replace('"', '') for opt in opts ]) + '"' 67 return '"' + '" "'.join([ opt.replace('"', '') for opt in opts ]) + '"'
58 68
@@ -65,6 +75,7 @@ class PlatformSetup(object):
65 build_type = build_types['relwithdebinfo'] 75 build_type = build_types['relwithdebinfo']
66 standalone = 'FALSE' 76 standalone = 'FALSE'
67 unattended = 'FALSE' 77 unattended = 'FALSE'
78 project_name = 'Imprudence'
68 distcc = True 79 distcc = True
69 cmake_opts = [] 80 cmake_opts = []
70 81
@@ -141,7 +152,7 @@ class PlatformSetup(object):
141 # do a sanity check to make sure we have a generator 152 # do a sanity check to make sure we have a generator
142 if not hasattr(self, 'generator'): 153 if not hasattr(self, 'generator'):
143 raise "No generator available for '%s'" % (self.__name__,) 154 raise "No generator available for '%s'" % (self.__name__,)
144 cwd = os.getcwd() 155 cwd = getcwd()
145 created = [] 156 created = []
146 try: 157 try:
147 for d in self.build_dirs(): 158 for d in self.build_dirs():
@@ -223,6 +234,10 @@ class UnixSetup(PlatformSetup):
223class LinuxSetup(UnixSetup): 234class LinuxSetup(UnixSetup):
224 def __init__(self): 235 def __init__(self):
225 super(LinuxSetup, self).__init__() 236 super(LinuxSetup, self).__init__()
237 try:
238 self.debian_sarge = open('/etc/debian_version').read().strip() == '3.1'
239 except:
240 self.debian_sarge = False
226 241
227 def os(self): 242 def os(self):
228 return 'linux' 243 return 'linux'
@@ -230,10 +245,17 @@ class LinuxSetup(UnixSetup):
230 def build_dirs(self): 245 def build_dirs(self):
231 # Only build the server code if (a) we have it and (b) we're 246 # Only build the server code if (a) we have it and (b) we're
232 # on 32-bit x86. 247 # on 32-bit x86.
248 platform_build = '%s-%s' % (self.platform(), self.build_type.lower())
249
233 if self.arch() == 'i686' and self.is_internal_tree(): 250 if self.arch() == 'i686' and self.is_internal_tree():
234 return ['viewer-' + self.platform(), 'server-' + self.platform()] 251 return ['viewer-' + platform_build, 'server-' + platform_build]
252 elif self.arch() == 'x86_64' and self.is_internal_tree():
253 # the viewer does not build in 64bit -- kdu5 issues
254 # we can either use openjpeg, or overhaul our viewer to handle kdu5 or higher
255 # doug knows about kdu issues
256 return ['server-' + platform_build]
235 else: 257 else:
236 return ['viewer-' + self.platform()] 258 return ['viewer-' + platform_build]
237 259
238 def find_in_path(self, name, defval=None, basename=False): 260 def find_in_path(self, name, defval=None, basename=False):
239 for p in os.getenv('PATH', '/usr/bin').split(':'): 261 for p in os.getenv('PATH', '/usr/bin').split(':'):
@@ -251,7 +273,8 @@ class LinuxSetup(UnixSetup):
251 opts=quote(opts), 273 opts=quote(opts),
252 standalone=self.standalone, 274 standalone=self.standalone,
253 unattended=self.unattended, 275 unattended=self.unattended,
254 type=self.build_type.upper() 276 type=self.build_type.upper(),
277 project_name=self.project_name
255 ) 278 )
256 if not self.is_internal_tree(): 279 if not self.is_internal_tree():
257 args.update({'cxx':'g++', 'server':'FALSE', 'viewer':'TRUE'}) 280 args.update({'cxx':'g++', 'server':'FALSE', 'viewer':'TRUE'})
@@ -263,22 +286,20 @@ class LinuxSetup(UnixSetup):
263 distcc = [] 286 distcc = []
264 baseonly = False 287 baseonly = False
265 if 'server' in build_dir: 288 if 'server' in build_dir:
266 gcc33 = distcc + self.find_in_path('g++-3.3', 'g++', baseonly) 289 gcc = distcc + self.find_in_path(
267 args.update({'cxx':' '.join(gcc33), 'server':'TRUE', 290 self.debian_sarge and 'g++-3.3' or 'g++-4.1',
268 'viewer':'FALSE'}) 291 'g++', baseonly)
292 args.update({'cxx': ' '.join(gcc), 'server': 'TRUE',
293 'viewer': 'FALSE'})
269 else: 294 else:
270 gcc41 = distcc + self.find_in_path('g++-4.1', 'g++', baseonly) 295 gcc41 = distcc + self.find_in_path('g++-4.1', 'g++', baseonly)
271 args.update({'cxx': ' '.join(gcc41), 'server':'FALSE', 296 args.update({'cxx': ' '.join(gcc41), 'server':'FALSE',
272 'viewer':'TRUE'}) 297 'viewer':'TRUE'})
273 #if simple:
274 # return (('cmake %(opts)s '
275 # '-DSERVER:BOOL=%(server)s '
276 # '-DVIEWER:BOOL=%(viewer)s '
277 # '%(dir)r') % args)
278 cmd = (('cmake -DCMAKE_BUILD_TYPE:STRING=%(type)s ' 298 cmd = (('cmake -DCMAKE_BUILD_TYPE:STRING=%(type)s '
279 '-G %(generator)r -DSERVER:BOOL=%(server)s ' 299 '-G %(generator)r -DSERVER:BOOL=%(server)s '
280 '-DVIEWER:BOOL=%(viewer)s -DSTANDALONE:BOOL=%(standalone)s ' 300 '-DVIEWER:BOOL=%(viewer)s -DSTANDALONE:BOOL=%(standalone)s '
281 '-DUNATTENDED:BOOL=%(unattended)s ' 301 '-DUNATTENDED:BOOL=%(unattended)s '
302 '-DROOT_PROJECT_NAME:STRING=%(project_name)s '
282 '%(opts)s %(dir)r') 303 '%(opts)s %(dir)r')
283 % args) 304 % args)
284 if 'CXX' not in os.environ: 305 if 'CXX' not in os.environ:
@@ -381,6 +402,7 @@ class DarwinSetup(UnixSetup):
381 opts=quote(opts), 402 opts=quote(opts),
382 standalone=self.standalone, 403 standalone=self.standalone,
383 unattended=self.unattended, 404 unattended=self.unattended,
405 project_name=self.project_name,
384 universal='', 406 universal='',
385 type=self.build_type.upper() 407 type=self.build_type.upper()
386 ) 408 )
@@ -392,11 +414,12 @@ class DarwinSetup(UnixSetup):
392 '-DCMAKE_BUILD_TYPE:STRING=%(type)s ' 414 '-DCMAKE_BUILD_TYPE:STRING=%(type)s '
393 '-DSTANDALONE:BOOL=%(standalone)s ' 415 '-DSTANDALONE:BOOL=%(standalone)s '
394 '-DUNATTENDED:BOOL=%(unattended)s ' 416 '-DUNATTENDED:BOOL=%(unattended)s '
417 '-DROOT_PROJECT_NAME:STRING=%(project_name)s '
395 '%(universal)s ' 418 '%(universal)s '
396 '%(opts)s %(dir)r' % args) 419 '%(opts)s %(dir)r' % args)
397 420
398 def run_build(self, opts, targets): 421 def run_build(self, opts, targets):
399 cwd = os.getcwd() 422 cwd = getcwd()
400 if targets: 423 if targets:
401 targets = ' '.join(['-target ' + repr(t) for t in targets]) 424 targets = ' '.join(['-target ' + repr(t) for t in targets])
402 else: 425 else:
@@ -439,7 +462,7 @@ class WindowsSetup(PlatformSetup):
439 462
440 def _get_generator(self): 463 def _get_generator(self):
441 if self._generator is None: 464 if self._generator is None:
442 for version in 'vc71 vc80 vc90'.split(): 465 for version in 'vc80 vc90 vc71'.split():
443 if self.find_visual_studio(version): 466 if self.find_visual_studio(version):
444 self._generator = version 467 self._generator = version
445 print 'Building with ', self.gens[version]['gen'] 468 print 'Building with ', self.gens[version]['gen']
@@ -467,12 +490,14 @@ class WindowsSetup(PlatformSetup):
467 opts=quote(opts), 490 opts=quote(opts),
468 standalone=self.standalone, 491 standalone=self.standalone,
469 unattended=self.unattended, 492 unattended=self.unattended,
493 project_name=self.project_name
470 ) 494 )
471 #if simple: 495 #if simple:
472 # return 'cmake %(opts)s "%(dir)s"' % args 496 # return 'cmake %(opts)s "%(dir)s"' % args
473 return ('cmake -G "%(generator)s" ' 497 return ('cmake -G "%(generator)s" '
474 '-DSTANDALONE:BOOL=%(standalone)s ' 498 '-DSTANDALONE:BOOL=%(standalone)s '
475 '-DUNATTENDED:BOOL=%(unattended)s ' 499 '-DUNATTENDED:BOOL=%(unattended)s '
500 '-DROOT_PROJECT_NAME:STRING=%(project_name)s '
476 '%(opts)s "%(dir)s"' % args) 501 '%(opts)s "%(dir)s"' % args)
477 502
478 def find_visual_studio(self, gen=None): 503 def find_visual_studio(self, gen=None):
@@ -503,11 +528,11 @@ class WindowsSetup(PlatformSetup):
503 if self.gens[self.generator]['ver'] in [ r'8.0', r'9.0' ]: 528 if self.gens[self.generator]['ver'] in [ r'8.0', r'9.0' ]:
504 config = '\"%s|Win32\"' % config 529 config = '\"%s|Win32\"' % config
505 530
506 return "buildconsole Imprudence.sln /build %s" % config 531 return "buildconsole %s.sln /build %s" % (self.project_name, config)
507 532
508 # devenv.com is CLI friendly, devenv.exe... not so much. 533 # devenv.com is CLI friendly, devenv.exe... not so much.
509 return ('"%sdevenv.com" Imprudence.sln /build %s' % 534 return ('"%sdevenv.com" %s.sln /build %s' %
510 (self.find_visual_studio(), self.build_type)) 535 (self.find_visual_studio(), self.project_name, self.build_type))
511 536
512 # this override of run exists because the PlatformSetup version 537 # this override of run exists because the PlatformSetup version
513 # uses Unix/Mac only calls. Freakin' os module! 538 # uses Unix/Mac only calls. Freakin' os module!
@@ -524,17 +549,26 @@ class WindowsSetup(PlatformSetup):
524 '''Override to add the vstool.exe call after running cmake.''' 549 '''Override to add the vstool.exe call after running cmake.'''
525 PlatformSetup.run_cmake(self, args) 550 PlatformSetup.run_cmake(self, args)
526 if self.unattended == 'FALSE': 551 if self.unattended == 'FALSE':
527 for build_dir in self.build_dirs(): 552 self.run_vstool()
528 vstool_cmd = os.path.join('tools','vstool','VSTool.exe') \ 553
529 + ' --solution ' \ 554 def run_vstool(self):
530 + os.path.join(build_dir,'Imprudence.sln') \ 555 for build_dir in self.build_dirs():
531 + ' --config RelWithDebInfo' \ 556 stamp = os.path.join(build_dir, 'vstool.txt')
532 + ' --startup imprudence-bin' 557 try:
533 print 'Running %r in %r' % (vstool_cmd, os.getcwd()) 558 prev_build = open(stamp).read().strip()
534 self.run(vstool_cmd) 559 except IOError:
560 prev_build = ''
561 vstool_cmd = (os.path.join('tools','vstool','VSTool.exe') +
562 ' --solution ' +
563 os.path.join(build_dir,'Imprudence.sln') +
564 ' --config ' + self.build_type +
565 ' --startup imprudence-bin')
566 print 'Running %r in %r' % (vstool_cmd, getcwd())
567 self.run(vstool_cmd)
568 print >> open(stamp, 'w'), self.build_type
535 569
536 def run_build(self, opts, targets): 570 def run_build(self, opts, targets):
537 cwd = os.getcwd() 571 cwd = getcwd()
538 build_cmd = self.get_build_cmd() 572 build_cmd = self.get_build_cmd()
539 573
540 for d in self.build_dirs(): 574 for d in self.build_dirs():
@@ -565,12 +599,14 @@ class CygwinSetup(WindowsSetup):
565 opts=quote(opts), 599 opts=quote(opts),
566 standalone=self.standalone, 600 standalone=self.standalone,
567 unattended=self.unattended, 601 unattended=self.unattended,
602 project_name=self.project_name
568 ) 603 )
569 #if simple: 604 #if simple:
570 # return 'cmake %(opts)s "%(dir)s"' % args 605 # return 'cmake %(opts)s "%(dir)s"' % args
571 return ('cmake -G "%(generator)s" ' 606 return ('cmake -G "%(generator)s" '
572 '-DUNATTENDED:BOOl=%(unattended)s ' 607 '-DUNATTENDED:BOOl=%(unattended)s '
573 '-DSTANDALONE:BOOL=%(standalone)s ' 608 '-DSTANDALONE:BOOL=%(standalone)s '
609 '-DROOT_PROJECT_NAME:STRING=%(project_name)s '
574 '%(opts)s "%(dir)s"' % args) 610 '%(opts)s "%(dir)s"' % args)
575 611
576setup_platform = { 612setup_platform = {
@@ -582,7 +618,7 @@ setup_platform = {
582 618
583 619
584usage_msg = ''' 620usage_msg = '''
585Usage: develop.py [options] command [command-options] 621Usage: develop.py [options] [command [command-options]]
586 622
587Options: 623Options:
588 -h | --help print this help message 624 -h | --help print this help message
@@ -595,12 +631,26 @@ Options:
595 Windows: VC71 or VS2003 (default), VC80 (VS2005) or VC90 (VS2008) 631 Windows: VC71 or VS2003 (default), VC80 (VS2005) or VC90 (VS2008)
596 Mac OS X: Xcode (default), Unix Makefiles 632 Mac OS X: Xcode (default), Unix Makefiles
597 Linux: Unix Makefiles (default), KDevelop3 633 Linux: Unix Makefiles (default), KDevelop3
634 -p | --project=NAME set the root project name. (Doesn't effect makefiles)
635
598Commands: 636Commands:
599 build configure and build default target 637 build configure and build default target
600 clean delete all build directories (does not affect sources) 638 clean delete all build directories (does not affect sources)
601 configure configure project by running cmake 639 configure configure project by running cmake
602 640
603If you do not specify a command, the default is "configure". 641Command-options for "configure":
642 We use cmake variables to change the build configuration.
643 -DSERVER:BOOL=OFF Don't configure simulator/dataserver/etc
644 -DVIEWER:BOOL=OFF Don't configure the viewer
645 -DPACKAGE:BOOL=ON Create "package" target to make installers
646 -DLOCALIZESETUP:BOOL=ON Create one win_setup target per supported language
647
648Examples:
649 Set up a viewer-only project for your system:
650 develop.py configure -DSERVER:BOOL=OFF
651
652 Set up a Visual Studio 2005 project with "package" target:
653 develop.py -G vc80 configure -DPACKAGE:BOOL=ON
604''' 654'''
605 655
606def main(arguments): 656def main(arguments):
@@ -608,10 +658,14 @@ def main(arguments):
608 try: 658 try:
609 opts, args = getopt.getopt( 659 opts, args = getopt.getopt(
610 arguments, 660 arguments,
611 '?hNt:G:', 661 '?hNt:p:G:',
612 ['help', 'standalone', 'no-distcc', 'unattended', 'type=', 'incredibuild', 'generator=']) 662 ['help', 'standalone', 'no-distcc', 'unattended', 'type=', 'incredibuild', 'generator=', 'project='])
613 except getopt.GetoptError, err: 663 except getopt.GetoptError, err:
614 print >> sys.stderr, 'Error:', err 664 print >> sys.stderr, 'Error:', err
665 print >> sys.stderr, """
666Note: You must pass -D options to cmake after the "configure" command
667For example: develop.py configure -DSERVER:BOOL=OFF"""
668 print >> sys.stderr, usage_msg.strip()
615 sys.exit(1) 669 sys.exit(1)
616 670
617 for o, a in opts: 671 for o, a in opts:
@@ -637,6 +691,8 @@ def main(arguments):
637 setup.generator = a 691 setup.generator = a
638 elif o in ('-N', '--no-distcc'): 692 elif o in ('-N', '--no-distcc'):
639 setup.distcc = False 693 setup.distcc = False
694 elif o in ('-p', '--project'):
695 setup.project_name = a
640 elif o in ('--incredibuild'): 696 elif o in ('--incredibuild'):
641 setup.incredibuild = True 697 setup.incredibuild = True
642 else: 698 else:
@@ -664,13 +720,14 @@ def main(arguments):
664 print >> sys.stderr, 'Error: unknown subcommand', repr(cmd) 720 print >> sys.stderr, 'Error: unknown subcommand', repr(cmd)
665 print >> sys.stderr, "(run 'develop.py --help' for help)" 721 print >> sys.stderr, "(run 'develop.py --help' for help)"
666 sys.exit(1) 722 sys.exit(1)
667 except CommandError, err:
668 print >> sys.stderr, 'Error:', err
669 sys.exit(1)
670 except getopt.GetoptError, err: 723 except getopt.GetoptError, err:
671 print >> sys.stderr, 'Error with %r subcommand: %s' % (cmd, err) 724 print >> sys.stderr, 'Error with %r subcommand: %s' % (cmd, err)
672 sys.exit(1) 725 sys.exit(1)
673 726
674 727
675if __name__ == '__main__': 728if __name__ == '__main__':
676 main(sys.argv[1:]) 729 try:
730 main(sys.argv[1:])
731 except CommandError, err:
732 print >> sys.stderr, 'Error:', err
733 sys.exit(1)
diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt
index 9b7a647..53054aa 100644
--- a/linden/indra/newview/CMakeLists.txt
+++ b/linden/indra/newview/CMakeLists.txt
@@ -5,9 +5,9 @@ project(viewer)
5include(00-Common) 5include(00-Common)
6include(Boost) 6include(Boost)
7include(BuildVersion) 7include(BuildVersion)
8include(DBusGlib)
8include(DirectX) 9include(DirectX)
9include(ELFIO) 10include(ELFIO)
10include(FMOD)
11include(FindOpenGL) 11include(FindOpenGL)
12include(LLAudio) 12include(LLAudio)
13include(LLCharacter) 13include(LLCharacter)
@@ -429,6 +429,9 @@ set(viewer_SOURCE_FILES
429 pipeline.cpp 429 pipeline.cpp
430 ) 430 )
431 431
432set(VIEWER_BINARY_NAME "imprudence-bin" CACHE STRING
433 "The name of the viewer executable to create.")
434
432if (LINUX) 435if (LINUX)
433 # We can't set these flags for Darwin, because they get passed to 436 # We can't set these flags for Darwin, because they get passed to
434 # the PPC compiler. Ugh. 437 # the PPC compiler. Ugh.
@@ -849,8 +852,8 @@ if (DARWIN)
849 secondlife.icns 852 secondlife.icns
850 macview.r 853 macview.r
851 gpu_table.txt 854 gpu_table.txt
852 Info-SecondLife.plist 855 Info-Imprudence.plist
853 SecondLife.nib/ 856 Imprudence.nib/
854 # CMake doesn't seem to support Xcode language variants well just yet 857 # CMake doesn't seem to support Xcode language variants well just yet
855 English.lproj/InfoPlist.strings 858 English.lproj/InfoPlist.strings
856 English.lproj/language.txt 859 English.lproj/language.txt
@@ -870,6 +873,7 @@ endif (DARWIN)
870 873
871if (LINUX) 874if (LINUX)
872 LIST(APPEND viewer_SOURCE_FILES llappviewerlinux.cpp) 875 LIST(APPEND viewer_SOURCE_FILES llappviewerlinux.cpp)
876 LIST(APPEND viewer_SOURCE_FILES llappviewerlinux_api_dbus.cpp)
873 LIST(APPEND CMAKE_EXE_LINKER_FLAGS -Wl,--as-needed) 877 LIST(APPEND CMAKE_EXE_LINKER_FLAGS -Wl,--as-needed)
874 878
875 set(viewer_LIBRARIES 879 set(viewer_LIBRARIES
@@ -1238,8 +1242,13 @@ set_source_files_properties(${viewer_CHARACTER_FILES}
1238 1242
1239list(APPEND viewer_SOURCE_FILES ${viewer_CHARACTER_FILES}) 1243list(APPEND viewer_SOURCE_FILES ${viewer_CHARACTER_FILES})
1240 1244
1245
1246if (OPENAL)
1247 set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_OPENAL")
1248endif (OPENAL)
1249
1241if (FMOD) 1250if (FMOD)
1242 set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_FLAGS -DLL_FMOD) 1251 set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_FMOD")
1243 1252
1244 if (NOT WINDOWS) 1253 if (NOT WINDOWS)
1245 set(fmodwrapper_SOURCE_FILES fmodwrapper.cpp) 1254 set(fmodwrapper_SOURCE_FILES fmodwrapper.cpp)
@@ -1259,6 +1268,8 @@ if (FMOD)
1259 endif (NOT WINDOWS) 1268 endif (NOT WINDOWS)
1260endif (FMOD) 1269endif (FMOD)
1261 1270
1271set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}")
1272
1262list(APPEND viewer_SOURCE_FILES ${viewer_HEADER_FILES}) 1273list(APPEND viewer_SOURCE_FILES ${viewer_HEADER_FILES})
1263 1274
1264set_source_files_properties(${viewer_HEADER_FILES} 1275set_source_files_properties(${viewer_HEADER_FILES}
@@ -1374,7 +1385,7 @@ target_link_libraries(imprudence-bin
1374 ${viewer_LIBRARIES} 1385 ${viewer_LIBRARIES}
1375 ${BOOST_PROGRAM_OPTIONS_LIBRARY} 1386 ${BOOST_PROGRAM_OPTIONS_LIBRARY}
1376 ${BOOST_REGEX_LIBRARY} 1387 ${BOOST_REGEX_LIBRARY}
1377 ${BOOST_SIGNALS_LIBRARY} 1388 ${DBUSGLIB_LIBRARIES}
1378 ${OPENGL_LIBRARIES} 1389 ${OPENGL_LIBRARIES}
1379 ${FMODWRAPPER_LIBRARY} 1390 ${FMODWRAPPER_LIBRARY}
1380 ${OPENGL_LIBRARIES} 1391 ${OPENGL_LIBRARIES}
@@ -1462,24 +1473,27 @@ if (DARWIN)
1462 ) 1473 )
1463 1474
1464 if (PACKAGE) 1475 if (PACKAGE)
1465 add_custom_target(package 1476 add_custom_target(package ALL DEPENDS imprudence-bin)
1466 COMMAND
1467 ${PYTHON_EXECUTABLE}
1468 ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
1469 --grid=${GRID}
1470 --configuration=${CMAKE_CFG_INTDIR}
1471 --channel=${VIEWER_CHANNEL}
1472 --login_channel=${VIEWER_CHANNEL}
1473 --source=${CMAKE_CURRENT_SOURCE_DIR}
1474 --artwork=${ARTWORK_DIR}
1475 --build=${CMAKE_CURRENT_BINARY_DIR}
1476 --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app
1477 --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched
1478 DEPENDS
1479 imprudence-bin
1480 ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
1481 )
1482 add_dependencies(package mac-updater mac-crash-logger) 1477 add_dependencies(package mac-updater mac-crash-logger)
1478
1479 add_custom_command(
1480 TARGET package POST_BUILD
1481 COMMAND ${PYTHON_EXECUTABLE}
1482 ARGS
1483 ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
1484 --grid=${GRID}
1485 --configuration=${CMAKE_CFG_INTDIR}
1486 --channel=${VIEWER_CHANNEL}
1487 --login_channel=${VIEWER_LOGIN_CHANNEL}
1488 --source=${CMAKE_CURRENT_SOURCE_DIR}
1489 --artwork=${ARTWORK_DIR}
1490 --build=${CMAKE_CURRENT_BINARY_DIR}
1491 --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app
1492 --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched
1493 DEPENDS
1494 ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
1495 )
1496
1483 endif (PACKAGE) 1497 endif (PACKAGE)
1484endif (DARWIN) 1498endif (DARWIN)
1485 1499