mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-23 02:57:09 +01:00
[libvorbis] patch find_library instead of manually supplying the libr… (#6569)
* [libvorbis] patch find_library instead of manually supplying the library to cmake * whitespace change to retrigger ci
This commit is contained in:
parent
fcc6d6587e
commit
cb98a5c0dd
@ -1,4 +1,4 @@
|
||||
Source: libvorbis
|
||||
Version: 1.3.6-9eadecc-1
|
||||
Version: 1.3.6-9eadecc-3
|
||||
Description: Ogg Vorbis is a fully open, non-proprietary, patent-and-royalty-free, general-purpose compressed audio format.
|
||||
Build-Depends: libogg
|
||||
|
17
ports/libvorbis/ogg.patch
Normal file
17
ports/libvorbis/ogg.patch
Normal file
@ -0,0 +1,17 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index bbc045ba..a23630f5 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -57,10 +57,10 @@ if(NOT OGG_ROOT)
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_OGG QUIET ogg)
|
||||
find_path(OGG_INCLUDE_DIRS NAMES ogg/ogg.h HINTS ${PC_OGG_INCLUDE_DIRS} PATH_SUFFIXES ogg)
|
||||
- find_library(OGG_LIBRARIES NAMES ogg HINTS ${PC_OGG_LIBRARY_DIRS})
|
||||
+ find_library(OGG_LIBRARIES NAMES ogg libogg HINTS ${PC_OGG_LIBRARY_DIRS})
|
||||
else()
|
||||
find_path(OGG_INCLUDE_DIRS NAMES ogg/ogg.h HINTS ${OGG_ROOT}/include PATH_SUFFIXES ogg)
|
||||
- find_library(OGG_LIBRARIES NAMES ogg HINTS ${OGG_ROOT}/lib ${OGG_ROOT}/lib64)
|
||||
+ find_library(OGG_LIBRARIES NAMES ogg libogg HINTS ${OGG_ROOT}/lib ${OGG_ROOT}/lib64)
|
||||
endif()
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(OGG DEFAULT_MSG OGG_INCLUDE_DIRS OGG_LIBRARIES)
|
@ -8,27 +8,12 @@ vcpkg_from_github(
|
||||
PATCHES
|
||||
0001-Dont-export-vorbisenc-functions.patch
|
||||
0002-Allow-deprecated-functions.patch
|
||||
ogg.patch
|
||||
)
|
||||
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" OGG_INCLUDE)
|
||||
foreach(LIBNAME ogg.lib libogg.a libogg.dylib libogg.so)
|
||||
if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/${LIBNAME}" OR EXISTS "${CURRENT_INSTALLED_DIR}/debug/lib/${LIBNAME}")
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/${LIBNAME}" OGG_LIB_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/${LIBNAME}" OGG_LIB_DBG)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(NOT OGG_LIB_REL)
|
||||
message(FATAL_ERROR "Could not find libraries for dependency libogg!")
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS -DOGG_INCLUDE_DIRS=${OGG_INCLUDE}
|
||||
OPTIONS_RELEASE -DOGG_LIBRARIES=${OGG_LIB_REL}
|
||||
OPTIONS_DEBUG -DOGG_LIBRARIES=${OGG_LIB_DBG}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
@ -38,4 +23,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
# Handle copyright
|
||||
configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/libvorbis/copyright COPYONLY)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
vcpkg_copy_pdbs()
|
||||
|
Loading…
x
Reference in New Issue
Block a user