Commit d03f0547 authored by Rafaël Carré's avatar Rafaël Carré

contrib: add x265

parent a0e6d8c2
dd58b502d01594d3a7036ff91bfe9bde93914deec91051f15bba4b805cd5f5261ecb58c70b4795f0b83148bd99faf22d4a1cdadd76e25b50aad9668043e894e6 x265-0.6.tar.bz2
# x265
#X265_GITURL := https://github.com/videolan/x265
X265_VERSION := 0.6
X265_SNAPURL := https://bitbucket.org/multicoreware/x265/get/$(X265_VERSION).tar.bz2
ifdef BUILD_ENCODERS
ifdef GPL
PKGS += x265
endif
endif
ifeq ($(call need_pkg,"x265 >= 0.6"),)
PKGS_FOUND += x265
endif
$(TARBALLS)/x265-git.tar.xz:
$(call download_git,$(X265_GITURL))
$(TARBALLS)/x265-$(X265_VERSION).tar.bz2:
$(call download,$(X265_SNAPURL))
x265: x265-$(X265_VERSION).tar.bz2 .sum-x265
rm -Rf $@-$(X265_VERSION)
mkdir -p $@-$(X265_VERSION)
$(BZCAT) "$<" | (cd $@-$(X265_VERSION) && tar xv --strip-components=1)
$(call pkg_static,"source/x265.pc.in")
$(APPLY) $(SRC)/x265/static-only.patch
$(MOVE)
.x265: x265 toolchain.cmake
cd $</source && $(HOSTVARS_PIC) $(CMAKE)
cd $</source && $(MAKE) install
touch $@
--- x265/source/CMakeLists.txt.orig 2014-01-13 22:56:15.441726467 +0100
+++ x265/source/CMakeLists.txt 2014-01-13 22:56:36.947787400 +0100
@@ -196,28 +196,15 @@
endif()
add_library(x265-static STATIC $<TARGET_OBJECTS:encoder> $<TARGET_OBJECTS:common> ${YASM_OBJS} ${YASM_SRCS})
-add_library(x265-shared SHARED dllmain.cpp "${PROJECT_BINARY_DIR}/x265.def" ${YASM_OBJS}
- $<TARGET_OBJECTS:encoder> $<TARGET_OBJECTS:common>)
-target_link_libraries(x265-shared ${PLATFORM_LIBS})
-set_target_properties(x265-shared PROPERTIES OUTPUT_NAME x265)
if(NOT MSVC)
set_target_properties(x265-static PROPERTIES OUTPUT_NAME x265)
endif()
-if(UNIX AND NOT APPLE)
- set_target_properties(x265-shared PROPERTIES LINK_FLAGS "-Wl,-Bsymbolic")
-endif()
# WIN32 builds static: x265-static.lib shared: x265.dll + x265.lib (shim loader)
# MINGW builds static: libx265-static.a shared: libx265.dll + libx265.dll.a
# *NIX builds static: libx265.a shared: libx265.so
if(X265_LATEST_TAG)
# shared library is not installed if a tag is not found
- set_target_properties(x265-shared PROPERTIES VERSION ${X265_LATEST_TAG} SOVERSION ${X265_BUILD})
- install(TARGETS x265-shared
- RUNTIME DESTINATION bin
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib)
-
# convert lists of link libraries into -lstdc++ -lm etc..
foreach(LIB ${CMAKE_CXX_IMPLICIT_LINK_LIBRARIES} ${PLATFORM_LIBS})
set(PRIVATE_LIBS "${PRIVATE_LIBS} -l${LIB}")
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment