Linux: Initial work to fix broken build, restore gstreamer 1.0

master
Pork Chop 2023-03-23 21:56:53 +11:00
parent eb13f813bd
commit 5c8d7d748b
12 changed files with 63 additions and 94 deletions

View File

@ -1551,16 +1551,6 @@
<key>name</key>
<string>windows64</string>
</map>
<key>linux64</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>e70898903475d8ac2e81ff33278fc987</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/89309/815433/jpegencoderbasic-1.0-windows64-564842.tar.bz2</string>
</map>
</map>
</map>
<key>version</key>
<string>1.0</string>

View File

@ -206,16 +206,40 @@ set(SIGNING_IDENTITY "Developer ID Application: The Phoenix Firestorm Project, I
endif (DARWIN)
if (LINUX OR DARWIN)
set(GCC_WARNINGS -Wall -Wno-sign-compare -Wno-trigraphs)
if (CMAKE_CXX_COMPILER MATCHES ".*clang")
set(CMAKE_COMPILER_IS_CLANGXX 1)
endif (CMAKE_CXX_COMPILER MATCHES ".*clang")
if (CMAKE_COMPILER_IS_GNUCXX)
set(GCC_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs")
elseif (CMAKE_COMPILER_IS_CLANGXX)
set(GCC_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs")
endif()
if (NOT GCC_DISABLE_FATAL_WARNINGS)
list(APPEND GCC_WARNINGS -Werror)
set(GCC_WARNINGS "${GCC_WARNINGS} -Werror")
endif (NOT GCC_DISABLE_FATAL_WARNINGS)
list(APPEND GCC_WARNINGS -Wno-reorder -Wno-non-virtual-dtor )
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" AND DARWIN AND XCODE_VERSION GREATER 4.9)
set(GCC_CXX_WARNINGS "$[GCC_WARNINGS] -Wno-reorder -Wno-unused-const-variable -Wno-format-extra-args -Wno-unused-private-field -Wno-unused-function -Wno-tautological-compare -Wno-empty-body -Wno-unused-variable -Wno-unused-value")
else (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" AND DARWIN AND XCODE_VERSION GREATER 4.9)
#elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
set(GCC_CXX_WARNINGS "${GCC_WARNINGS} -Wno-reorder -Wno-non-virtual-dtor -Wno-unused-variable")
endif ()
add_compile_options(${GCC_WARNINGS})
add_compile_options(-m${ADDRESS_SIZE})
if(LINUX)
set(GCC_CXX_WARNINGS "${GCC_WARNINGS} -Wno-reorder -Wno-non-virtual-dtor -Wno-unused-variable -Wno-unused-but-set-variable -Wno-pragmas -Wno-deprecated")
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0)
set(GCC_CXX_WARNINGS "${GCC_CXX_WARNINGS} -Wno-c++20-compat")
endif()
set(CMAKE_C_FLAGS "${GCC_WARNINGS} ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${GCC_CXX_WARNINGS} ${CMAKE_CXX_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m${ADDRESS_SIZE}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m${ADDRESS_SIZE}")
endif (LINUX OR DARWIN)

View File

@ -269,13 +269,13 @@ elseif(LINUX)
list( APPEND release_files
libapr-1.so.0
libaprutil-1.so.0
libfreetype.so.6.6.2
libfreetype.so.6
libhunspell-1.3.so.0.0.0
libuuid.so.16
libuuid.so.16.0.22
libfontconfig.so.1.10.1
libfontconfig.so.1
libgmodule-2.0.a
libgobject-2.0.a
)

View File

@ -6,10 +6,10 @@ add_library( ll::freetype INTERFACE IMPORTED )
if (LINUX)
find_package(Freetype REQUIRED) # <FS:PC> linux fontconfig and freetype should come from the user's system Linux links this via llwindow/CMakeLists
endif (LINUX)
target_link_libraries( ll::freetype INTERFACE Freetype::Freetype )
else ()
use_system_binary(freetype)
use_prebuilt_binary(freetype)
target_include_directories( ll::freetype SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/freetype2/)
target_link_libraries( ll::freetype INTERFACE freetype )
endif()

View File

@ -1,32 +1,13 @@
# -*- cmake -*-
include(Prebuilt)
include(GLIB)
if (NOT LINUX)
return()
endif()
if (USESYSTEMLIBS)
include(FindPkgConfig)
pkg_check_modules(GSTREAMER10 REQUIRED gstreamer-1.0)
pkg_check_modules(GSTREAMER10_PLUGINS_BASE REQUIRED gstreamer-plugins-base-1.0)
elseif (LINUX OR WINDOWS)
use_prebuilt_binary(gstreamer10)
use_prebuilt_binary(libxml2)
set(GSTREAMER10_FOUND ON FORCE BOOL)
set(GSTREAMER10_PLUGINS_BASE_FOUND ON FORCE BOOL)
set(GSTREAMER10_INCLUDE_DIRS
${GLIB_INCLUDE_DIRS}
${LIBS_PREBUILT_DIR}/include/gstreamer-1.0
${LIBS_PREBUILT_DIR}/include/libxml2
)
# We don't need to explicitly link against gstreamer itself, because
# LLMediaImplGStreamer probes for the system's copy at runtime.
set(GSTREAMER10_LIBRARIES)
endif (USESYSTEMLIBS)
if (GSTREAMER10_FOUND AND GSTREAMER10_PLUGINS_BASE_FOUND)
set(GSTREAMER10 ON CACHE BOOL "Build with GStreamer-1.0 streaming media support.")
endif (GSTREAMER10_FOUND AND GSTREAMER10_PLUGINS_BASE_FOUND)
if (GSTREAMER10)
add_definitions(-DLL_GSTREAMER10_ENABLED=1)
endif (GSTREAMER10)
add_library( ll::gstreamer INTERFACE IMPORTED )
target_compile_definitions( ll::gstreamer INTERFACE LL_GSTREAMER010_ENABLED=1)
use_system_binary(gstreamer10)
use_prebuilt_binary(gstreamer10)
use_prebuilt_binary(libxml2)
target_include_directories( ll::gstreamer SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/gstreamer-1.0)

View File

@ -6,8 +6,8 @@ if (LINUX)
add_library( ll::fontconfig INTERFACE IMPORTED )
if( NOT USE_CONAN )
find_package(Fontconfig REQUIRED) # <FS:PC> fontconfig and freetype should be taken from the
# use_prebuilt_binary(fontconfig) # user's system, and not be packaged with the viewer
find_package(Fontconfig REQUIRED) # <FS:PC> Use system wide Fontconfig
target_link_libraries( ll::fontconfig INTERFACE Fontconfig::Fontconfig )
else()
target_link_libraries( ll::fontconfig INTERFACE CONAN_PKG::fontconfig )
endif()
@ -18,4 +18,3 @@ if( NOT USE_CONAN )
endif()
use_prebuilt_binary(slvoice)

View File

@ -141,14 +141,14 @@ struct LLCalcParser : grammar<LLCalcParser>
power =
unary_expr[power.value = arg1] >>
*('^' >> assert_syntax(unary_expr[power.value = phoenix::bind(&powf)(power.value, arg1)]))
*('^' >> assert_syntax(unary_expr[power.value = phoenix::bind(&LLCalcParser::_pow)(self, power.value, arg1)]))
;
term =
power[term.value = arg1] >>
*(('*' >> assert_syntax(power[term.value *= arg1])) |
('/' >> assert_syntax(power[term.value /= arg1])) |
('%' >> assert_syntax(power[term.value = phoenix::bind(&fmodf)(term.value, arg1)]))
('%' >> assert_syntax(power[term.value = phoenix::bind(&LLCalcParser::_fmod)(self, term.value, arg1)]))
)
;

View File

@ -59,6 +59,11 @@ set(llwindow_LINK_LIBRARIES
ll::uilibraries
ll::SDL
)
if(LINUX)
set(llwindow_LINK_LIBRARIES ${llwindow_LINK_LIBRARIES} ll::fontconfig)
endif()
# Libraries on which this library depends, needed for Linux builds
# Sort by high-level to low-level
if (LINUX)

View File

@ -2,7 +2,7 @@
add_subdirectory(base)
if (LINUX)
add_subdirectory(gstreamer010)
add_subdirectory(gstreamer10)
add_subdirectory(cef)
#add_subdirectory(example)
endif (LINUX)

View File

@ -5,32 +5,18 @@ project(media_plugin_gstreamer10)
include(00-Common)
include(LLCommon)
include(LLImage)
include(LLPlugin)
include(LLMath)
include(LLRender)
include(LLWindow)
include(Linking)
include(PluginAPI)
include(MediaPluginBase)
include(OpenGL)
include(GLIB)
include(GStreamer10Plugin)
include_directories(
${LLPLUGIN_INCLUDE_DIRS}
${MEDIA_PLUGIN_BASE_INCLUDE_DIRS}
${LLCOMMON_INCLUDE_DIRS}
${LLMATH_INCLUDE_DIRS}
${LLIMAGE_INCLUDE_DIRS}
${LLRENDER_INCLUDE_DIRS}
${LLWINDOW_INCLUDE_DIRS}
${GSTREAMER10_INCLUDE_DIRS}
${GSTREAMER10_PLUGINS_BASE_INCLUDE_DIRS}
)
include_directories(SYSTEM
${LLCOMMON_SYSTEM_INCLUDE_DIRS}
)
### media_plugin_gstreamer10
@ -56,23 +42,8 @@ add_library(media_plugin_gstreamer10
)
target_link_libraries(media_plugin_gstreamer10
${LLPLUGIN_LIBRARIES}
${MEDIA_PLUGIN_BASE_LIBRARIES}
${LLCOMMON_LIBRARIES}
${PLUGIN_API_WINDOWS_LIBRARIES}
${GSTREAMER10_LIBRARIES}
media_plugin_base
ll::gstreamer
)
#add_dependencies(media_plugin_gstreamer10
# ${LLPLUGIN_LIBRARIES}
# ${MEDIA_PLUGIN_BASE_LIBRARIES}
# ${LLCOMMON_LIBRARIES}
#)
if (WINDOWS)
set_target_properties(
media_plugin_gstreamer10
PROPERTIES
LINK_FLAGS "/MANIFEST:NO /SAFESEH:NO /NODEFAULTLIB:LIBCMT"
)
endif (WINDOWS)

View File

@ -2413,7 +2413,6 @@ if (LINUX)
target_link_libraries(${VIEWER_BINARY_NAME}
"dl"
# <FS:Zi> I wish I knew how to make this cleaner, this looks like a mess
"fontconfig" # <FS:Zi> tried ll::fontconfig, didn't work
ll::vorbis
${GIO_LIBRARIES}
)
@ -2430,12 +2429,12 @@ if (LINUX)
${VIEWER_BINARY_NAME}
SLPlugin
media_plugin_cef
media_plugin_gstreamer010
media_plugin_gstreamer10
llcommon
linux-crash-logger
)
add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_gstreamer010 media_plugin_cef linux-crash-logger)
add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_gstreamer10 media_plugin_cef linux-crash-logger)
add_custom_command(
OUTPUT ${product}.tar.bz2

View File

@ -1929,7 +1929,7 @@ class LinuxManifest(ViewerManifest):
# plugins
with self.prefix(src=os.path.join(self.args['build'], os.pardir, 'media_plugins'), dst="bin/llplugin"):
self.path("gstreamer010/libmedia_plugin_gstreamer010.so", "libmedia_plugin_gstreamer.so")
self.path("gstreamer10/libmedia_plugin_gstreamer10.so", "libmedia_plugin_gstreamer.so")
self.path("cef/libmedia_plugin_cef.so", "libmedia_plugin_cef.so" )
# CEF files