Commit: c7068347494dc8ba885aa1746860ceb5ee2fbde3 Author: Julian Eisel Date: Fri Jan 24 11:17:23 2020 +0100 Branches: vr_scene_inspection https://developer.blender.org/rBc7068347494dc8ba885aa1746860ceb5ee2fbde3
Merge branch 'master' into temp-openxr-buildstuff =================================================================== =================================================================== diff --cc build_files/build_environment/install_deps.sh index 20d2e1ae781,bc9ee802810..e55e81a2760 --- a/build_files/build_environment/install_deps.sh +++ b/build_files/build_environment/install_deps.sh @@@ -312,12 -328,10 +337,13 @@@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENT Unconditionally skip OpenImageDenoise installation/building. --skip-ffmpeg - Unconditionally skip FFMpeg installation/building.\"" + Unconditionally skip FFMpeg installation/building. + + --skip-openxr + Unconditionally skip OpenXR-SDK installation/building.\"" - ##### Main Vars ##### + # ---------------------------------------------------------------------------- + # Main Vars DO_SHOW_DEPS=false @@@ -2844,102 -2878,10 +2917,105 @@@ compile_FFmpeg() fi } ++# ---------------------------------------------------------------------------- ++# Build OpenXR SDK + - #### Build OpenXR SDK #### +_init_openxr_sdk() { + _src=$SRC/OpenXR-SDK-$OPENXR_VERSION + _git=true + _inst=$INST/openxr-sdk-$OPENXR_VERSION + _inst_shortcut=$INST/openxr-sdk +} + +clean_OpenXR_SDK() { + _init_openxr_sdk + _clean +} + +compile_OpenXR_SDK() { + if [ "$NO_BUILD" = true ]; then + WARNING "--no-build enabled, OpenXR will not be compiled!" + return + fi + + # To be changed each time we make edits that would modify the compiled result! + openxr_magic=0 + _init_openxr_sdk + + # Clean install if needed! + magic_compile_check openxr-$OPENXR_VERSION $openxr_magic + if [ $? -eq 1 -o "$OPENXR_FORCE_REBUILD" = true ]; then + clean_OpenXR_SDK + fi + + if [ ! -d $_inst ]; then + INFO "Building OpenXR-SDK-$OPENXR_VERSION" + + prepare_opt + + if [ ! -d $_src ]; then + mkdir -p $SRC + + if [ "$OPENXR_USE_REPO" = true ]; then + git clone $OPENXR_SOURCE_REPO $_src + else + download OPENXR_SOURCE[@] "$_src.tar.gz" + INFO "Unpacking OpenXR-SDK-$OPENXR_VERSION" + tar -C $SRC --transform "s,(.*/?)OpenXR-SDK-[^/]*(.*),\1OpenXR-SDK-$OPENXR_VERSION\2,x" \ + -xf $_src.tar.gz + fi + fi + + cd $_src + + if [ "$OPENXR_USE_REPO" = true ]; then + git pull origin $OPENXR_REPO_BRANCH + + # Stick to same rev as windows' libs... + git checkout $OPENXR_REPO_UID + git reset --hard + fi + + # Always refresh the whole build! + if [ -d build ]; then + rm -rf build + fi + mkdir build + cd build + + cmake_d="-D CMAKE_BUILD_TYPE=Release" + cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst" + cmake_d="$cmake_d -D BUILD_FORCE_GENERATION=OFF" + cmake_d="$cmake_d -D BUILD_LOADER=ON" + + cmake $cmake_d .. + + make -j$THREADS && make install + make clean + + if [ -d $_inst ]; then + _create_inst_shortcut + else + ERROR "OpenXR-SDK-$OPENXR_VERSION failed to compile, exiting" + exit 1 + fi + + magic_compile_set openxr-$OPENXR_VERSION $openxr_magic + + cd $CWD + INFO "Done compiling OpenXR-SDK-$OPENXR_VERSION!" + else + INFO "Own OpenXR-SDK-$OPENXR_VERSION is up to date, nothing to do!" + INFO "If you want to force rebuild of this lib, use the --force-openxr option." + fi + + run_ldconfig "openxr-sdk" +} + - #### Install on DEB-like #### + # ---------------------------------------------------------------------------- + # Install on DEB-like + get_package_version_DEB() { dpkg-query -W -f '${Version}' $1 | sed -r 's/([0-9]+:)?(([0-9]+\.?)+([0-9]+)).*/\2/' } @@@ -4786,20 -4699,10 +4867,21 @@@ install_OTHER() INFO "Forced FFMpeg building, as requested..." compile_FFmpeg fi + + PRINT "" + if [ "$OPENXR_SKIP" = true ]; then + WARNING "Skipping OpenXR-SDK installation, as requested..." + elif [ "$OPENXR_FORCE_BUILD" = true ]; then + INFO "Forced OpenXR-SDK building, as requested..." + compile_OpenXR_SDK + else + # No package currently! + compile_OpenXR_SDK + fi } - #### Printing User Info #### + # ---------------------------------------------------------------------------- + # Printing User Info print_info_ffmpeglink_DEB() { dpkg -L $_packages | grep -e ".*\/lib[^\/]\+\.so" | gawk '{ printf(nlines ? "'"$_ffmpeg_list_sep"'%s" : "%s", gensub(/.*lib([^\/]+)\.so/, "\\1", "g", $0)); nlines++ }' _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs