[angle] Fix regressions introduced in #4862: (#5922)

Reintroduces the unofficial:: targets.
PREFER_NINJA.
Small simplifications/modernizations.
This commit is contained in:
Robert Schumacher 2019-04-08 23:25:31 -07:00 committed by Phil Christensen
parent 9ca6603ca4
commit ccbef64605
3 changed files with 12 additions and 20 deletions

View File

@ -6,11 +6,6 @@ if(WIN32 AND NOT WINDOWS_STORE)
else() else()
set(WINDOWS_DESKTOP 0) set(WINDOWS_DESKTOP 0)
endif() endif()
if (WINDOWS_DESKTOP OR WINDOWS_STORE)
set(WINDOWS_ANY 1)
else()
set(WINDOWS_ANY 0)
endif()
if(UNIX AND NOT APPLE) if(UNIX AND NOT APPLE)
set(LINUX 1) set(LINUX 1)
@ -18,7 +13,7 @@ else()
set(LINUX 0) set(LINUX 0)
endif() endif()
if(WINDOWS_ANY) if(MSVC)
add_compile_options(/d2guard4 /Wv:18 /guard:cf /permissive) add_compile_options(/d2guard4 /Wv:18 /guard:cf /permissive)
else() else()
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 17)
@ -46,7 +41,7 @@ include_directories(include src ${CMAKE_CURRENT_BINARY_DIR}/include)
########## ##########
# angle::common # angle::common
if(WINDOWS_ANY) if(WIN32)
set(ANGLE_COMMON_PLATFORM_FILTER "_linux|_mac|_posix") set(ANGLE_COMMON_PLATFORM_FILTER "_linux|_mac|_posix")
elseif(LINUX) elseif(LINUX)
set(ANGLE_COMMON_PLATFORM_FILTER "_win|_mac") set(ANGLE_COMMON_PLATFORM_FILTER "_win|_mac")
@ -152,7 +147,7 @@ if(WINDOWS_DESKTOP OR LINUX OR APPLE)
endif() endif()
# D3D Renderers # D3D Renderers
if(WINDOWS_ANY) if(WIN32)
## All D3D Sources ## All D3D Sources
file(GLOB_RECURSE LIBANGLE_D3D_SOURCES file(GLOB_RECURSE LIBANGLE_D3D_SOURCES
"src/libANGLE/renderer/d3d/*.cpp" "src/libANGLE/renderer/d3d/*.cpp"
@ -197,7 +192,7 @@ if(WINDOWS_ANY)
endif() endif()
## Core libANGLE library ## Core libANGLE library
if(WINDOWS_ANY) if(WIN32)
set(LIBANGLE_SOURCES_PLATFORM set(LIBANGLE_SOURCES_PLATFORM
"src/third_party/systeminfo/SystemInfo.cpp" "src/third_party/systeminfo/SystemInfo.cpp"
) )
@ -296,7 +291,7 @@ add_library(libEGL
) )
target_link_libraries(libEGL PRIVATE angle::common angle::libANGLE libGLESv2) target_link_libraries(libEGL PRIVATE angle::common angle::libANGLE libGLESv2)
target_include_directories(libEGL PUBLIC "$<INSTALL_INTERFACE:include>") target_include_directories(libEGL PUBLIC "$<INSTALL_INTERFACE:include>")
target_include_directories(libEGL PUBLIC "${CMAKE_CURRENT_LIST_DIR}/include") target_include_directories(libEGL PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>")
SET_TARGET_PROPERTIES(libANGLE PROPERTIES PREFIX "") SET_TARGET_PROPERTIES(libANGLE PROPERTIES PREFIX "")
@ -309,7 +304,7 @@ install(TARGETS libEGL libGLESv2 EXPORT ANGLEExport
ARCHIVE DESTINATION lib 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) if(NOT DISABLE_INSTALL_HEADERS)
install( install(
@ -322,4 +317,3 @@ if(NOT DISABLE_INSTALL_HEADERS)
PATTERN "export.h" EXCLUDE PATTERN "export.h" EXCLUDE
) )
endif() endif()

View File

@ -1,5 +1,5 @@
Source: angle 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. 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. 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 Build-Depends: egl-registry

View File

@ -20,10 +20,8 @@ vcpkg_from_github(
REPO google/angle REPO google/angle
REF chromium/3672 REF chromium/3672
SHA512 dd6a05f0f1f4544b8646c41ffcb4d5e3b41f5261771ada47889345a24d4e55e6370df55a26c354a7073efcde307644cec6c6064ea6fe498ed6b52c3017249f81 SHA512 dd6a05f0f1f4544b8646c41ffcb4d5e3b41f5261771ada47889345a24d4e55e6370df55a26c354a7073efcde307644cec6c6064ea6fe498ed6b52c3017249f81
) PATCHES
vcpkg_apply_patches( 001-fix-uwp.patch
SOURCE_PATH ${SOURCE_PATH}
PATCHES ${CMAKE_CURRENT_LIST_DIR}/001-fix-uwp.patch
) )
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
@ -31,6 +29,7 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/commit.h DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake( vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH} SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=1 OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=1
OPTIONS OPTIONS
-D${ANGLE_CPU_BITNESS}=1 -D${ANGLE_CPU_BITNESS}=1
@ -38,8 +37,7 @@ vcpkg_configure_cmake(
vcpkg_install_cmake() vcpkg_install_cmake()
#vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-angle) vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-angle TARGET_PATH share/unofficial-angle)
#file(RENAME ${CURRENT_PACKAGES_DIR}/share/angle ${CURRENT_PACKAGES_DIR}/share/unofficial-angle)
vcpkg_copy_pdbs() vcpkg_copy_pdbs()