diff options
Diffstat (limited to 'data/x265')
-rw-r--r-- | data/x265/make.sh | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/data/x265/make.sh b/data/x265/make.sh index 30cd7f5f2..f0aa4aae7 100644 --- a/data/x265/make.sh +++ b/data/x265/make.sh @@ -18,29 +18,30 @@ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) EOF -_cmake_args="-DCMAKE_TOOLCHAIN_FILE=$(realpath iphoneos_toolchain.cmake) -DCMAKE_LOCALSTATEDIR='/private/var' -DCMAKE_INSTALL_NAME_DIR='/usr/lib' -DCMAKE_INSTALL_RPATH='/usr/' -DCMAKE_OSX_SYSROOT='${PKG_ROOT}' -DCMAKE_INSTALL_PREFIX='/usr/'" -_args="-DLINKED_10BIT=ON -DLINKED_12BIT=ON -DEXTRA_LINK_FLAGS=-L. -DEXTRA_LIB=x265_main10.a;x265_main12.a" -_high_bit="-DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF" +# WTF cmake +export MACOSX_DEPLOYMENT_TARGET="${IPHONEOS_DEPLOYMENT_TARGET}" -mkdir 10bit 12bit 8bit +_cmake_args=(-DCMAKE_TOOLCHAIN_FILE=$(realpath iphoneos_toolchain.cmake) -DCMAKE_INSTALL_NAME_DIR=/usr/lib -DCMAKE_INSTALL_RPATH=/usr -DCMAKE_OSX_SYSROOT="${PKG_ROOT}" -DCMAKE_INSTALL_PREFIX=/usr) +_args=(-DENABLE_STATIC=OFF -DEXTRA_LIB="x265_main10.a;x265_main12.a" -DLINKED_10BIT=ON -DLINKED_12BIT=ON -DEXTRA_LINK_FLAGS="-Lx265-10bit -Lx265-12bit") +_high_bit=(-DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF) -pushd 10bit - cmake ../source ${_cmake_args} ${_high_bit} - make -j4 - mv libx265.a ../8bit/libx265_main10.a +cd build +mkdir x265-10bit x265-12bit || true + +pushd x265-10bit + cmake ../../source "${_cmake_args[@]}" "${_high_bit[@]}" + make -j16 + mv libx265.a libx265_main10.a popd &>/dev/null -pushd 12bit - cmake ../source ${_cmake_args} -DMAIN12=ON ${_high_bit} - make -j4 - mv libx265.a ../8bit/libx265_main12.a +pushd x265-12bit + cmake ../../source "${_cmake_args[@]}" -DMAIN12=ON "${_high_bit[@]}" + make -j16 + mv libx265.a libx265_main12.a popd &>/dev/null -cd 8bit - cmake ../source ${_cmake_args} ${args} - make -j4 - mv libx265.a libx265_main.a - ${PKG_TARG}-libtool -static -o libx265.a libx265_main.a libx265_main10.a libx265_main12.a || \ - libtool -static -o libx265.a libx265_main.a libx265_main10.a libx265_main12.a - # Try host's libtool if target's doesn't exist. - pkg:install +echo cmake ../source "${_cmake_args[@]}" "${_args[@]}" +cmake ../source "${_cmake_args[@]}" "${_args[@]}" +make -j16 +pkg:install +pkg: rm /usr/lib/libx265.a |