mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 08:34:40 +00:00
Initial commit
added libraries: opus flac libsndfile updated: libvorbis libogg openal - Everything works as expected for now. Bare in mind libsndfile needed the check for whether or not it could find the xiph libraries removed in order for this to work.
This commit is contained in:
parent
05a083ca6f
commit
a745fc3757
1954 changed files with 431332 additions and 21037 deletions
6
Engine/lib/flac/cmake/CheckA64NEON.c.in
Normal file
6
Engine/lib/flac/cmake/CheckA64NEON.c.in
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#include <arm_neon.h>
|
||||
int main (void)
|
||||
{
|
||||
float64x2_t tmp;
|
||||
tmp = vdupq_n_f64(0.0f);
|
||||
}
|
||||
14
Engine/lib/flac/cmake/CheckA64NEON.cmake
Normal file
14
Engine/lib/flac/cmake/CheckA64NEON.cmake
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
macro(CHECK_A64NEON VARIABLE)
|
||||
if(NOT DEFINED HAVE_${VARIABLE})
|
||||
message(STATUS "Check whether A64 NEON can be used")
|
||||
configure_file(${PROJECT_SOURCE_DIR}/cmake/CheckA64NEON.c.in ${PROJECT_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckA64NEON.c @ONLY)
|
||||
try_compile(HAVE_${VARIABLE} "${PROJECT_BINARY_DIR}"
|
||||
"${PROJECT_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckA64NEON.c")
|
||||
if(HAVE_${VARIABLE})
|
||||
message(STATUS "Check whether A64 NEON can be used - yes")
|
||||
set(${VARIABLE} 1 CACHE INTERNAL "Result of CHECK_A64NEON" FORCE)
|
||||
else ()
|
||||
message(STATUS "Check whether A64 NEON can be used - no")
|
||||
endif()
|
||||
endif ()
|
||||
endmacro(CHECK_A64NEON)
|
||||
7
Engine/lib/flac/cmake/CheckCPUArch.c.in
Normal file
7
Engine/lib/flac/cmake/CheckCPUArch.c.in
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
int main(void) {
|
||||
#if @CHECK_CPU_ARCH_DEFINES@
|
||||
return 0;
|
||||
#else
|
||||
fail
|
||||
#endif
|
||||
}
|
||||
27
Engine/lib/flac/cmake/CheckCPUArch.cmake
Normal file
27
Engine/lib/flac/cmake/CheckCPUArch.cmake
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
macro(_CHECK_CPU_ARCH ARCH ARCH_DEFINES VARIABLE)
|
||||
if(NOT DEFINED HAVE_${VARIABLE})
|
||||
message(STATUS "Check CPU architecture is ${ARCH}")
|
||||
set(CHECK_CPU_ARCH_DEFINES ${ARCH_DEFINES})
|
||||
configure_file(${PROJECT_SOURCE_DIR}/cmake/CheckCPUArch.c.in ${PROJECT_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckCPUArch.c @ONLY)
|
||||
try_compile(HAVE_${VARIABLE} "${PROJECT_BINARY_DIR}"
|
||||
"${PROJECT_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckCPUArch.c")
|
||||
if(HAVE_${VARIABLE})
|
||||
message(STATUS "Check CPU architecture is ${ARCH} - yes")
|
||||
set(${VARIABLE} 1 CACHE INTERNAL "Result of CHECK_CPU_ARCH" FORCE)
|
||||
else ()
|
||||
message(STATUS "Check CPU architecture is ${ARCH} - no")
|
||||
endif()
|
||||
endif ()
|
||||
endmacro(_CHECK_CPU_ARCH)
|
||||
|
||||
macro(CHECK_CPU_ARCH_X64 VARIABLE)
|
||||
_CHECK_CPU_ARCH(x64 "defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) || defined(_M_X64) || defined(_M_AMD64)" ${VARIABLE})
|
||||
endmacro(CHECK_CPU_ARCH_X64)
|
||||
|
||||
macro(CHECK_CPU_ARCH_X86 VARIABLE)
|
||||
_CHECK_CPU_ARCH(x86 "defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__) ||defined( __i386) || defined(_M_IX86)" ${VARIABLE})
|
||||
endmacro(CHECK_CPU_ARCH_X86)
|
||||
|
||||
macro(CHECK_CPU_ARCH_ARM64 VARIABLE)
|
||||
_CHECK_CPU_ARCH(arm64 "defined(__aarch64__) || defined(__arm64__)" ${VARIABLE})
|
||||
endmacro(CHECK_CPU_ARCH_ARM64)
|
||||
26
Engine/lib/flac/cmake/FindOgg.cmake
Normal file
26
Engine/lib/flac/cmake/FindOgg.cmake
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
find_package(PkgConfig)
|
||||
pkg_check_modules(_OGG QUIET ogg)
|
||||
|
||||
find_path(OGG_INCLUDE_DIR
|
||||
NAMES "ogg/ogg.h"
|
||||
PATHS ${_OGG_INCLUDE_DIRS})
|
||||
|
||||
find_library(OGG_LIBRARY
|
||||
NAMES ogg libogg
|
||||
HINTS ${_OGG_LIBRARY_DIRS})
|
||||
|
||||
mark_as_advanced(
|
||||
OGG_INCLUDE_DIR
|
||||
OGG_LIBRARY)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Ogg
|
||||
REQUIRED_VARS OGG_INCLUDE_DIR OGG_LIBRARY
|
||||
VERSION_VAR _OGG_VERSION)
|
||||
|
||||
if(OGG_FOUND AND NOT TARGET Ogg::ogg)
|
||||
add_library(Ogg::ogg UNKNOWN IMPORTED)
|
||||
set_target_properties(Ogg::ogg PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${OGG_INCLUDE_DIR}"
|
||||
IMPORTED_LOCATION "${OGG_LIBRARY}")
|
||||
endif()
|
||||
63
Engine/lib/flac/cmake/UseSystemExtensions.cmake
Normal file
63
Engine/lib/flac/cmake/UseSystemExtensions.cmake
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
include(CheckCSourceCompiles)
|
||||
|
||||
check_c_source_compiles("
|
||||
#include <wchar.h>
|
||||
mbstate_t x;
|
||||
int main() { return 0; }"
|
||||
HAVE_MBSTATE)
|
||||
if(NOT HAVE_MBSTATE)
|
||||
check_c_source_compiles("
|
||||
#define _XOPEN_SOURCE 500
|
||||
#include <wchar.h>
|
||||
mbstate_t x;
|
||||
int main() { return 0; }"
|
||||
DODEFINE_XOPEN_SOURCE)
|
||||
endif()
|
||||
check_c_source_compiles("
|
||||
#define __EXTENSIONS__ 1
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
# include <sys/stat.h>
|
||||
#endif
|
||||
#ifdef STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
# include <stddef.h>
|
||||
#else
|
||||
# ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
# endif
|
||||
#endif
|
||||
#ifdef HAVE_STRING_H
|
||||
# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
|
||||
# include <memory.h>
|
||||
# endif
|
||||
# include <string.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
#endif
|
||||
#ifdef HAVE_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
#endif
|
||||
#ifdef HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
int main() { return 0; }"
|
||||
DODEFINE_EXTENSIONS)
|
||||
|
||||
add_definitions(
|
||||
-D_DARWIN_C_SOURCE
|
||||
-D_POSIX_PTHREAD_SEMANTICS
|
||||
-D__STDC_WANT_IEC_60559_BFP_EXT__
|
||||
-D__STDC_WANT_IEC_60559_DFP_EXT__
|
||||
-D__STDC_WANT_IEC_60559_FUNCS_EXT__
|
||||
-D__STDC_WANT_IEC_60559_TYPES_EXT__
|
||||
-D__STDC_WANT_LIB_EXT2__
|
||||
-D__STDC_WANT_MATH_SPEC_FUNCS__
|
||||
-D_TANDEM_SOURCE)
|
||||
Loading…
Add table
Add a link
Reference in a new issue