Skip to content

Commit 95c2a6b

Browse files
authored
Merge pull request #2353 from secondlife/pepper/llapputil
Re-introduce llappearanceutility to viewer & add 2k bake support
2 parents 95afff0 + 3ce7709 commit 95c2a6b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+5248
-209
lines changed

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ indra/tools/vstool/* -text
2727
*.dll binary
2828
*.exe binary
2929

30+
# llapputil test data
31+
*.binary binary
32+
*.output binary
33+
3034
# Files with Windows line endings
3135
VivoxAUP.txt text eol=crlf
3236
FILES_ARE_UNICODE_UTF-16LE.txt text eol=crlf

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ jobs:
137137
libgl1-mesa-dev libglu1-mesa-dev libxinerama-dev \
138138
libxcursor-dev libxfixes-dev libgstreamer1.0-dev \
139139
libgstreamer-plugins-base1.0-dev ninja-build libxft-dev \
140-
llvm mold libpipewire-0.3-dev libdbus-1-dev
140+
llvm mold libpipewire-0.3-dev libosmesa6-dev libdbus-1-dev
141141
sudo locale-gen en_US.UTF-8
142142
sudo locale-gen en_GB.UTF-8
143143
sudo locale-gen fr_FR.UTF-8

autobuild.xml

Lines changed: 56 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,36 +1267,6 @@
12671267
<key>description</key>
12681268
<string>PNG Reference library</string>
12691269
</map>
1270-
<key>libuuid</key>
1271-
<map>
1272-
<key>platforms</key>
1273-
<map>
1274-
<key>linux64</key>
1275-
<map>
1276-
<key>archive</key>
1277-
<map>
1278-
<key>hash</key>
1279-
<string>fb89f1281dd54d8b99b339fc5b712b27</string>
1280-
<key>url</key>
1281-
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/p64_3p-libuuid/rev/314269/arch/Linux/installer/libuuid-1.6.2-linux64-314269.tar.bz2</string>
1282-
</map>
1283-
<key>name</key>
1284-
<string>linux64</string>
1285-
</map>
1286-
</map>
1287-
<key>license</key>
1288-
<string>UUID</string>
1289-
<key>license_file</key>
1290-
<string>LICENSES/uuid.txt</string>
1291-
<key>copyright</key>
1292-
<string>Copyright (c) 2004-2008 The OSSP Project &lt;http://www.ossp.org/&gt;</string>
1293-
<key>version</key>
1294-
<string>1.6.2</string>
1295-
<key>name</key>
1296-
<string>libuuid</string>
1297-
<key>description</key>
1298-
<string>OSSP uuid is a ISO-C:1999 application programming interface (API) and corresponding command line interface (CLI) for the generation of DCE 1.1, ISO/IEC 11578:1996 and RFC 4122 compliant Universally Unique Identifier (UUID). </string>
1299-
</map>
13001270
<key>libxml2</key>
13011271
<map>
13021272
<key>platforms</key>
@@ -1646,32 +1616,6 @@
16461616
<key>description</key>
16471617
<string>Luau is a fast, small, safe, gradually typed embeddable scripting language derived from Lua.</string>
16481618
</map>
1649-
<key>mesa</key>
1650-
<map>
1651-
<key>platforms</key>
1652-
<map>
1653-
<key>linux</key>
1654-
<map>
1655-
<key>archive</key>
1656-
<map>
1657-
<key>hash</key>
1658-
<string>22c50a5d362cad311b4f413cfcffbba2</string>
1659-
<key>url</key>
1660-
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/mesa_3p-update-mesa/rev/297294/arch/Linux/installer/mesa-7.11.1.297294-linux-297294.tar.bz2</string>
1661-
</map>
1662-
<key>name</key>
1663-
<string>linux</string>
1664-
</map>
1665-
</map>
1666-
<key>license</key>
1667-
<string>mesa</string>
1668-
<key>license_file</key>
1669-
<string>LICENSES/mesa.txt</string>
1670-
<key>version</key>
1671-
<string>7.11.1.297294</string>
1672-
<key>name</key>
1673-
<string>mesa</string>
1674-
</map>
16751619
<key>meshoptimizer</key>
16761620
<map>
16771621
<key>platforms</key>
@@ -3258,7 +3202,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
32583202
<map>
32593203
<key>configurations</key>
32603204
<map>
3261-
<key>Release</key>
3205+
<key>RelWithDebInfo</key>
32623206
<map>
32633207
<key>configure</key>
32643208
<map>
@@ -3289,9 +3233,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
32893233
<key>default</key>
32903234
<string>True</string>
32913235
<key>name</key>
3292-
<string>Release</string>
3236+
<string>RelWithDebInfo</string>
32933237
</map>
3294-
<key>ReleaseOS</key>
3238+
<key>RelWithDebInfoOS</key>
32953239
<map>
32963240
<key>configure</key>
32973241
<map>
@@ -3316,15 +3260,65 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
33163260
</array>
33173261
</map>
33183262
<key>name</key>
3319-
<string>ReleaseOS</string>
3263+
<string>RelWithDebInfoOS</string>
3264+
</map>
3265+
<key>Release</key>
3266+
<map>
3267+
<key>configure</key>
3268+
<map>
3269+
<key>options</key>
3270+
<array>
3271+
<string>-G</string>
3272+
<string>Unix Makefiles</string>
3273+
</array>
3274+
<key>arguments</key>
3275+
<array>
3276+
<string>../indra</string>
3277+
</array>
3278+
</map>
3279+
<key>build</key>
3280+
<map>
3281+
<key>command</key>
3282+
<string>cmake</string>
3283+
<key>options</key>
3284+
<array>
3285+
<string>--build</string>
3286+
<string>.</string>
3287+
<string>--config</string>
3288+
<string>Release</string>
3289+
<string>--parallel</string>
3290+
<string>$AUTOBUILD_CPU_COUNT</string>
3291+
</array>
3292+
</map>
3293+
<key>name</key>
3294+
<string>Release</string>
33203295
</map>
3321-
<key>default</key>
3296+
<key>ReleaseOS</key>
33223297
<map>
3298+
<key>configure</key>
3299+
<map>
3300+
<key>options</key>
3301+
<array>
3302+
<string>-G</string>
3303+
<string>Unix Makefiles</string>
3304+
</array>
3305+
</map>
33233306
<key>build</key>
33243307
<map>
3308+
<key>command</key>
3309+
<string>cmake</string>
3310+
<key>options</key>
3311+
<array>
3312+
<string>--build</string>
3313+
<string>.</string>
3314+
<string>--config</string>
3315+
<string>Release</string>
3316+
<string>--parallel</string>
3317+
<string>$AUTOBUILD_CPU_COUNT</string>
3318+
</array>
33253319
</map>
33263320
<key>name</key>
3327-
<string>default</string>
3321+
<string>ReleaseOS</string>
33283322
</map>
33293323
</map>
33303324
<key>build_directory</key>

indra/CMakeLists.txt

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ include(BuildVersion)
3737

3838
if (NOT CMAKE_BUILD_TYPE)
3939
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
40-
"Build type. One of: Debug Release RelWithDebInfo" FORCE)
40+
"Build type. One of: Release RelWithDebInfo" FORCE)
4141
endif (NOT CMAKE_BUILD_TYPE)
4242

4343
add_subdirectory(cmake)
@@ -85,17 +85,7 @@ if (ENABLE_MEDIA_PLUGINS)
8585
add_subdirectory(${LIBS_OPEN_PREFIX}media_plugins)
8686
endif (ENABLE_MEDIA_PLUGINS)
8787

88-
# if (LINUX)
89-
# if (INSTALL_PROPRIETARY)
90-
# include(LLAppearanceUtility)
91-
# add_subdirectory(${LLAPPEARANCEUTILITY_SRC_DIR} ${LLAPPEARANCEUTILITY_BIN_DIR})
92-
# endif (INSTALL_PROPRIETARY)
93-
# elseif (WINDOWS)
94-
# # cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake
95-
# if (EXISTS ${VIEWER_DIR}win_setup)
96-
# add_subdirectory(${VIEWER_DIR}win_setup)
97-
# endif (EXISTS ${VIEWER_DIR}win_setup)
98-
# endif (LINUX)
88+
add_subdirectory(${VIEWER_PREFIX}llappearanceutility)
9989

10090
if (WINDOWS)
10191
# cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake

indra/cmake/00-Common.cmake

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,20 @@
1111
#
1212
# Also realize that CMAKE_CXX_FLAGS may already be partially populated on
1313
# entry to this file.
14+
#
15+
# Additionally CMAKE_C_FLAGS is prepended to CMAKE_CXX_FLAGS_RELEASE and
16+
# CMAKE_CXX_FLAGS_RELWITHDEBINFO which risks having flags overriden by cmake
17+
# inserting additional options that are part of the build config type.
1418
#*****************************************************************************
1519
include_guard()
1620

1721
include(Variables)
1822
include(Linker)
1923

2024
# We go to some trouble to set LL_BUILD to the set of relevant compiler flags.
21-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} $ENV{LL_BUILD}")
25+
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} $ENV{LL_BUILD_RELEASE}")
26+
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} $ENV{LL_BUILD_RELWITHDEBINFO}")
27+
2228
# Given that, all the flags you see added below are flags NOT present in
2329
# https://bitbucket.org/lindenlab/viewer-build-variables/src/tip/variables.
2430
# Before adding new ones here, it's important to ask: can this flag really be
@@ -179,8 +185,6 @@ if (LINUX)
179185
endif (LINUX)
180186

181187
if (DARWIN)
182-
# Warnings should be fatal -- thanks, Nicky Perian, for spotting reversed default
183-
set(CLANG_DISABLE_FATAL_WARNINGS OFF)
184188
set(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names,-search_paths_first")
185189
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}")
186190
set(DARWIN_extra_cstar_flags "-Wno-deprecated-declarations")
@@ -208,9 +212,9 @@ if(LINUX OR DARWIN)
208212
add_compile_options(-Wno-stringop-truncation -Wno-parentheses -Wno-c++20-compat)
209213
endif()
210214

211-
if (NOT GCC_DISABLE_FATAL_WARNINGS)
215+
if (NOT GCC_DISABLE_FATAL_WARNINGS AND NOT CLANG_DISABLE_FATAL_WARNINGS)
212216
add_compile_options(-Werror)
213-
endif ()
217+
endif (NOT GCC_DISABLE_FATAL_WARNINGS AND NOT CLANG_DISABLE_FATAL_WARNINGS)
214218

215219
add_compile_options(${GCC_WARNINGS})
216220
add_compile_options(-m${ADDRESS_SIZE})

indra/cmake/Audio.cmake

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,10 @@ target_include_directories( ll::vorbis SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/inc
1111

1212
if (WINDOWS)
1313
target_link_libraries(ll::vorbis INTERFACE
14-
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libogg.lib
15-
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libogg.lib
16-
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libvorbisenc.lib
17-
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libvorbisenc.lib
18-
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libvorbisfile.lib
19-
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libvorbisfile.lib
20-
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libvorbis.lib
21-
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libvorbis.lib
14+
${ARCH_PREBUILT_DIRS_RELEASE}/libogg.lib
15+
${ARCH_PREBUILT_DIRS_RELEASE}/libvorbisenc.lib
16+
${ARCH_PREBUILT_DIRS_RELEASE}/libvorbisfile.lib
17+
${ARCH_PREBUILT_DIRS_RELEASE}/libvorbis.lib
2218
)
2319
else (WINDOWS)
2420
target_link_libraries(ll::vorbis INTERFACE vorbisfile vorbis ogg vorbisenc )

indra/cmake/EXPAT.cmake

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@ use_prebuilt_binary(expat)
99
if (WINDOWS)
1010
target_compile_definitions( ll::expat INTERFACE XML_STATIC=1)
1111
target_link_libraries( ll::expat INTERFACE
12-
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libexpatd.lib
13-
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libexpat.lib)
12+
${ARCH_PREBUILT_DIRS_RELEASE}/libexpat.lib)
1413
else ()
1514
target_link_libraries( ll::expat INTERFACE
16-
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libexpat.a
17-
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libexpat.a)
15+
${ARCH_PREBUILT_DIRS_RELEASE}/libexpat.a)
1816
endif ()
1917
target_include_directories( ll::expat SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include )

indra/cmake/LLAppearanceUtility.cmake

Lines changed: 0 additions & 12 deletions
This file was deleted.

indra/cmake/Linking.cmake

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ set(ARCH_PREBUILT_DIRS_PLUGINS ${AUTOBUILD_INSTALL_DIR}/plugins)
88
set(ARCH_PREBUILT_DIRS_RELEASE ${AUTOBUILD_INSTALL_DIR}/lib/release)
99
set(ARCH_PREBUILT_DIRS_DEBUG ${AUTOBUILD_INSTALL_DIR}/lib/debug)
1010

11-
if (WINDOWS OR DARWIN )
11+
if (LL_GENERATOR_IS_MULTI_CONFIG)
1212
# Kludge for older cmake versions, 3.20+ is needed to use a genex in add_custom_command( OUTPUT <var> ... )
1313
# Using this will work okay-ish, as Debug is not supported anyway. But for property multi config and also
1414
# ninja support the genex version is preferred.
@@ -23,15 +23,16 @@ if (WINDOWS OR DARWIN )
2323
set(SYMBOLS_STAGING_DIR ${CMAKE_BINARY_DIR}/symbols/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>/${VIEWER_CHANNEL})
2424
endif()
2525

26-
if( DARWIN )
27-
set( SHARED_LIB_STAGING_DIR ${SHARED_LIB_STAGING_DIR}/Resources)
28-
endif()
2926
set(EXE_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>)
30-
elseif (LINUX)
27+
else ()
3128
set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/lib)
3229
set(EXE_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/bin)
3330
endif ()
3431

32+
if( DARWIN )
33+
set( SHARED_LIB_STAGING_DIR ${SHARED_LIB_STAGING_DIR}/Resources)
34+
endif()
35+
3536
# Autobuild packages must provide 'release' versions of libraries, but may provide versions for
3637
# specific build types. AUTOBUILD_LIBS_INSTALL_DIRS lists first the build type directory and then
3738
# the 'release' directory (as a default fallback).

indra/cmake/Variables.cmake

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,24 @@
1212
# Switches set here and in 00-Common.cmake must agree with
1313
# https://bitbucket.org/lindenlab/viewer-build-variables/src/tip/variables
1414
# Reading $LL_BUILD is an attempt to directly use those switches.
15-
if ("$ENV{LL_BUILD}" STREQUAL "" AND "${LL_BUILD_ENV}" STREQUAL "" )
16-
message(FATAL_ERROR "Environment variable LL_BUILD must be set")
17-
elseif("$ENV{LL_BUILD}" STREQUAL "")
18-
set( ENV{LL_BUILD} "${LL_BUILD_ENV}" )
19-
message( "Setting ENV{LL_BUILD} to cached variable ${LL_BUILD_ENV}" )
15+
if ("$ENV{LL_BUILD_RELEASE}" STREQUAL "" AND "${LL_BUILD_RELEASE_ENV}" STREQUAL "" )
16+
message(FATAL_ERROR "Environment variable LL_BUILD_RELEASE must be set")
17+
elseif("$ENV{LL_BUILD_RELEASE}" STREQUAL "")
18+
set( ENV{LL_BUILD_RELEASE} "${LL_BUILD_RELEASE_ENV}" )
19+
message( "Setting ENV{LL_BUILD_RELEASE} to cached variable ${LL_BUILD_RELEASE_ENV}" )
2020
else()
21-
set( LL_BUILD_ENV "$ENV{LL_BUILD}" CACHE STRING "Save environment" FORCE )
21+
set( LL_BUILD_RELEASE_ENV "$ENV{LL_BUILD_RELEASE}" CACHE STRING "Save environment RELEASE" FORCE )
2222
endif ()
23+
24+
if ("$ENV{LL_BUILD_RELWITHDEBINFO}" STREQUAL "" AND "${LL_BUILD_RELWITHDEBINFO_ENV}" STREQUAL "" )
25+
message(FATAL_ERROR "Environment variable LL_BUILD_RELWITHDEBINFO must be set")
26+
elseif("$ENV{LL_BUILD_RELWITHDEBINFO}" STREQUAL "")
27+
set( ENV{LL_BUILD_RELWITHDEBINFO} "${LL_BUILD_RELWITHDEBINFO_ENV}" )
28+
message( "Setting ENV{LL_BUILD_RELWITHDEBINFO} to cached variable ${LL_BUILD_RELWITHDEBINFO_ENV}" )
29+
else()
30+
set( LL_BUILD_RELWITHDEBINFO_ENV "$ENV{LL_BUILD_RELWITHDEBINFO}" CACHE STRING "Save environment RELWITHDEBINFO" FORCE )
31+
endif ()
32+
2333
include_guard()
2434

2535
# Relative and absolute paths to subtrees.
@@ -67,7 +77,7 @@ set(TEMPLATE_VERIFIER_MASTER_URL "https://github.com/secondlife/master-message-t
6777

6878
if (NOT CMAKE_BUILD_TYPE)
6979
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
70-
"Build type. One of: Debug Release RelWithDebInfo" FORCE)
80+
"Build type. One of: Release RelWithDebInfo" FORCE)
7181
endif (NOT CMAKE_BUILD_TYPE)
7282

7383
# If someone has specified an address size, use that to determine the
@@ -129,11 +139,11 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
129139

130140
if (INSTALL_PROPRIETARY)
131141
# Only turn on headless if we can find osmesa libraries.
132-
include(FindPkgConfig)
133-
#pkg_check_modules(OSMESA osmesa)
134-
#if (OSMESA_FOUND)
135-
# set(BUILD_HEADLESS ON CACHE BOOL "Build headless libraries.")
136-
#endif (OSMESA_FOUND)
142+
find_package(PkgConfig)
143+
pkg_check_modules(OSMESA osmesa IMPORTED_TARGET GLOBAL)
144+
if (OSMESA_FOUND)
145+
set(BUILD_HEADLESS ON CACHE BOOL "Build headless libraries.")
146+
endif (OSMESA_FOUND)
137147
endif (INSTALL_PROPRIETARY)
138148

139149
endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")

0 commit comments

Comments
 (0)