mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 00:54:54 +00:00
usse vcpkg just for the libsndfile build chain
This commit is contained in:
parent
a577d36679
commit
873fbbf1fe
1856 changed files with 1019 additions and 466624 deletions
|
|
@ -0,0 +1,16 @@
|
|||
diff --git a/win32/vorbis.def b/win32/vorbis.def
|
||||
index 9cca64d..a80fff7 100644
|
||||
--- a/win32/vorbis.def
|
||||
+++ b/win32/vorbis.def
|
||||
@@ -49,11 +49,4 @@ vorbis_synthesis_idheader
|
||||
;
|
||||
vorbis_window
|
||||
;_analysis_output_always
|
||||
-vorbis_encode_init
|
||||
-vorbis_encode_setup_managed
|
||||
-vorbis_encode_setup_vbr
|
||||
-vorbis_encode_init_vbr
|
||||
-vorbis_encode_setup_init
|
||||
-vorbis_encode_ctl
|
||||
-;
|
||||
vorbis_version_string
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index f377c428..07530304 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -60,6 +60,9 @@ message(STATUS "Configuring ${PROJECT_NAME} ${PROJECT_VERSION}")
|
||||
# Find math library
|
||||
|
||||
check_library_exists(m floor "" HAVE_LIBM)
|
||||
+if(HAVE_LIBM)
|
||||
+ set(VORBIS_LIBS "-lm")
|
||||
+endif()
|
||||
|
||||
# Find ogg dependency
|
||||
find_package(Ogg REQUIRED)
|
||||
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
diff --git a/win32/vorbis.def b/win32/vorbis.def
|
||||
index 1310b6c..de14385 100644
|
||||
--- a/win32/vorbis.def
|
||||
+++ b/win32/vorbis.def
|
||||
@@ -1,6 +1,5 @@
|
||||
; vorbis.def
|
||||
;
|
||||
-LIBRARY
|
||||
EXPORTS
|
||||
_floor_P
|
||||
_mapping_P
|
||||
diff --git a/win32/vorbisenc.def b/win32/vorbisenc.def
|
||||
index 79af064..40a3e39 100644
|
||||
--- a/win32/vorbisenc.def
|
||||
+++ b/win32/vorbisenc.def
|
||||
@@ -1,6 +1,5 @@
|
||||
; vorbisenc.def
|
||||
;
|
||||
-LIBRARY
|
||||
|
||||
EXPORTS
|
||||
vorbis_encode_init
|
||||
diff --git a/win32/vorbisfile.def b/win32/vorbisfile.def
|
||||
index 4dc5549..243795d 100644
|
||||
--- a/win32/vorbisfile.def
|
||||
+++ b/win32/vorbisfile.def
|
||||
@@ -1,6 +1,5 @@
|
||||
; vorbisfile.def
|
||||
;
|
||||
-LIBRARY
|
||||
EXPORTS
|
||||
ov_clear
|
||||
ov_open
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/cmake/VorbisConfig.cmake.in b/cmake/VorbisConfig.cmake.in
|
||||
index 6fc07941..c762ba55 100644
|
||||
--- a/cmake/VorbisConfig.cmake.in
|
||||
+++ b/cmake/VorbisConfig.cmake.in
|
||||
@@ -1,7 +1,7 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
include(CMakeFindDependencyMacro)
|
||||
-find_dependency(Ogg REQUIRED)
|
||||
+find_dependency(Ogg CONFIG)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/VorbisTargets.cmake)
|
||||
|
||||
29
Tools/CMake/vcpkg/ports/libvorbis/portfile.cmake
Normal file
29
Tools/CMake/vcpkg/ports/libvorbis/portfile.cmake
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
set(LOCAL_ARCHIVE "$ENV{VCPKG_LIB_SOURCE_ROOT}/xiph-vorbis-v1.3.7.tar.gz")
|
||||
|
||||
vcpkg_extract_source_archive(
|
||||
SOURCE_PATH
|
||||
ARCHIVE "${LOCAL_ARCHIVE}"
|
||||
PATCHES
|
||||
0001-Dont-export-vorbisenc-functions.patch
|
||||
0002-Fixup-pkgconfig-libs.patch
|
||||
0003-def-mingw-compat.patch
|
||||
0004-ogg-find-dependency.patch
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 # https://github.com/xiph/vorbis/issues/113
|
||||
MAYBE_UNUSED_VARIABLES
|
||||
CMAKE_POLICY_VERSION_MINIMUM
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME Vorbis CONFIG_PATH "lib/cmake/Vorbis")
|
||||
vcpkg_fixup_pkgconfig()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
13
Tools/CMake/vcpkg/ports/libvorbis/usage
Normal file
13
Tools/CMake/vcpkg/ports/libvorbis/usage
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
The package libvorbis provides CMake targets:
|
||||
|
||||
# Vorbis reference encoder and decoder, low-level API
|
||||
find_package(Vorbis CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE Vorbis::vorbis)
|
||||
|
||||
# Audio stream decoding and basic manipulation, high-level API
|
||||
find_package(Vorbis CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE Vorbis::vorbisfile)
|
||||
|
||||
# Convenience API for setting up an encoding environment
|
||||
find_package(Vorbis CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE Vorbis::vorbisenc)
|
||||
19
Tools/CMake/vcpkg/ports/libvorbis/vcpkg.json
Normal file
19
Tools/CMake/vcpkg/ports/libvorbis/vcpkg.json
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"name": "libvorbis",
|
||||
"version": "1.3.7",
|
||||
"port-version": 4,
|
||||
"description": "Ogg Vorbis is a fully open, non-proprietary, patent-and-royalty-free, general-purpose compressed audio format",
|
||||
"homepage": "https://github.com/xiph/vorbis",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": [
|
||||
"libogg",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue