mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-30 14:47:49 +08:00
ccbef64605
Reintroduces the unofficial:: targets. PREFER_NINJA. Small simplifications/modernizations.
45 lines
1.4 KiB
CMake
45 lines
1.4 KiB
CMake
include(vcpkg_common_functions)
|
|
|
|
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)
|
|
else()
|
|
message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}")
|
|
endif()
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
message(STATUS "ANGLE currently only supports being built as a dynamic library")
|
|
set(VCPKG_LIBRARY_LINKAGE dynamic)
|
|
endif()
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO google/angle
|
|
REF chromium/3672
|
|
SHA512 dd6a05f0f1f4544b8646c41ffcb4d5e3b41f5261771ada47889345a24d4e55e6370df55a26c354a7073efcde307644cec6c6064ea6fe498ed6b52c3017249f81
|
|
PATCHES
|
|
001-fix-uwp.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/angle RENAME copyright)
|