Remove support for building with system libraries

This commit is contained in:
Martin Natano
2022-05-31 18:21:35 +02:00
parent 5f08636ad0
commit 327278436d
26 changed files with 1389 additions and 1969 deletions
+3 -48
View File
@@ -4,7 +4,7 @@ name: Continuous integration
jobs: jobs:
ubuntu-build-bundled: ubuntu-build-bundled:
name: "Ubuntu: Build with bundled libraries" name: Ubuntu
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@@ -32,53 +32,8 @@ jobs:
- name: Build - name: Build
run: cmake --build build run: cmake --build build
ubuntu-build-system:
name: "Ubuntu: Build with system libraries"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout submodules
run: git submodule update --init
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y
ffmpeg
libasound2-dev
libgl-dev
libglew-dev
libgtk-3-dev
libjack-dev
libjsoncpp-dev
libmad0-dev
libpng-dev
libpulse-dev
libtomcrypt-dev
libtommath-dev
libudev-dev
libva-dev
libvorbis-dev
libxinerama-dev
libx11-dev
libxrandr-dev
libxtst-dev
ninja-build
- name: Configure
run: cmake -G Ninja -B build
-DWITH_SYSTEM_FFMPEG=ON
-DWITH_SYSTEM_GLEW=ON
-DWITH_SYSTEM_JPEG=ON
-DWITH_SYSTEM_JSONCPP=ON
-DWITH_SYSTEM_MAD=ON
-DWITH_SYSTEM_OGG=ON
-DWITH_SYSTEM_PCRE=ON
-DWITH_SYSTEM_PNG=ON
-DWITH_SYSTEM_TOMCRYPT=ON
-DWITH_SYSTEM_TOMMATH=ON
-DWITH_SYSTEM_ZLIB=ON
- name: Build
run: cmake --build build
macos-build-bundled: macos-build-bundled:
name: "macOS: Build with bundled libraries" name: macOS
runs-on: macos-latest runs-on: macos-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@@ -93,7 +48,7 @@ jobs:
run: cmake --build build run: cmake --build build
windows-build-bundled: windows-build-bundled:
name: "Windows: Build with bundled libraries" name: Windows
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
-27
View File
@@ -27,34 +27,11 @@ option(
"Build without the ROLC assembly instructions for tomcrypt." "Build without the ROLC assembly instructions for tomcrypt."
OFF) OFF)
# Turn this option off to disable using WAV files with the game. Note that it is
# recommended to keep this on.
option(WITH_WAV "Build with WAV Support." ON)
# Turn this option off to disable using MP3 files with the game.
option(WITH_MP3 "Build with MP3 Support." ON)
# Turn this option off to disable using OGG files with the game.
option(WITH_OGG "Build with OGG/Vorbis Support." ON)
# Turn this option on to log every segment added or removed. # Turn this option on to log every segment added or removed.
option(WITH_LOGGING_TIMING_DATA option(WITH_LOGGING_TIMING_DATA
"Build with logging all Add and Erase Segment calls." OFF) "Build with logging all Add and Erase Segment calls." OFF)
option(WITH_SYSTEM_PNG "Build with system PNG library (may not work on 1.6+)"
OFF)
option(WITH_SYSTEM_OGG "Build with system OGG libraries" OFF)
option(WITH_SYSTEM_GLEW "Build with system GLEW library" OFF)
option(WITH_SYSTEM_TOMCRYPT "Build with system libtomcrypt" OFF)
option(WITH_SYSTEM_MAD "Build with system libmad" OFF)
option(WITH_SYSTEM_JSONCPP "Build with system jsoncpp" OFF)
option(WITH_SYSTEM_JPEG "Build with system jpeglib" OFF)
option(WITH_SYSTEM_PCRE "Build with system PCRE" OFF)
option(WITH_SYSTEM_ZLIB "Build against system zlib" OFF)
if(NOT MSVC) if(NOT MSVC)
# Turn this option off to disable using FFMEPG.
option(WITH_FFMPEG "Build with FFMPEG." ON)
# Change this number to utilize a different number of jobs for building # Change this number to utilize a different number of jobs for building
# FFMPEG. # FFMPEG.
option(WITH_FFMPEG_JOBS "Build FFMPEG with this many jobs." 2) option(WITH_FFMPEG_JOBS "Build FFMPEG with this many jobs." 2)
@@ -71,10 +48,6 @@ endif()
if(WIN32) if(WIN32)
option(WITH_MINIMAID "Build with Minimaid Lights Support." OFF) option(WITH_MINIMAID "Build with Minimaid Lights Support." OFF)
elseif(LINUX) elseif(LINUX)
# Builder beware: later versions of ffmpeg may break!
option(WITH_SYSTEM_FFMPEG
"Build with the system's FFMPEG, disabled build with bundled's FFMPEG"
OFF)
option(WITH_MINIMAID "Build with Minimaid Lights Support." OFF) option(WITH_MINIMAID "Build with Minimaid Lights Support." OFF)
option(WITH_TTY "Build with Linux TTY Input Support." OFF) option(WITH_TTY "Build with Linux TTY Input Support." OFF)
option(WITH_PROFILING "Build with Profiling Support." OFF) option(WITH_PROFILING "Build with Profiling Support." OFF)
-141
View File
@@ -1,141 +0,0 @@
# This was copied from the robotology/ycm project.
# .rst: FindFFMPEG
# ----------
#
# Find the native FFMPEG includes and library
#
# This module defines::
#
# FFMPEG_INCLUDE_DIR, where to find avcodec.h, avformat.h ... FFMPEG_LIBRARIES,
# the libraries to link against to use FFMPEG. FFMPEG_FOUND, If false, do not
# try to use FFMPEG.
#
# also defined, but not for general use are::
#
# FFMPEG_avformat_LIBRARY, where to find the FFMPEG avformat library.
# FFMPEG_avcodec_LIBRARY, where to find the FFMPEG avcodec library.
#
# This is useful to do it this way so that we can always add more libraries if
# needed to ``FFMPEG_LIBRARIES`` if ffmpeg ever changes...
# =============================================================================
# Copyright: 1993-2008 Ken Martin, Will Schroeder, Bill Lorensen
#
# Distributed under the OSI-approved BSD License (the "License"); see
# accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# License for more information.
# =============================================================================
# (To distribute this file outside of YCM, substitute the full License text for
# the above reference.)
# Originally from VTK project
find_path(FFMPEG_INCLUDE_DIR
libavformat/avformat.h
$ENV{FFMPEG_DIR}
$ENV{FFMPEG_DIR}/ffmpeg
$ENV{FFMPEG_DIR}/include/ffmpeg
/usr/local/include/ffmpeg
/usr/include/ffmpeg
/usr/include/
/usr/local/include/)
find_library(FFMPEG_avformat_LIBRARY
avformat
$ENV{FFMPEG_DIR}
$ENV{FFMPEG_DIR}/lib
$ENV{FFMPEG_DIR}/libavformat
/usr/local/lib
/usr/lib)
find_library(FFMPEG_avcodec_LIBRARY
avcodec
$ENV{FFMPEG_DIR}
$ENV{FFMPEG_DIR}/lib
$ENV{FFMPEG_DIR}/libavcodec
/usr/local/lib
/usr/lib)
find_library(FFMPEG_avutil_LIBRARY
avutil
$ENV{FFMPEG_DIR}
$ENV{FFMPEG_DIR}/lib
$ENV{FFMPEG_DIR}/libavutil
/usr/local/lib
/usr/lib)
if(NOT DISABLE_SWSCALE)
find_library(FFMPEG_swscale_LIBRARY
swscale
$ENV{FFMPEG_DIR}
$ENV{FFMPEG_DIR}/lib
$ENV{FFMPEG_DIR}/libswscale
/usr/local/lib
/usr/lib)
endif(NOT DISABLE_SWSCALE)
find_library(FFMPEG_avdevice_LIBRARY
avdevice
$ENV{FFMPEG_DIR}
$ENV{FFMPEG_DIR}/lib
$ENV{FFMPEG_DIR}/libavdevice
/usr/local/lib
/usr/lib)
find_library(_FFMPEG_z_LIBRARY_
z
$ENV{FFMPEG_DIR}
$ENV{FFMPEG_DIR}/lib
/usr/local/lib
/usr/lib)
if(FFMPEG_INCLUDE_DIR)
if(FFMPEG_avformat_LIBRARY)
if(FFMPEG_avcodec_LIBRARY)
if(FFMPEG_avutil_LIBRARY)
set(FFMPEG_FOUND "YES")
set(FFMPEG_LIBRARIES
${FFMPEG_avformat_LIBRARY}
${FFMPEG_avcodec_LIBRARY}
${FFMPEG_avutil_LIBRARY})
if(FFMPEG_swscale_LIBRARY)
set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${FFMPEG_swscale_LIBRARY})
endif()
if(FFMPEG_avdevice_LIBRARY)
set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${FFMPEG_avdevice_LIBRARY})
endif()
if(_FFMPEG_z_LIBRARY_)
set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${_FFMPEG_z_LIBRARY_})
endif()
endif()
endif()
endif()
endif()
mark_as_advanced(FFMPEG_INCLUDE_DIR
FFMPEG_INCLUDE_DIR1
FFMPEG_INCLUDE_DIR2
FFMPEG_INCLUDE_DIR3
FFMPEG_INCLUDE_DIR4
FFMPEG_INCLUDE_DIR5
FFMPEG_avformat_LIBRARY
FFMPEG_avcodec_LIBRARY
FFMPEG_avutil_LIBRARY
FFMPEG_swscale_LIBRARY
FFMPEG_avdevice_LIBRARY
_FFMPEG_z_LIBRARY_)
# Set package properties if FeatureSummary was included
if(COMMAND set_package_properties)
set_package_properties(
FFMPEG
PROPERTIES
DESCRIPTION
"A complete, cross-platform solution to record, convert and stream audio and video"
)
set_package_properties(FFMPEG PROPERTIES URL "http://ffmpeg.org/")
endif()
-11
View File
@@ -1,11 +0,0 @@
find_path(LIBMAD_INCLUDE_DIR mad.h)
find_library(LIBMAD_LIBRARY mad)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LIBMAD
DEFAULT_MSG
LIBMAD_LIBRARY
LIBMAD_INCLUDE_DIR)
mark_as_advanced(LIBMAD_LIBRARY LIBMAD_INCLUDE_DIR)
-15
View File
@@ -1,15 +0,0 @@
# Borrowed from code.openhub.net
# Base Io build system Written by Jeremy Tregunna <[email protected]>
#
# Find libogg.
find_path(OGG_INCLUDE_DIR ogg/ogg.h)
set(OGG_NAMES ${OGG_NAMES} ogg libogg)
find_library(OGG_LIBRARY NAMES ${OGG_NAMES} PATH)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(OGG DEFAULT_MSG OGG_LIBRARY OGG_INCLUDE_DIR)
mark_as_advanced(OGG_LIBRARY OGG_INCLUDE_DIR)
-17
View File
@@ -1,17 +0,0 @@
# Find pcre using standard tools.
# The following will be set:
# PCRE_INCLUDE_DIR PCRE_LIBRARY PCRE_FOUND
find_path(PCRE_INCLUDE_DIR NAMES pcre.h)
find_library(PCRE_LIBRARY NAMES pcre)
# Properly pass QUIETLY and REQUIRED.
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PCRE
DEFAULT_MSG
PCRE_INCLUDE_DIR
PCRE_LIBRARY)
mark_as_advanced(PCRE_INCLUDE_DIR PCRE_LIBRARY)
-18
View File
@@ -1,18 +0,0 @@
# Borrowed from code.openhub.net
# Base Io build system Written by Jeremy Tregunna <[email protected]>
#
# Find libvorbis.
find_path(VORBIS_INCLUDE_DIR vorbis/codec.h)
set(VORBIS_NAMES ${VORBIS_NAMES} vorbis libvorbis)
find_library(VORBIS_LIBRARY NAMES ${VORBIS_NAMES} PATH)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(VORBIS
DEFAULT_MSG
VORBIS_LIBRARY
VORBIS_INCLUDE_DIR)
mark_as_advanced(VORBIS_LIBRARY VORBIS_INCLUDE_DIR)
-16
View File
@@ -1,16 +0,0 @@
# Inspired by Jeremy Tregunna's cmake work <[email protected]>
#
# Find libvorbisfile.
find_path(VORBISFILE_INCLUDE_DIR vorbis/vorbisfile.h)
set(VORBISFILE_NAMES ${VORBISFILE_NAMES} vorbisfile libvorbisfile)
find_library(VORBISFILE_LIBRARY NAMES ${VORBISFILE_NAMES} PATH)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(VORBISFILE
DEFAULT_MSG
VORBISFILE_LIBRARY
VORBISFILE_INCLUDE_DIR)
mark_as_advanced(VORBISFILE_LIBRARY VORBISFILE_INCLUDE_DIR)
+3 -72
View File
@@ -196,46 +196,6 @@ endif()
# Dependencies go here. # Dependencies go here.
include(ExternalProject) include(ExternalProject)
if(WITH_WAV)
# TODO: Identify which headers to check for ensuring this will always work.
set(HAS_WAV TRUE)
endif()
if(WITH_MP3)
if(WIN32 OR MACOSX)
set(HAS_MP3 TRUE)
else()
find_package(Mad)
if(NOT LIBMAD_FOUND)
message(
FATAL_ERROR
"Libmad library not found. If you wish to skip mp3 support, set WITH_MP3 to OFF when configuring."
)
else()
set(HAS_MP3 TRUE)
endif()
endif()
endif(WITH_MP3)
if(WITH_OGG)
if(WIN32 OR MACOSX)
set(HAS_OGG TRUE)
else()
find_package(Ogg)
find_package(Vorbis)
find_package(VorbisFile)
if(NOT (OGG_FOUND AND VORBIS_FOUND AND VORBISFILE_FOUND))
message(
FATAL_ERROR
"Not all vorbis libraries were found. If you wish to skip vorbis support, set WITH_OGG to OFF when configuring."
)
else()
set(HAS_OGG TRUE)
endif()
endif()
endif()
find_package(nasm) find_package(nasm)
find_package(yasm) find_package(yasm)
@@ -259,9 +219,8 @@ else()
endif() endif()
if(WIN32) if(WIN32)
if(MINGW AND WITH_FFMPEG AND NOT WITH_SYSTEM_FFMPEG) if(MINGW)
include("${SM_CMAKE_DIR}/SetupFfmpeg.cmake") include("${SM_CMAKE_DIR}/SetupFfmpeg.cmake")
set(HAS_FFMPEG TRUE)
else() else()
# FFMPEG...it can be evil. # FFMPEG...it can be evil.
find_library(LIB_SWSCALE find_library(LIB_SWSCALE
@@ -300,10 +259,7 @@ if(WIN32)
endforeach() endforeach()
endif() endif()
elseif(MACOSX) elseif(MACOSX)
if(WITH_FFMPEG AND NOT WITH_SYSTEM_FFMPEG)
include("${SM_CMAKE_DIR}/SetupFfmpeg.cmake") include("${SM_CMAKE_DIR}/SetupFfmpeg.cmake")
set(HAS_FFMPEG TRUE)
endif()
set(WITH_CRASH_HANDLER TRUE) set(WITH_CRASH_HANDLER TRUE)
set(CMAKE_OSX_ARCHITECTURES arm64;x86_64) set(CMAKE_OSX_ARCHITECTURES arm64;x86_64)
@@ -340,11 +296,9 @@ elseif(MACOSX)
MAC_FRAME_OPENGL MAC_FRAME_OPENGL
MAC_FRAME_SYSTEM) MAC_FRAME_SYSTEM)
if(HAS_FFMPEG)
find_library(MAC_FRAME_COREMEDIA CoreMedia ${CMAKE_SYSTEM_FRAMEWORK_PATH} REQUIRED) find_library(MAC_FRAME_COREMEDIA CoreMedia ${CMAKE_SYSTEM_FRAMEWORK_PATH} REQUIRED)
find_library(MAC_FRAME_COREVIDEO CoreVideo ${CMAKE_SYSTEM_FRAMEWORK_PATH} REQUIRED) find_library(MAC_FRAME_COREVIDEO CoreVideo ${CMAKE_SYSTEM_FRAMEWORK_PATH} REQUIRED)
find_library(MAC_FRAME_VIDEOTOOLBOX VideoToolbox ${CMAKE_SYSTEM_FRAMEWORK_PATH} REQUIRED) find_library(MAC_FRAME_VIDEOTOOLBOX VideoToolbox ${CMAKE_SYSTEM_FRAMEWORK_PATH} REQUIRED)
endif()
elseif(LINUX) elseif(LINUX)
if(WITH_GTK3) if(WITH_GTK3)
find_package("GTK3" 2.0) find_package("GTK3" 2.0)
@@ -424,37 +378,14 @@ elseif(LINUX)
) )
endif() endif()
if(WITH_FFMPEG AND NOT YASM_FOUND AND NOT NASM_FOUND) if(NOT YASM_FOUND AND NOT NASM_FOUND)
message( message(FATAL_ERROR
"Neither NASM nor YASM were found. Please install at least one of them if you wish for ffmpeg support." "Neither NASM nor YASM were found. Please install at least one of them if you wish for ffmpeg support."
) )
set(WITH_FFMPEG OFF)
endif() endif()
if(WITH_FFMPEG)
if(WITH_SYSTEM_FFMPEG)
find_package("FFMPEG")
if(NOT FFMPEG_FOUND)
message(
FATAL_ERROR
"System ffmpeg not found! Either install the libraries or remove the argument, then try again."
)
else()
message(
STATUS
"-- Warning! Your version of ffmpeg may be too high! If you want to use the system ffmpeg, clear your cmake cache and do not include the system ffmpeg argument."
)
set(HAS_FFMPEG TRUE)
endif()
else()
find_package("Va") find_package("Va")
include("${SM_CMAKE_DIR}/SetupFfmpeg.cmake") include("${SM_CMAKE_DIR}/SetupFfmpeg.cmake")
set(HAS_FFMPEG TRUE)
endif()
else()
set(HAS_FFMPEG FALSE)
endif()
set(OpenGL_GL_PREFERENCE GLVND) set(OpenGL_GL_PREFERENCE GLVND)
find_package(OpenGL REQUIRED) find_package(OpenGL REQUIRED)
-8
View File
@@ -4,17 +4,9 @@ include(CMakeProject-json.cmake)
include(CMakeProject-mad.cmake) include(CMakeProject-mad.cmake)
include(CMakeProject-zlib.cmake) include(CMakeProject-zlib.cmake)
include(CMakeProject-jpeg.cmake) include(CMakeProject-jpeg.cmake)
if(WITH_OGG)
if(WITH_SYSTEM_OGG)
find_package(Ogg REQUIRED)
find_package(Vorbis REQUIRED)
find_package(VorbisFile REQUIRED)
else()
include(CMakeProject-ogg.cmake) include(CMakeProject-ogg.cmake)
include(CMakeProject-vorbis.cmake) include(CMakeProject-vorbis.cmake)
include(CMakeProject-vorbisfile.cmake) include(CMakeProject-vorbisfile.cmake)
endif()
endif()
include(CMakeProject-pcre.cmake) include(CMakeProject-pcre.cmake)
include(CMakeProject-tomcrypt.cmake) include(CMakeProject-tomcrypt.cmake)
include(CMakeProject-tommath.cmake) include(CMakeProject-tommath.cmake)
-8
View File
@@ -1,10 +1,3 @@
if(WITH_SYSTEM_GLEW)
find_package(GLEW REQUIRED)
set(GLEW_INCLUDE_DIRS ${GLEW_INCLUDE_DIRS} PARENT_SCOPE)
set(GLEW_LIBRARIES ${GLEW_LIBRARIES} PARENT_SCOPE)
set(GLEW_LIBRARY_RELEASE ${GLEW_LIBRARY_RELEASE} PARENT_SCOPE)
else()
set(GLEW_SRC "glew/src/glew.c") set(GLEW_SRC "glew/src/glew.c")
set(GLEW_HPP "glew/include/GL/eglew.h" set(GLEW_HPP "glew/include/GL/eglew.h"
@@ -25,4 +18,3 @@ else()
endif(MSVC) endif(MSVC)
target_include_directories("glew" PUBLIC "glew/include") target_include_directories("glew" PUBLIC "glew/include")
endif()
-5
View File
@@ -1,7 +1,3 @@
if(WITH_SYSTEM_JPEG)
find_package(JPEG REQUIRED)
set(JPEG_LIBRARIES ${JPEG_LIBRARIES} PARENT_SCOPE)
else()
configure_file("config.jpeg.in.h" "libjpeg/jconfig.h") configure_file("config.jpeg.in.h" "libjpeg/jconfig.h")
set(JPEG_SRC "libjpeg/cjpegalt.c" set(JPEG_SRC "libjpeg/cjpegalt.c"
@@ -94,4 +90,3 @@ else()
"libjpeg" "libjpeg"
"${CMAKE_CURRENT_BINARY_DIR}/libjpeg" "${CMAKE_CURRENT_BINARY_DIR}/libjpeg"
) )
endif()
-5
View File
@@ -1,7 +1,3 @@
if(WITH_SYSTEM_JSONCPP)
find_package(PkgConfig REQUIRED)
pkg_check_modules(JSONCPP REQUIRED jsoncpp)
else()
set(JSON_SRC "jsoncpp/jsoncpp.cpp") set(JSON_SRC "jsoncpp/jsoncpp.cpp")
set(JSON_HPP "jsoncpp/json/json-forwards.h" set(JSON_HPP "jsoncpp/json/json-forwards.h"
@@ -23,4 +19,3 @@ else()
if(MSVC) if(MSVC)
target_compile_definitions("jsoncpp" PRIVATE _CRT_SECURE_NO_WARNINGS) target_compile_definitions("jsoncpp" PRIVATE _CRT_SECURE_NO_WARNINGS)
endif() endif()
endif()
-4
View File
@@ -1,6 +1,3 @@
if(WITH_SYSTEM_MAD)
find_package(Mad REQUIRED)
else()
set(MAD_SRC "libmad/bit.c" set(MAD_SRC "libmad/bit.c"
"libmad/decoder.c" "libmad/decoder.c"
"libmad/fixed.c" "libmad/fixed.c"
@@ -76,4 +73,3 @@ else()
target_include_directories("mad" PUBLIC "libmad") target_include_directories("mad" PUBLIC "libmad")
configure_file("config.mad.in.h" "libmad/config.h") configure_file("config.mad.in.h" "libmad/config.h")
endif()
-4
View File
@@ -1,6 +1,3 @@
if(WITH_SYSTEM_PCRE)
find_package(Pcre REQUIRED)
else()
set(PCRE_SRC "pcre/pcre_byte_order.c" set(PCRE_SRC "pcre/pcre_byte_order.c"
"pcre/pcre_chartables.c" "pcre/pcre_chartables.c"
"pcre/pcre_compile.c" "pcre/pcre_compile.c"
@@ -46,4 +43,3 @@ else()
"pcre" "pcre"
"${CMAKE_CURRENT_BINARY_DIR}/pcre" "${CMAKE_CURRENT_BINARY_DIR}/pcre"
) )
endif()
+2 -9
View File
@@ -1,9 +1,4 @@
if(WITH_SYSTEM_PNG) set(PNG_SRC "libpng/png.c"
find_package(PNG REQUIRED)
set(PNG_LIBRARIES ${PNG_LIBRARIES} PARENT_SCOPE)
else()
set(PNG_SRC
"libpng/png.c"
"libpng/pngerror.c" "libpng/pngerror.c"
"libpng/pngget.c" "libpng/pngget.c"
"libpng/pngmem.c" "libpng/pngmem.c"
@@ -24,8 +19,7 @@ else()
"libpng/pnglibconf.h" "libpng/pnglibconf.h"
COPYONLY) COPYONLY)
set(PNG_HPP set(PNG_HPP "libpng/png.h"
"libpng/png.h"
"libpng/pngconf.h" "libpng/pngconf.h"
"libpng/pngdebug.h" "libpng/pngdebug.h"
"libpng/pnginfo.h" "libpng/pnginfo.h"
@@ -54,4 +48,3 @@ else()
"libpng" "libpng"
"${CMAKE_CURRENT_BINARY_DIR}/libpng" "${CMAKE_CURRENT_BINARY_DIR}/libpng"
) )
endif()
+2 -8
View File
@@ -1,8 +1,4 @@
if(WITH_SYSTEM_TOMCRYPT) set(TOMCRYPT_SRC "libtomcrypt/src/ciphers/anubis.c"
find_library(TOMCRYPT_LIBRARY tomcrypt)
else()
set(TOMCRYPT_SRC
"libtomcrypt/src/ciphers/anubis.c"
"libtomcrypt/src/ciphers/blowfish.c" "libtomcrypt/src/ciphers/blowfish.c"
"libtomcrypt/src/ciphers/camellia.c" "libtomcrypt/src/ciphers/camellia.c"
"libtomcrypt/src/ciphers/cast5.c" "libtomcrypt/src/ciphers/cast5.c"
@@ -408,8 +404,7 @@ else()
"libtomcrypt/src/stream/rc4/rc4_stream.c" "libtomcrypt/src/stream/rc4/rc4_stream.c"
"libtomcrypt/src/stream/rc4/rc4_test.c" "libtomcrypt/src/stream/rc4/rc4_test.c"
"libtomcrypt/src/stream/sober128/sober128_stream.c" "libtomcrypt/src/stream/sober128/sober128_stream.c"
"libtomcrypt/src/stream/sober128/sober128_test.c" "libtomcrypt/src/stream/sober128/sober128_test.c")
)
set(TOMCRYPT_HPP "libtomcrypt/src/headers/tomcrypt.h" set(TOMCRYPT_HPP "libtomcrypt/src/headers/tomcrypt.h"
"libtomcrypt/src/headers/tomcrypt_argchk.h" "libtomcrypt/src/headers/tomcrypt_argchk.h"
@@ -486,4 +481,3 @@ else()
target_link_libraries("tomcrypt" "tommath") target_link_libraries("tomcrypt" "tommath")
target_include_directories("tomcrypt" PUBLIC "libtomcrypt/src/headers") target_include_directories("tomcrypt" PUBLIC "libtomcrypt/src/headers")
endif()
-7
View File
@@ -1,9 +1,3 @@
if(WITH_SYSTEM_TOMMATH)
find_library(TOMMATH_LIBRARY tommath)
if(TOMMATH_LIBRARY MATCHES "TOMMATH_LIBRARY-NOTFOUND")
message(FATAL_ERROR "Need tommath.")
endif()
else()
set(TOMMATH_SRC "libtommath/bn_cutoffs.c" set(TOMMATH_SRC "libtommath/bn_cutoffs.c"
"libtommath/bn_deprecated.c" "libtommath/bn_deprecated.c"
"libtommath/bn_mp_2expt.c" "libtommath/bn_mp_2expt.c"
@@ -184,4 +178,3 @@ else()
disable_project_warnings("tommath") disable_project_warnings("tommath")
target_include_directories("tommath" PUBLIC "libtommath") target_include_directories("tommath" PUBLIC "libtommath")
endif()
-4
View File
@@ -1,6 +1,3 @@
if(WITH_SYSTEM_ZLIB)
find_package(ZLIB REQUIRED)
else()
set(ZLIB_SRC "zlib/adler32.c" set(ZLIB_SRC "zlib/adler32.c"
"zlib/compress.c" "zlib/compress.c"
"zlib/crc32.c" "zlib/crc32.c"
@@ -42,4 +39,3 @@ else()
endif(MSVC) endif(MSVC)
target_include_directories("zlib" PUBLIC "zlib") target_include_directories("zlib" PUBLIC "zlib")
endif()
+3 -21
View File
@@ -80,34 +80,16 @@ source_group("Arch Specific\\\\Sound"
list(APPEND SMDATA_ARCH_MOVIE_TEXTURE_SRC list(APPEND SMDATA_ARCH_MOVIE_TEXTURE_SRC
"arch/MovieTexture/MovieTexture.cpp" "arch/MovieTexture/MovieTexture.cpp"
"arch/MovieTexture/MovieTexture_FFMpeg.cpp"
"arch/MovieTexture/MovieTexture_Generic.cpp" "arch/MovieTexture/MovieTexture_Generic.cpp"
"arch/MovieTexture/MovieTexture_Null.cpp") "arch/MovieTexture/MovieTexture_Null.cpp")
list(APPEND SMDATA_ARCH_MOVIE_TEXTURE_HPP list(APPEND SMDATA_ARCH_MOVIE_TEXTURE_HPP
"arch/MovieTexture/MovieTexture.h" "arch/MovieTexture/MovieTexture.h"
"arch/MovieTexture/MovieTexture_FFMpeg.h"
"arch/MovieTexture/MovieTexture_Generic.h" "arch/MovieTexture/MovieTexture_Generic.h"
"arch/MovieTexture/MovieTexture_Null.h") "arch/MovieTexture/MovieTexture_Null.h")
if(APPLE)
if(${HAS_FFMPEG})
list(APPEND SMDATA_ARCH_MOVIE_TEXTURE_SRC
"arch/MovieTexture/MovieTexture_FFMpeg.cpp")
list(APPEND SMDATA_ARCH_MOVIE_TEXTURE_HPP
"arch/MovieTexture/MovieTexture_FFMpeg.h")
endif()
elseif(MSVC)
list(APPEND SMDATA_ARCH_MOVIE_TEXTURE_SRC
"arch/MovieTexture/MovieTexture_FFMpeg.cpp")
list(APPEND SMDATA_ARCH_MOVIE_TEXTURE_HPP
"arch/MovieTexture/MovieTexture_FFMpeg.h")
else() # Unix
if(${HAS_FFMPEG})
list(APPEND SMDATA_ARCH_MOVIE_TEXTURE_SRC
"arch/MovieTexture/MovieTexture_FFMpeg.cpp")
list(APPEND SMDATA_ARCH_MOVIE_TEXTURE_HPP
"arch/MovieTexture/MovieTexture_FFMpeg.h")
endif()
endif()
source_group("Arch Specific\\\\Movie Texture" source_group("Arch Specific\\\\Movie Texture"
FILES FILES
${SMDATA_ARCH_MOVIE_TEXTURE_SRC} ${SMDATA_ARCH_MOVIE_TEXTURE_SRC}
+6 -10
View File
@@ -75,6 +75,7 @@ list(APPEND SMDATA_RAGE_GRAPHICS_SRC
"RageTextureManager.cpp" "RageTextureManager.cpp"
"RageTexturePreloader.cpp" "RageTexturePreloader.cpp"
"RageTextureRenderTarget.cpp") "RageTextureRenderTarget.cpp")
list(APPEND SMDATA_RAGE_GRAPHICS_HPP list(APPEND SMDATA_RAGE_GRAPHICS_HPP
"RageBitmapTexture.h" "RageBitmapTexture.h"
"RageDisplay.h" "RageDisplay.h"
@@ -162,6 +163,7 @@ list(APPEND SMDATA_RAGE_SOUND_SRC
"RageSoundReader_ChannelSplit.cpp" "RageSoundReader_ChannelSplit.cpp"
"RageSoundReader_Extend.cpp" "RageSoundReader_Extend.cpp"
"RageSoundReader_FileReader.cpp" "RageSoundReader_FileReader.cpp"
"RageSoundReader_MP3.cpp"
"RageSoundReader_Merge.cpp" "RageSoundReader_Merge.cpp"
"RageSoundReader_Pan.cpp" "RageSoundReader_Pan.cpp"
"RageSoundReader_PitchChange.cpp" "RageSoundReader_PitchChange.cpp"
@@ -170,8 +172,10 @@ list(APPEND SMDATA_RAGE_SOUND_SRC
"RageSoundReader_Resample_Good.cpp" "RageSoundReader_Resample_Good.cpp"
"RageSoundReader_SpeedChange.cpp" "RageSoundReader_SpeedChange.cpp"
"RageSoundReader_ThreadedBuffer.cpp" "RageSoundReader_ThreadedBuffer.cpp"
"RageSoundReader_Vorbisfile.cpp"
"RageSoundReader_WAV.cpp" "RageSoundReader_WAV.cpp"
"RageSoundUtil.cpp") "RageSoundUtil.cpp")
list(APPEND SMDATA_RAGE_SOUND_HPP list(APPEND SMDATA_RAGE_SOUND_HPP
"RageSound.h" "RageSound.h"
"RageSoundManager.h" "RageSoundManager.h"
@@ -183,6 +187,7 @@ list(APPEND SMDATA_RAGE_SOUND_HPP
"RageSoundReader_Extend.h" "RageSoundReader_Extend.h"
"RageSoundReader_FileReader.h" "RageSoundReader_FileReader.h"
"RageSoundReader_Filter.h" "RageSoundReader_Filter.h"
"RageSoundReader_MP3.h"
"RageSoundReader_Merge.h" "RageSoundReader_Merge.h"
"RageSoundReader_Pan.h" "RageSoundReader_Pan.h"
"RageSoundReader_PitchChange.h" "RageSoundReader_PitchChange.h"
@@ -191,19 +196,10 @@ list(APPEND SMDATA_RAGE_SOUND_HPP
"RageSoundReader_Resample_Good.h" "RageSoundReader_Resample_Good.h"
"RageSoundReader_SpeedChange.h" "RageSoundReader_SpeedChange.h"
"RageSoundReader_ThreadedBuffer.h" "RageSoundReader_ThreadedBuffer.h"
"RageSoundReader_Vorbisfile.h"
"RageSoundReader_WAV.h" "RageSoundReader_WAV.h"
"RageSoundUtil.h") "RageSoundUtil.h")
if(HAS_OGG)
list(APPEND SMDATA_RAGE_SOUND_SRC "RageSoundReader_Vorbisfile.cpp")
list(APPEND SMDATA_RAGE_SOUND_HPP "RageSoundReader_Vorbisfile.h")
endif()
if(HAS_MP3)
list(APPEND SMDATA_RAGE_SOUND_SRC "RageSoundReader_MP3.cpp")
list(APPEND SMDATA_RAGE_SOUND_HPP "RageSoundReader_MP3.h")
endif()
source_group("Rage\\\\Sound" source_group("Rage\\\\Sound"
FILES FILES
${SMDATA_RAGE_SOUND_SRC} ${SMDATA_RAGE_SOUND_SRC}
+20 -131
View File
@@ -214,10 +214,6 @@ elseif(APPLE)
target_compile_definitions("${SM_EXE_NAME}" PRIVATE _XOPEN_SOURCE) target_compile_definitions("${SM_EXE_NAME}" PRIVATE _XOPEN_SOURCE)
if(${HAS_FFMPEG})
target_compile_definitions("${SM_EXE_NAME}" PRIVATE HAVE_FFMPEG)
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Debug") if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(SM_APP_RELEASE_NAME "${SM_NAME_DEBUG}") set(SM_APP_RELEASE_NAME "${SM_NAME_DEBUG}")
elseif(CMAKE_BUILD_TYPE STREQUAL "MinSizeRel") elseif(CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")
@@ -292,9 +288,6 @@ else() # Linux
message("Unrecognized host processor type") message("Unrecognized host processor type")
endif() endif()
endif() endif()
if(${HAS_FFMPEG})
target_compile_definitions("${SM_EXE_NAME}" PRIVATE HAVE_FFMPEG)
endif()
if(${HAS_XRANDR}) if(${HAS_XRANDR})
target_compile_definitions("${SM_EXE_NAME}" PRIVATE HAVE_XRANDR) target_compile_definitions("${SM_EXE_NAME}" PRIVATE HAVE_XRANDR)
endif() endif()
@@ -324,79 +317,19 @@ set_property(TARGET "${SM_EXE_NAME}" PROPERTY FOLDER "Internal Libraries")
list(APPEND SMDATA_LINK_LIB "lua-5.1" "miniz") list(APPEND SMDATA_LINK_LIB "lua-5.1" "miniz")
include(../extern/CMakeProject-mmmagic.cmake) include(../extern/CMakeProject-mmmagic.cmake)
if(HAS_MP3) list(APPEND SMDATA_LINK_LIB "mad"
if(WITH_SYSTEM_MAD) "pcre"
list(APPEND SMDATA_LINK_LIB ${LIBMAD_LIBRARY}) "glew"
else() "tomcrypt"
list(APPEND SMDATA_LINK_LIB "mad") "tommath"
endif() "jpeg"
endif() "zlib"
"png"
if(WITH_SYSTEM_PCRE) "jsoncpp"
list(APPEND SMDATA_LINK_LIB ${PCRE_LIBRARY})
else()
list(APPEND SMDATA_LINK_LIB "pcre")
endif()
if(WITH_SYSTEM_GLEW)
list(APPEND SMDATA_LINK_LIB ${GLEW_LIBRARIES} ${GLEW_LIBRARY_RELEASE})
list(APPEND SM_INCLUDE_DIRS ${GLEW_INCLUDE_DIRS})
else()
list(APPEND SMDATA_LINK_LIB "glew")
endif()
if(WITH_SYSTEM_TOMCRYPT)
target_compile_definitions("${SM_EXE_NAME}" PRIVATE LTM_DESC)
list(APPEND SMDATA_LINK_LIB ${TOMCRYPT_LIBRARY})
else()
list(APPEND SMDATA_LINK_LIB "tomcrypt")
endif()
if(WITH_SYSTEM_TOMMATH)
list(APPEND SMDATA_LINK_LIB ${TOMMATH_LIBRARY})
else()
list(APPEND SMDATA_LINK_LIB "tommath")
endif()
if(WITH_SYSTEM_JPEG)
list(APPEND SMDATA_LINK_LIB ${JPEG_LIBRARIES})
else()
list(APPEND SMDATA_LINK_LIB "jpeg")
endif()
if(WITH_SYSTEM_ZLIB)
list(APPEND SMDATA_LINK_LIB ${ZLIB_LIBRARIES} ${ZLIB_LIBRARY_RELEASE})
else()
list(APPEND SMDATA_LINK_LIB "zlib")
endif()
if(WITH_SYSTEM_PNG)
list(APPEND SMDATA_LINK_LIB ${PNG_LIBRARIES})
else()
list(APPEND SMDATA_LINK_LIB "png")
endif()
if(WITH_SYSTEM_JSONCPP)
list(APPEND SMDATA_LINK_LIB ${JSONCPP_LIBRARIES})
else()
list(APPEND SMDATA_LINK_LIB "jsoncpp")
endif()
if(WITH_OGG)
if(WITH_SYSTEM_OGG)
list(APPEND SMDATA_LINK_LIB
"${VORBISFILE_LIBRARY}"
"${VORBIS_LIBRARY}"
"${OGG_LIBRARY}")
else()
list(APPEND SMDATA_LINK_LIB
"vorbisfile" "vorbisfile"
"vorbis" "vorbis"
"ogg") "ogg"
endif() "ixwebsocket")
endif()
list(APPEND SMDATA_LINK_LIB "ixwebsocket")
if(WIN32) if(WIN32)
list(APPEND SMDATA_LINK_LIB list(APPEND SMDATA_LINK_LIB
@@ -430,9 +363,6 @@ if(WIN32)
PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS") PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS")
elseif(APPLE) elseif(APPLE)
# The following were removed from SMDATA_LINK_LIB to "match" StepMania's
# pbxproj. ${MAC_FRAME_APPKIT} ${MAC_FRAME_FOUNDATION} "ffmpeg"
list(INSERT SMDATA_LINK_LIB list(INSERT SMDATA_LINK_LIB
0 0
${MAC_FRAME_ACCELERATE} ${MAC_FRAME_ACCELERATE}
@@ -445,13 +375,9 @@ elseif(APPLE)
${MAC_FRAME_AUDIOUNIT} ${MAC_FRAME_AUDIOUNIT}
${MAC_FRAME_COREAUDIO} ${MAC_FRAME_COREAUDIO}
${MAC_FRAME_CORESERVICES} ${MAC_FRAME_CORESERVICES}
${MAC_FRAME_SYSTEM}) ${MAC_FRAME_SYSTEM}
list(APPEND SMDATA_LINK_LIB
"${BZIP2_LIBRARY_RELEASE}" "${BZIP2_LIBRARY_RELEASE}"
"${ICONV_LIBRARIES}") "${ICONV_LIBRARIES}"
if(HAS_FFMPEG)
list(APPEND SMDATA_LINK_LIB
"${SM_FFMPEG_LIB_ARM64}/libavformat.a" "${SM_FFMPEG_LIB_ARM64}/libavformat.a"
"${SM_FFMPEG_LIB_ARM64}/libavcodec.a" "${SM_FFMPEG_LIB_ARM64}/libavcodec.a"
"${SM_FFMPEG_LIB_ARM64}/libswscale.a" "${SM_FFMPEG_LIB_ARM64}/libswscale.a"
@@ -463,33 +389,15 @@ elseif(APPLE)
"${MAC_FRAME_COREMEDIA}" "${MAC_FRAME_COREMEDIA}"
"${MAC_FRAME_COREVIDEO}" "${MAC_FRAME_COREVIDEO}"
"${MAC_FRAME_VIDEOTOOLBOX}") "${MAC_FRAME_VIDEOTOOLBOX}")
endif()
else() # Unix / Linux TODO: Remember to find and locate the zip archive files. else() # Unix / Linux TODO: Remember to find and locate the zip archive files.
if(HAS_FFMPEG)
if(WITH_SYSTEM_FFMPEG)
list(APPEND SMDATA_LINK_LIB
"${FFMPEG_avformat_LIBRARY}"
"${FFMPEG_avcodec_LIBRARY}"
"${FFMPEG_swscale_LIBRARY}"
"${FFMPEG_avutil_LIBRARY}")
else()
list(APPEND SMDATA_LINK_LIB list(APPEND SMDATA_LINK_LIB
"${SM_FFMPEG_LIB}/libavformat.a" "${SM_FFMPEG_LIB}/libavformat.a"
"${SM_FFMPEG_LIB}/libavcodec.a" "${SM_FFMPEG_LIB}/libavcodec.a"
"${SM_FFMPEG_LIB}/libswscale.a" "${SM_FFMPEG_LIB}/libswscale.a"
"${SM_FFMPEG_LIB}/libavutil.a") "${SM_FFMPEG_LIB}/libavutil.a")
endif()
if(NOT WITH_SYSTEM_ZLIB)
list(REMOVE_ITEM SMDATA_LINK_LIB "zlib") list(REMOVE_ITEM SMDATA_LINK_LIB "zlib")
list(APPEND SMDATA_LINK_LIB "zlib") list(APPEND SMDATA_LINK_LIB "zlib" ${VA_LIBRARY} ${VA_DRM_LIBRARY})
endif()
if(NOT WITH_SYSTEM_FFMPEG)
list(APPEND SMDATA_LINK_LIB ${VA_LIBRARY})
list(APPEND SMDATA_LINK_LIB ${VA_DRM_LIBRARY})
endif()
endif()
if(${DL_FOUND}) if(${DL_FOUND})
list(APPEND SMDATA_LINK_LIB ${DL_LIBRARIES}) list(APPEND SMDATA_LINK_LIB ${DL_LIBRARIES})
@@ -524,10 +432,6 @@ else() # Unix / Linux TODO: Remember to find and locate the zip archive files.
list(APPEND SMDATA_LINK_LIB ${X11_LIBRARIES}) list(APPEND SMDATA_LINK_LIB ${X11_LIBRARIES})
endif() endif()
if(PCRE_FOUND)
list(APPEND SMDATA_LINK_LIB ${PCRE_LIBRARY})
endif()
if(LIBXTST_FOUND) if(LIBXTST_FOUND)
list(APPEND SMDATA_LINK_LIB ${LIBXTST_LIBRARY}) list(APPEND SMDATA_LINK_LIB ${LIBXTST_LIBRARY})
endif() endif()
@@ -542,43 +446,28 @@ target_link_libraries("${SM_EXE_NAME}" ${SMDATA_LINK_LIB})
list(APPEND SM_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} list(APPEND SM_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}
"${SM_SRC_DIR}/generated") "${SM_SRC_DIR}/generated")
list(APPEND SM_INCLUDE_DIRS "${JPEG_INCLUDE_DIR}") if(APPLE)
list(APPEND SM_INCLUDE_DIRS "archutils/Unix")
if(NOT APPLE)
if(WITH_SYSTEM_JSONCPP)
list(APPEND SM_INCLUDE_DIRS ${JSONCPP_INCLUDE_DIRS})
endif()
add_dependencies("${SM_EXE_NAME}" "ffmpeg_arm64" "ffmpeg_x86_64")
list(APPEND SM_INCLUDE_DIRS "${SM_FFMPEG_INCLUDE}")
else()
if(MSVC) if(MSVC)
list(APPEND SM_INCLUDE_DIRS "${SM_EXTERN_DIR}/ffmpeg-w32/include") list(APPEND SM_INCLUDE_DIRS "${SM_EXTERN_DIR}/ffmpeg-w32/include")
else()
if(HAS_FFMPEG)
if(WITH_SYSTEM_FFMPEG)
list(APPEND SM_INCLUDE_DIRS "${FFMPEG_INCLUDE_DIR}")
else() else()
add_dependencies("${SM_EXE_NAME}" "ffmpeg") add_dependencies("${SM_EXE_NAME}" "ffmpeg")
list(APPEND SM_INCLUDE_DIRS "${SM_FFMPEG_INCLUDE}") list(APPEND SM_INCLUDE_DIRS "${SM_FFMPEG_INCLUDE}")
endif()
endif()
if(HAS_GTK3) if(HAS_GTK3)
list(APPEND SM_INCLUDE_DIRS "${GTK3_INCLUDE_DIRS}") list(APPEND SM_INCLUDE_DIRS "${GTK3_INCLUDE_DIRS}")
endif() endif()
if(X11_FOUND) if(X11_FOUND)
list(APPEND SM_INCLUDE_DIRS "${X11_INCLUDE_DIR}") list(APPEND SM_INCLUDE_DIRS "${X11_INCLUDE_DIR}")
endif() endif()
if(PCRE_FOUND)
list(APPEND SM_INCLUDE_DIRS "${PCRE_INCLUDE_DIR}")
endif()
if(DL_FOUND) if(DL_FOUND)
list(APPEND SM_INCLUDE_DIRS "${DL_INCLUDE_DIR}") list(APPEND SM_INCLUDE_DIRS "${DL_INCLUDE_DIR}")
endif() endif()
endif() endif()
else()
list(APPEND SM_INCLUDE_DIRS "archutils/Unix")
if(HAS_FFMPEG)
add_dependencies("${SM_EXE_NAME}" "ffmpeg_arm64" "ffmpeg_x86_64")
list(APPEND SM_INCLUDE_DIRS "${SM_FFMPEG_INCLUDE}")
endif()
endif() endif()
target_include_directories("${SM_EXE_NAME}" PUBLIC ${SM_INCLUDE_DIRS}) target_include_directories("${SM_EXE_NAME}" PUBLIC ${SM_INCLUDE_DIRS})
+1 -14
View File
@@ -6,36 +6,23 @@
#include "ActorUtil.h" #include "ActorUtil.h"
#include <set> #include <set>
#if defined(HAS_WAV)
#include "RageSoundReader_WAV.h" #include "RageSoundReader_WAV.h"
#endif
#if defined(HAS_MP3)
#include "RageSoundReader_MP3.h" #include "RageSoundReader_MP3.h"
#endif
#if defined(HAS_OGG)
#include "RageSoundReader_Vorbisfile.h" #include "RageSoundReader_Vorbisfile.h"
#endif
RageSoundReader_FileReader *RageSoundReader_FileReader::TryOpenFile( RageFileBasic *pFile, RString &error, RString format, bool &bKeepTrying ) RageSoundReader_FileReader *RageSoundReader_FileReader::TryOpenFile( RageFileBasic *pFile, RString &error, RString format, bool &bKeepTrying )
{ {
RageSoundReader_FileReader *Sample = nullptr; RageSoundReader_FileReader *Sample = nullptr;
#if defined(HAS_WAV)
if( !format.CompareNoCase("wav") ) if( !format.CompareNoCase("wav") )
Sample = new RageSoundReader_WAV; Sample = new RageSoundReader_WAV;
#endif
#if defined(HAS_MP3)
if( !format.CompareNoCase("mp3") ) if( !format.CompareNoCase("mp3") )
Sample = new RageSoundReader_MP3; Sample = new RageSoundReader_MP3;
#endif
#if defined(HAS_OGG)
if( !format.CompareNoCase("oga") || !format.CompareNoCase("ogg") ) if( !format.CompareNoCase("oga") || !format.CompareNoCase("ogg") )
Sample = new RageSoundReader_Vorbisfile; Sample = new RageSoundReader_Vorbisfile;
#endif
if( !Sample ) if( !Sample )
return nullptr; return nullptr;
-4
View File
@@ -25,12 +25,10 @@
#endif #endif
#endif #endif
#if defined(HAVE_FFMPEG)
extern "C" extern "C"
{ {
#include <libavcodec/avcodec.h> #include <libavcodec/avcodec.h>
} }
#endif
#if defined(HAVE_X11) #if defined(HAVE_X11)
#include "archutils/Unix/X11Helper.h" #include "archutils/Unix/X11Helper.h"
@@ -284,9 +282,7 @@ void ArchHooks_Unix::DumpDebugInfo()
LOG->Info( "Runtime library: %s", LibcVersion().c_str() ); LOG->Info( "Runtime library: %s", LibcVersion().c_str() );
LOG->Info( "Threads library: %s", ThreadsVersion().c_str() ); LOG->Info( "Threads library: %s", ThreadsVersion().c_str() );
#if defined(HAVE_FFMPEG)
LOG->Info( "libavcodec: %#x (%u)", avcodec_version(), avcodec_version() ); LOG->Info( "libavcodec: %#x (%u)", avcodec_version(), avcodec_version() );
#endif
} }
void ArchHooks_Unix::SetTime( tm newtime ) void ArchHooks_Unix::SetTime( tm newtime )
-4
View File
@@ -1,10 +1,6 @@
#ifndef ARCH_SETUP_WINDOWS_H #ifndef ARCH_SETUP_WINDOWS_H
#define ARCH_SETUP_WINDOWS_H #define ARCH_SETUP_WINDOWS_H
#if defined(_MSC_VER)
#define HAVE_FFMPEG
#endif
#define SUPPORT_OPENGL #define SUPPORT_OPENGL
#if defined(_MSC_VER) #if defined(_MSC_VER)
#define SUPPORT_D3D #define SUPPORT_D3D
-9
View File
@@ -130,15 +130,6 @@ typedef std::make_signed<size_t>::type ssize_t;
/* Defined to 1 if the underlying system uses big endian. */ /* Defined to 1 if the underlying system uses big endian. */
#cmakedefine ENDIAN_BIG 1 #cmakedefine ENDIAN_BIG 1
/* Defined to 1 if compiling with WAV support. */
#cmakedefine HAS_WAV 1
/* Defined to 1 if compiling with MP3 support. */
#cmakedefine HAS_MP3 1
/* Defined to 1 if compiling with OGG support. */
#cmakedefine HAS_OGG 1
/* Defined to 1 if building on a windows system, and thus uses the windows loading window. */ /* Defined to 1 if building on a windows system, and thus uses the windows loading window. */
#cmakedefine NEED_WINDOWS_LOADING_WINDOW 1 #cmakedefine NEED_WINDOWS_LOADING_WINDOW 1