2016-10-17 05:48:11 +08:00
|
|
|
include(vcpkg_common_functions)
|
2018-10-12 12:12:10 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO xiph/vorbis
|
|
|
|
REF 112d3bd0aaacad51305e1464d4b381dabad0e88b
|
|
|
|
SHA512 df20e072a5e024ca2b8fc0e2890bb8968c0c948a833149a6026d2eaf6ab57b88b6d00d0bfb3b8bfcf879c7875e7cfacb8c6bf454bfc083b41d76132c567ff7ae
|
|
|
|
HEAD_REF master
|
2017-02-02 11:05:55 +08:00
|
|
|
PATCHES
|
2018-10-12 12:12:10 +08:00
|
|
|
0001-Dont-export-vorbisenc-functions.patch
|
|
|
|
0002-Allow-deprecated-functions.patch
|
2017-02-02 11:05:55 +08:00
|
|
|
)
|
2016-10-17 05:48:11 +08:00
|
|
|
|
2018-10-12 12:12:10 +08:00
|
|
|
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()
|
2016-10-17 05:48:11 +08:00
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
2017-04-14 22:11:30 +08:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
2016-10-17 05:48:11 +08:00
|
|
|
OPTIONS -DOGG_INCLUDE_DIRS=${OGG_INCLUDE}
|
|
|
|
OPTIONS_RELEASE -DOGG_LIBRARIES=${OGG_LIB_REL}
|
|
|
|
OPTIONS_DEBUG -DOGG_LIBRARIES=${OGG_LIB_DBG}
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
|
|
|
|
# Handle copyright
|
2018-10-12 12:12:10 +08:00
|
|
|
configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/libvorbis/copyright COPYONLY)
|
2016-10-25 06:36:33 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|