mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 00:11:48 +08:00
Add libtheora
This commit is contained in:
parent
789855546c
commit
4c5f2f9a30
68
ports/libtheora/CMakeLists.txt
Normal file
68
ports/libtheora/CMakeLists.txt
Normal file
@ -0,0 +1,68 @@
|
||||
project(theora)
|
||||
|
||||
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}")
|
||||
FIND_PACKAGE(OGG REQUIRED)
|
||||
|
||||
file(GLOB HEADERS
|
||||
"include/theora/codec.h"
|
||||
"include/theora/theora.h"
|
||||
"include/theora/theoradec.h"
|
||||
)
|
||||
|
||||
|
||||
include_directories("include")
|
||||
include_directories(${OGG_INCLUDE_DIR})
|
||||
|
||||
file(GLOB SOURCES
|
||||
"lib/analyze.c"
|
||||
"lib/encapiwrapper.c"
|
||||
"lib/encfrag.c"
|
||||
"lib/encinfo.c"
|
||||
"lib/encode.c"
|
||||
#"lib/encoder_disabled.c"
|
||||
"lib/enquant.c"
|
||||
"lib/fdct.c"
|
||||
"lib/huffenc.c"
|
||||
"lib/mathops.c"
|
||||
"lib/mcenc.c"
|
||||
"lib/rate.c"
|
||||
"lib/tokenize.c"
|
||||
"lib/x86_vc/mmxencfrag.c"
|
||||
"lib/x86_vc/mmxfdct.c"
|
||||
"lib/x86_vc/x86cpu.c"
|
||||
"lib/x86_vc/x86enc.c"
|
||||
"lib/apiwrapper.c"
|
||||
"lib/bitpack.c"
|
||||
"lib/decapiwrapper.c"
|
||||
"lib/decinfo.c"
|
||||
"lib/decode.c"
|
||||
"lib/dequant.c"
|
||||
"lib/fragment.c"
|
||||
"lib/huffdec.c"
|
||||
"lib/idct.c"
|
||||
"lib/info.c"
|
||||
"lib/internal.c"
|
||||
"lib/quant.c"
|
||||
"lib/state.c"
|
||||
"lib/x86_vc/mmxfrag.c"
|
||||
"lib/x86_vc/mmxidct.c"
|
||||
"lib/x86_vc/mmxstate.c"
|
||||
"lib/x86_vc/x86state.c"
|
||||
"win32/xmingw32/libtheoradec-all.def"
|
||||
)
|
||||
|
||||
add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_BIND_TO_CURRENT_CRT_VERSION)
|
||||
if (${BUILD_SHARED_LIBS})
|
||||
add_definitions(-DLIBTHEORA_EXPORTS)
|
||||
endif()
|
||||
|
||||
add_library(theora ${SOURCES} ${HEADERS})
|
||||
target_link_libraries(theora ${OGG_LIBRARY})
|
||||
|
||||
install(FILES ${HEADERS} DESTINATION include/theora)
|
||||
|
||||
install(TARGETS theora
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION bin
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
4
ports/libtheora/CONTROL
Normal file
4
ports/libtheora/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: libtheora
|
||||
Version: 1.1.1
|
||||
Description: Theora is a free and open video compression format from the Xiph.org Foundation.
|
||||
Build-Depends: libogg
|
8
ports/libtheora/FindOGG.cmake
Normal file
8
ports/libtheora/FindOGG.cmake
Normal file
@ -0,0 +1,8 @@
|
||||
find_path(OGG_INCLUDE_DIR NAMES ogg/ogg.h)
|
||||
|
||||
find_library(OGG_LIBRARY NAMES ogg)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(OGG DEFAULT_MSG OGG_LIBRARY OGG_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(OGG_INCLUDE_DIR OGG_LIBRARY)
|
32
ports/libtheora/portfile.cmake
Normal file
32
ports/libtheora/portfile.cmake
Normal file
@ -0,0 +1,32 @@
|
||||
# Common Ambient Variables:
|
||||
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
|
||||
# TARGET_TRIPLET is the current triplet (x86-windows, etc)
|
||||
# PORT is the current port name (zlib, etc)
|
||||
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
|
||||
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
|
||||
#
|
||||
|
||||
include(${CMAKE_TRIPLET_FILE})
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libtheora-1.1.1)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2"
|
||||
FILENAME "libtheora-1.1.1.tar.bz2"
|
||||
SHA512 9ab9b3af1c35d16a7d6d84f61f59ef3180132e30c27bdd7c0fa2683e0d00e2c791accbc7fd2c90718cc947d8bd10ee4a5940fb55f90f1fd7b0ed30583a47dbbd
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindOGG.cmake DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libtheora)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libtheora/LICENSE ${CURRENT_PACKAGES_DIR}/share/libtheora/copyright)
|
Loading…
Reference in New Issue
Block a user