]>
Commit | Line | Data |
---|---|---|
1e59de90 TL |
1 | if (VCPKG_TARGET_IS_LINUX) |
2 | message(WARNING "Building with a gcc version less than 6.1 is not supported.") | |
3 | message(WARNING "${PORT} currently requires the following libraries from the system package manager:\n libx11-dev\n libmesa-dev\n libxi-dev\n libxext-dev\n\nThese can be installed on Ubuntu systems via apt-get install libx11-dev libmesa-dev libxi-dev libxext-dev.") | |
4 | endif() | |
5 | ||
6 | if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") | |
7 | set(ANGLE_CPU_BITNESS ANGLE_IS_32_BIT_CPU) | |
8 | elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") | |
9 | set(ANGLE_CPU_BITNESS ANGLE_IS_64_BIT_CPU) | |
10 | elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") | |
11 | set(ANGLE_CPU_BITNESS ANGLE_IS_32_BIT_CPU) | |
12 | elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") | |
13 | set(ANGLE_CPU_BITNESS ANGLE_IS_64_BIT_CPU) | |
14 | else() | |
15 | message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") | |
16 | endif() | |
17 | ||
18 | vcpkg_from_github( | |
19 | OUT_SOURCE_PATH SOURCE_PATH | |
20 | REPO google/angle | |
21 | REF d949154da428bb3e924e28a8eadfe2327631c8bb # chromium/4148 | |
22 | SHA512 3ef1c94fccfca592057652e0ad305e3025184675e2323a714428ec934048496fbd242b5e1298bb5e3b3058b53d54f6889e446cbd81af7bea2cc6d5e13c7356bd | |
23 | # On update check headers against opengl-registry | |
24 | PATCHES | |
25 | 001-fix-uwp.patch | |
26 | 002-fix-builder-error.patch | |
27 | ) | |
28 | ||
29 | file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) | |
30 | file(COPY ${CMAKE_CURRENT_LIST_DIR}/commit.h DESTINATION ${SOURCE_PATH}) | |
31 | file(COPY ${CMAKE_CURRENT_LIST_DIR}/commit.h DESTINATION ${SOURCE_PATH}/src/common) | |
32 | ||
33 | vcpkg_configure_cmake( | |
34 | SOURCE_PATH ${SOURCE_PATH} | |
35 | PREFER_NINJA | |
36 | OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=1 | |
37 | OPTIONS | |
38 | -D${ANGLE_CPU_BITNESS}=1 | |
39 | ) | |
40 | ||
41 | vcpkg_install_cmake() | |
42 | ||
43 | vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-angle TARGET_PATH share/unofficial-angle) | |
44 | ||
45 | vcpkg_copy_pdbs() | |
46 | ||
47 | file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) | |
48 | ||
49 | # File conflict with opengl-registry! Make sure headers are similar on Update! | |
50 | # angle defines some additional entrypoints. | |
51 | # opengl-registry probably needs an upstream update to account for those | |
52 | # Due to that all angle headers get moved to include/angle. | |
53 | # If you want to use those instead of the onces provided by opengl-registry make sure | |
54 | # VCPKG_INSTALLED_DIR/include/angle is before VCPKG_INSTALLED_DIR/include | |
55 | file(GLOB_RECURSE angle_includes "${CURRENT_PACKAGES_DIR}/include") | |
56 | file(COPY ${angle_includes} DESTINATION "${CURRENT_PACKAGES_DIR}/include/angle") | |
57 | ||
58 | set(_double_files | |
59 | include/GLES/egl.h | |
60 | include/GLES/gl.h | |
61 | include/GLES/glext.h | |
62 | include/GLES/glplatform.h | |
63 | include/GLES2/gl2.h | |
64 | include/GLES2/gl2ext.h | |
65 | include/GLES2/gl2platform.h | |
66 | include/GLES3/gl3.h | |
67 | include/GLES3/gl31.h | |
68 | include/GLES3/gl32.h | |
69 | include/GLES3/gl3platform.h) | |
70 | foreach(_file ${_double_files}) | |
71 | if(EXISTS "${CURRENT_PACKAGES_DIR}/${_file}") | |
72 | file(REMOVE "${CURRENT_PACKAGES_DIR}/${_file}") | |
73 | endif() | |
74 | endforeach() | |
75 | ||
76 |