SL-12707 Build Fails Without FMOD

Also adds correct working directory to RelWithDebInfoOS and enables OpenAl on OS builds for windows
meow-7.2.2
Andrey Kleshchev 2020-02-13 21:44:46 +02:00
parent 1b78d59dc1
commit b99fcdb30a
5 changed files with 60 additions and 25 deletions

View File

@ -3840,9 +3840,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<array>
<string>-G</string>
<string>${AUTOBUILD_WIN_CMAKE_GEN|NOTWIN}</string>
<string>-DUNATTENDED:BOOL=ON</string>
<string>-DINSTALL_PROPRIETARY=FALSE</string>
<string>-DUSE_KDU=FALSE</string>
<string>-DOPENAL:BOOL=ON</string>
</array>
</map>
<key>name</key>
@ -3913,6 +3913,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<string>-DUNATTENDED:BOOL=ON</string>
<string>-DINSTALL_PROPRIETARY=FALSE</string>
<string>-DUSE_KDU=FALSE</string>
<string>-DOPENAL:BOOL=ON</string>
</array>
</map>
<key>name</key>

View File

@ -71,6 +71,10 @@ if(WINDOWS)
endif(ADDRESS_SIZE EQUAL 32)
endif (FMODEX)
if (OPENAL)
list(APPEND release_files openal32.dll alut.dll)
endif (OPENAL)
#*******************************
# Copy MS C runtime dlls, required for packaging.
# *TODO - Adapt this to support VC9

View File

@ -60,6 +60,10 @@ if (FMODEX)
endif (FMODEX)
if (OPENAL)
include_directories(
${OPENAL_LIBRARIES}
)
list(APPEND llaudio_SOURCE_FILES
llaudioengine_openal.cpp
lllistener_openal.cpp

View File

@ -1618,6 +1618,10 @@ if (WINDOWS)
# causes those systems to run in a Windows 8 compatibility mode, which works.
LIST(APPEND viewer_SOURCE_FILES windows.manifest)
endif (ADDRESS_SIZE EQUAL 64)
if (OPENAL)
LIST(APPEND viewer_LIBRARIES ${OPENAL_LIBRARIES})
endif (OPENAL)
endif (WINDOWS)
# Add the xui files. This is handy for searching for xui elements
@ -1841,6 +1845,13 @@ if (WINDOWS)
)
endif (FMODEX)
if (OPENAL)
list(APPEND COPY_INPUT_DEPENDENCIES
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/OpenAL32.dll
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/alut.dll
)
endif (OPENAL)
add_custom_command(
OUTPUT ${CMAKE_CFG_INTDIR}/copy_touched.bat
COMMAND ${PYTHON_EXECUTABLE}
@ -1850,6 +1861,8 @@ if (WINDOWS)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
"--fmodex=${FMODEX}"
"--openal=${OPENAL}"
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=${CMAKE_BUILD_TYPE}
"--channel=${VIEWER_CHANNEL}"
@ -1911,6 +1924,8 @@ if (WINDOWS)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
"--fmodex=${FMODEX}"
"--openal=${OPENAL}"
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=${CMAKE_BUILD_TYPE}
"--channel=${VIEWER_CHANNEL}"
@ -2056,6 +2071,8 @@ if (LINUX)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
"--fmodex=${FMODEX}"
"--openal=${OPENAL}"
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=${CMAKE_BUILD_TYPE}
"--channel=${VIEWER_CHANNEL}"
@ -2082,6 +2099,8 @@ if (LINUX)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
"--fmodex=${FMODEX}"
"--openal=${OPENAL}"
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=${CMAKE_BUILD_TYPE}
"--channel=${VIEWER_CHANNEL}"
@ -2158,6 +2177,8 @@ if (DARWIN)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
"--fmodex=${FMODEX}"
"--openal=${OPENAL}"
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=${CMAKE_BUILD_TYPE}
--bundleid=${MACOSX_BUNDLE_GUI_IDENTIFIER}
@ -2192,6 +2213,8 @@ if (DARWIN)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
"--fmodex=${FMODEX}"
"--openal=${OPENAL}"
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=${CMAKE_BUILD_TYPE}
"--channel=${VIEWER_CHANNEL}"

View File

@ -513,14 +513,17 @@ class WindowsManifest(ViewerManifest):
print err.message
print "Skipping GLOD library (assumming linked statically)"
# Get fmodex dll, continue if missing
try:
if(self.address_size == 64):
self.path("fmodex64.dll")
else:
self.path("fmodex.dll")
except:
print "Skipping fmodex audio library(assuming other audio engine)"
if self.args['fmodex'] == 'ON':
# Get fmodex dll
if(self.address_size == 64):
self.path("fmodex64.dll")
else:
self.path("fmodex.dll")
if self.args['openal'] == 'ON':
# Get openal dll
self.path("OpenAL32.dll")
self.path("alut.dll")
# For textures
self.path("openjpeg.dll")
@ -1047,17 +1050,18 @@ class DarwinManifest(ViewerManifest):
self.path2basename(relpkgdir, libfile)
# dylibs that vary based on configuration
if self.args['configuration'].lower() == 'debug':
for libfile in (
"libfmodexL.dylib",
):
dylibs += path_optional(os.path.join(debpkgdir, libfile), libfile)
else:
for libfile in (
"libfmodex.dylib",
):
dylibs += path_optional(os.path.join(relpkgdir, libfile), libfile)
if self.args['fmodex'] == 'ON':
if self.args['configuration'].lower() == 'debug':
for libfile in (
"libfmodexL.dylib",
):
dylibs += path_optional(os.path.join(debpkgdir, libfile), libfile)
else:
for libfile in (
"libfmodex.dylib",
):
dylibs += path_optional(os.path.join(relpkgdir, libfile), libfile)
# our apps
executable_path = {}
for app_bld_dir, app in (("mac_crash_logger", "mac-crash-logger.app"),
@ -1519,13 +1523,9 @@ class Linux_i686_Manifest(LinuxManifest):
print "tcmalloc files not found, skipping"
pass
try:
if self.args['fmodex'] == 'ON':
self.path("libfmodex-*.so")
self.path("libfmodex.so")
pass
except:
print "Skipping libfmodex.so - not found"
pass
# Vivox runtimes
@ -1552,9 +1552,12 @@ class Linux_x86_64_Manifest(LinuxManifest):
################################################################
if __name__ == "__main__":
# fmodex and openal can be used simultaneously and controled by environment
extra_arguments = [
dict(name='bugsplat', description="""BugSplat database to which to post crashes,
if BugSplat crash reporting is desired""", default=''),
dict(name='fmodex', description="""Indication that fmodex libraries are needed""", default='OFF'),
dict(name='openal', description="""Indication openal libraries are needed""", default='OFF'),
]
try:
main(extra=extra_arguments)