vcpkg/ports/angle/portfile.cmake
driver1998 c97c23ce0a [angle] Update to 2019-12-31 (#9557)
* [angle] Update to 2019-12-31

* [angle] install *.inc files
2020-01-22 13:06:38 -08:00

47 lines
1.5 KiB
CMake

vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
if (VCPKG_TARGET_IS_LINUX)
message(WARNING "Building with a gcc version less than 6.1 is not supported.")
endif()
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(ANGLE_CPU_BITNESS ANGLE_IS_32_BIT_CPU)
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
set(ANGLE_CPU_BITNESS ANGLE_IS_64_BIT_CPU)
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
set(ANGLE_CPU_BITNESS ANGLE_IS_32_BIT_CPU)
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
set(ANGLE_CPU_BITNESS ANGLE_IS_64_BIT_CPU)
else()
message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}")
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/angle
REF 1fdf6ca5141d8e349e875eab6e51d93d929a7f0e
SHA512 2553307f3d10b5c32166b9ed610b4b15310dccba00c644cd35026de86d87ea2e221c2e528f33b02f01c1ded2f08150e429de1fa300b73d655f8944f6f5047a82
PATCHES
001-fix-uwp.patch
002-fix-builder-error.patch
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/commit.h DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=1
OPTIONS
-D${ANGLE_CPU_BITNESS}=1
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-angle TARGET_PATH share/unofficial-angle)
vcpkg_copy_pdbs()
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)