From ccbef646051dca6ddfb30e957aa77044c3a3bd11 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 8 Apr 2019 23:25:31 -0700 Subject: [PATCH] [angle] Fix regressions introduced in #4862: (#5922) Reintroduces the unofficial:: targets. PREFER_NINJA. Small simplifications/modernizations. --- ports/angle/CMakeLists.txt | 18 ++++++------------ ports/angle/CONTROL | 2 +- ports/angle/portfile.cmake | 12 +++++------- 3 files changed, 12 insertions(+), 20 deletions(-) diff --git a/ports/angle/CMakeLists.txt b/ports/angle/CMakeLists.txt index 82caf9289..f83f6294e 100644 --- a/ports/angle/CMakeLists.txt +++ b/ports/angle/CMakeLists.txt @@ -6,11 +6,6 @@ if(WIN32 AND NOT WINDOWS_STORE) else() set(WINDOWS_DESKTOP 0) endif() -if (WINDOWS_DESKTOP OR WINDOWS_STORE) - set(WINDOWS_ANY 1) -else() - set(WINDOWS_ANY 0) -endif() if(UNIX AND NOT APPLE) set(LINUX 1) @@ -18,7 +13,7 @@ else() set(LINUX 0) endif() -if(WINDOWS_ANY) +if(MSVC) add_compile_options(/d2guard4 /Wv:18 /guard:cf /permissive) else() set(CMAKE_CXX_STANDARD 17) @@ -46,7 +41,7 @@ include_directories(include src ${CMAKE_CURRENT_BINARY_DIR}/include) ########## # angle::common -if(WINDOWS_ANY) +if(WIN32) set(ANGLE_COMMON_PLATFORM_FILTER "_linux|_mac|_posix") elseif(LINUX) set(ANGLE_COMMON_PLATFORM_FILTER "_win|_mac") @@ -152,7 +147,7 @@ if(WINDOWS_DESKTOP OR LINUX OR APPLE) endif() # D3D Renderers -if(WINDOWS_ANY) +if(WIN32) ## All D3D Sources file(GLOB_RECURSE LIBANGLE_D3D_SOURCES "src/libANGLE/renderer/d3d/*.cpp" @@ -197,7 +192,7 @@ if(WINDOWS_ANY) endif() ## Core libANGLE library -if(WINDOWS_ANY) +if(WIN32) set(LIBANGLE_SOURCES_PLATFORM "src/third_party/systeminfo/SystemInfo.cpp" ) @@ -296,7 +291,7 @@ add_library(libEGL ) target_link_libraries(libEGL PRIVATE angle::common angle::libANGLE libGLESv2) target_include_directories(libEGL PUBLIC "$") -target_include_directories(libEGL PUBLIC "${CMAKE_CURRENT_LIST_DIR}/include") +target_include_directories(libEGL PUBLIC "$") SET_TARGET_PROPERTIES(libANGLE PROPERTIES PREFIX "") @@ -309,7 +304,7 @@ install(TARGETS libEGL libGLESv2 EXPORT ANGLEExport ARCHIVE DESTINATION lib ) -#install(EXPORT ANGLEExport FILE unofficial-angle-config.cmake NAMESPACE unofficial::angle:: DESTINATION share/unofficial-angle) +install(EXPORT ANGLEExport FILE unofficial-angle-config.cmake NAMESPACE unofficial::angle:: DESTINATION share/unofficial-angle) if(NOT DISABLE_INSTALL_HEADERS) install( @@ -322,4 +317,3 @@ if(NOT DISABLE_INSTALL_HEADERS) PATTERN "export.h" EXCLUDE ) endif() - diff --git a/ports/angle/CONTROL b/ports/angle/CONTROL index afdb07262..8fd8e8523 100644 --- a/ports/angle/CONTROL +++ b/ports/angle/CONTROL @@ -1,5 +1,5 @@ Source: angle -Version: 2019-03-13-c2ee2cc-1 +Version: 2019-03-13-c2ee2cc-2 Description: A conformant OpenGL ES implementation for Windows, Mac and Linux. The goal of ANGLE is to allow users of multiple operating systems to seamlessly run WebGL and other OpenGL ES content by translating OpenGL ES API calls to one of the hardware-supported APIs available for that platform. ANGLE currently provides translation from OpenGL ES 2.0 and 3.0 to desktop OpenGL, OpenGL ES, Direct3D 9, and Direct3D 11. Support for translation from OpenGL ES to Vulkan is underway, and future plans include compute shader support (ES 3.1) and MacOS support. Build-Depends: egl-registry diff --git a/ports/angle/portfile.cmake b/ports/angle/portfile.cmake index 3799a24b7..2ad6a7553 100644 --- a/ports/angle/portfile.cmake +++ b/ports/angle/portfile.cmake @@ -20,17 +20,16 @@ vcpkg_from_github( REPO google/angle REF chromium/3672 SHA512 dd6a05f0f1f4544b8646c41ffcb4d5e3b41f5261771ada47889345a24d4e55e6370df55a26c354a7073efcde307644cec6c6064ea6fe498ed6b52c3017249f81 -) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/001-fix-uwp.patch + 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} + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=1 OPTIONS -D${ANGLE_CPU_BITNESS}=1 @@ -38,8 +37,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -#vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-angle) -#file(RENAME ${CURRENT_PACKAGES_DIR}/share/angle ${CURRENT_PACKAGES_DIR}/share/unofficial-angle) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-angle TARGET_PATH share/unofficial-angle) vcpkg_copy_pdbs()