]> git.proxmox.com Git - ceph.git/blame - ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/angle/portfile.cmake
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / tools / vcpkg / ports / angle / portfile.cmake
CommitLineData
1e59de90
TL
1if (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.")
4endif()
5
6if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
7 set(ANGLE_CPU_BITNESS ANGLE_IS_32_BIT_CPU)
8elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
9 set(ANGLE_CPU_BITNESS ANGLE_IS_64_BIT_CPU)
10elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
11 set(ANGLE_CPU_BITNESS ANGLE_IS_32_BIT_CPU)
12elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
13 set(ANGLE_CPU_BITNESS ANGLE_IS_64_BIT_CPU)
14else()
15 message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}")
16endif()
17
18vcpkg_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
29file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
30file(COPY ${CMAKE_CURRENT_LIST_DIR}/commit.h DESTINATION ${SOURCE_PATH})
31file(COPY ${CMAKE_CURRENT_LIST_DIR}/commit.h DESTINATION ${SOURCE_PATH}/src/common)
32
33vcpkg_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
41vcpkg_install_cmake()
42
43vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-angle TARGET_PATH share/unofficial-angle)
44
45vcpkg_copy_pdbs()
46
47file(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
55file(GLOB_RECURSE angle_includes "${CURRENT_PACKAGES_DIR}/include")
56file(COPY ${angle_includes} DESTINATION "${CURRENT_PACKAGES_DIR}/include/angle")
57
58set(_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)
70foreach(_file ${_double_files})
71 if(EXISTS "${CURRENT_PACKAGES_DIR}/${_file}")
72 file(REMOVE "${CURRENT_PACKAGES_DIR}/${_file}")
73 endif()
74endforeach()
75
76