Warning, /graphics/krita/3rdparty/ext_googleangle/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 set(EXTPREFIX_googleangle "${EXTPREFIX}") 0002 0003 #[[ 0004 0005 ANGLE Versioning: 0006 0007 A branch in the format `chromium/<BUILD>` is created in the git repo of ANGLE. 0008 This build number correspond to the build number of Chromium releases. This 0009 can be tracked on OmahaProxy [1]. The latest release regardless of branch 0010 will likely use the latest commit of ANGLE on the corresponding branch. 0011 0012 As of writing (2022-03-16) the latest Beta of Chromium is 100.0.4896.46. 0013 On my end it says in `chrome://gpu` that the ANGLE commit id is `faa96536d88a`. 0014 At the same time, the `chromium/4896` branch is at `b0f33007113d`, which is 0015 actually one commit ahead. 0016 0017 How to update ANGLE: 0018 0019 1. Clone the git repo of ANGLE [2] or fetch updates if already cloned, then 0020 checkout the current base commit. 0021 2. Apply patches on top of it: 0022 - `git am path/to/01-patches_qt5.12.12/* path/to/02-patches_krita/*` 0023 - Check below for actual filenames of the patches. 0024 3. Check the current latest Chromium Beta or Stable build number [1] to decide 0025 the new branch to use as base. 0026 4. Fetch the latest commit of that branch: 0027 - `git fetch origin chromium/xxxx` 0028 5. Rebase onto that branch: 0029 - `git rebase -i --onto origin/chromium/xxxx current_base_commit` 0030 - Note: Substitute `current_base_commit` with the base commit you started with. 0031 6. Generate new patches: 0032 - `git format-patch origin/chromium/xxxx -o path/to/output/` 0033 - `unix2dos path/to/output/*` 0034 - Then move the updated patches into the corresponding patches dir. 0035 7. Update the details below with the new base commit. 0036 8. Check the `DEPS` file for the latest commit for `third_party/zlib`, then 0037 update the details for the target `ext_googleangle_zlib` below. 0038 0039 [1]: https://omahaproxy.appspot.com/ 0040 [2]: https://chromium.googlesource.com/angle/angle 0041 0042 ]] 0043 0044 # ANGLE Revision Information: 0045 # 0046 # Last updated: 2022-05-12 0047 # ANGLE branch: chromium/5005 0048 # ANGLE commit: f2280c0c5f935dccbaf528343d474c8fcdebe63a 0049 # Used by Chromium version: Beta 102.0.5005.49 0050 0051 set(GOOGLE_ANGLE_BASE_COMMIT "f2280c0c5f935dccbaf528343d474c8fcdebe63a") 0052 set(ANGLE_COMMIT_DATE "2022-05-03") 0053 0054 ExternalProject_Add( 0055 ext_googleangle 0056 0057 DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR} 0058 DOWNLOAD_NAME angle-${GOOGLE_ANGLE_BASE_COMMIT}.tar.gz 0059 # URL https://chromium.googlesource.com/angle/angle/+archive/${GOOGLE_ANGLE_BASE_COMMIT}.tar.gz 0060 # Note: Don't use the archive from googlesource, they don't use deterministic 0061 # timestamps so the file changes every time. 0062 URL https://github.com/google/angle/archive/${GOOGLE_ANGLE_BASE_COMMIT}.tar.gz 0063 URL_HASH SHA256=9d3ff60560b953dae7d7613b69dda643aef62390574114fdb1c9d4eada672049 0064 0065 PATCH_COMMAND ${CMAKE_COMMAND} -E echo Patching ANGLE 0066 # backported fixes from upstream 0067 COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-D3D-Initialize-storage-after-generating-mipmap-image.patch 0068 # Patches from Qt 5.12.12: 0069 COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/01-patches_qt5.12.12/0001-ANGLE-Use-pixel-sizes-in-the-XAML-swap-chain.patch 0070 COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/01-patches_qt5.12.12/0002-ANGLE-Add-support-for-querying-platform-device.patch 0071 COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/01-patches_qt5.12.12/0003-ANGLE-Fix-Windows-Store-D3D-Trim-and-Level-9-require.patch 0072 COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/01-patches_qt5.12.12/0004-ANGLE-fix-usage-of-shared-handles-for-WinRT-applicat.patch 0073 COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/01-patches_qt5.12.12/0005-ANGLE-Fix-initialization-of-zero-sized-window.patch 0074 COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/01-patches_qt5.12.12/0006-ANGLE-winrt-Do-full-screen-update-if-the-the-window-.patch 0075 COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/01-patches_qt5.12.12/0007-Revert-Fix-scanForWantedComponents-not-ignoring-attr.patch 0076 COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/01-patches_qt5.12.12/0008-ANGLE-Disable-multisampling-to-avoid-crash-in-Qt-app.patch 0077 COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/01-patches_qt5.12.12/0009-ANGLE-Dynamically-load-D3D-compiler-from-a-list.patch 0078 COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/01-patches_qt5.12.12/0010-ANGLE-clean-up-displays-on-dll-unload.patch 0079 # Patches for building with CMake, with CMakeLists.txt referenced from vcpkg and modified: 0080 # https://github.com/microsoft/vcpkg/blob/5a8a1dfff8e2dffd4c8cc2d1fc0da379ffd18b25/ports/angle/CMakeLists.txt 0081 COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/02-patches_krita/0011-Fix-MinGW-build.patch 0082 COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/02-patches_krita/0012-Fix-Clang-MinGW-target-build.patch 0083 COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/02-patches_krita/0013-Add-CMake-build-file.patch 0084 COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/02-patches_krita/0014-CMake-Do-not-exclude-EGL-headers.patch 0085 # Patches for supporting HDR output on Windows: 0086 COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/02-patches_krita/0015-Implement-openGL-surface-color-space-selection-in-An.patch 0087 # Miscellaneous fixes: 0088 COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/02-patches_krita/0016-Reduce-flickering-when-resizing-window.patch 0089 COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/02-patches_krita/0017-Replace-extern-thread_local-to-avoid-GCC-mingw-w64-b.patch 0090 # Copy headers: 0091 COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/angle_commit.h ./ 0092 COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/angle_commit.h ./src/common/ 0093 # Copy third_party/zlib: 0094 COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/src-chromium_zlib ${CMAKE_CURRENT_BINARY_DIR}/src/third_party/zlib 0095 0096 INSTALL_DIR ${EXTPREFIX_googleangle} 0097 CMAKE_ARGS -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_googleangle} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} 0098 UPDATE_COMMAND "" 0099 0100 SOURCE_DIR src 0101 BINARY_DIR build 0102 STAMP_DIR stamps 0103 ) 0104 0105 # ANGLE requires `third_party/zlib` to be pulled separately. The git commit 0106 # that it expects can be found in the `DEPS` file at the root of the ANGLE 0107 # source tree. 0108 set(GOOGLE_ANGLE_THIRDPARTY_ZLIB_COMMIT "a6d209ab932df0f1c9d5b7dc67cfa74e8a3272c0") 0109 ExternalProject_Add( 0110 ext_googleangle_zlib 0111 0112 # DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR} 0113 # DOWNLOAD_NAME angle-zlib-${GOOGLE_ANGLE_THIRDPARTY_ZLIB_COMMIT}.tar.gz 0114 # URL https://chromium.googlesource.com/chromium/src/third_party/zlib/+archive/${GOOGLE_ANGLE_THIRDPARTY_ZLIB_COMMIT}.tar.gz 0115 # URL_HASH SHA256=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 0116 # Note: Don't use the archive from googlesource, they don't use deterministic 0117 # timestamps so the file changes every time. 0118 GIT_REPOSITORY https://chromium.googlesource.com/chromium/src/third_party/zlib 0119 GIT_TAG ${GOOGLE_ANGLE_THIRDPARTY_ZLIB_COMMIT} 0120 0121 UPDATE_COMMAND "" 0122 CONFIGURE_COMMAND "" 0123 BUILD_COMMAND "" 0124 INSTALL_COMMAND "" 0125 0126 SOURCE_DIR src-chromium_zlib 0127 STAMP_DIR stamps 0128 0129 STEP_TARGETS download 0130 ) 0131 0132 # This ensures that ANGLE's third_party/zlib will be downloaded before patching ANGLE. 0133 ExternalProject_Add_StepDependencies(ext_googleangle patch ext_googleangle_zlib-download) 0134 0135 # Generate `angle_commit.h` 0136 string(SUBSTRING "${GOOGLE_ANGLE_BASE_COMMIT}" 0 12 ANGLE_COMMIT_HASH) 0137 set(ANGLE_COMMIT_HASH "${ANGLE_COMMIT_HASH}+krita_qt5.12.12") 0138 string(LENGTH "${ANGLE_COMMIT_HASH}" ANGLE_COMMIT_HASH_SIZE) 0139 configure_file(angle_commit.h.in ${CMAKE_CURRENT_BINARY_DIR}/angle_commit.h)