2019-12-24 06:39:17 +08:00
if ( VCPKG_TARGET_IS_LINUX )
2019-09-30 01:25:14 +08:00
message ( WARNING "Building with a gcc version less than 6.1 is not supported." )
2020-03-17 05:50:40 +08:00
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." )
2019-09-30 01:25:14 +08:00
endif ( )
2019-05-03 13:57:43 +08:00
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 )
2020-01-23 05:06:38 +08:00
elseif ( VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" )
set ( ANGLE_CPU_BITNESS ANGLE_IS_64_BIT_CPU )
2019-05-03 13:57:43 +08:00
else ( )
message ( FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}" )
endif ( )
vcpkg_from_github (
O U T _ S O U R C E _ P A T H S O U R C E _ P A T H
R E P O g o o g l e / a n g l e
2020-05-20 06:07:37 +08:00
R E F d 9 4 9 1 5 4 d a 4 2 8 b b 3 e 9 2 4 e 2 8 a 8 e a d f e 2 3 2 7 6 3 1 c 8 b b # chromium/4148
S H A 5 1 2 3 e f 1 c 9 4 f c c f c a 5 9 2 0 5 7 6 5 2 e 0 a d 3 0 5 e 3 0 2 5 1 8 4 6 7 5 e 2 3 2 3 a 7 1 4 4 2 8 e c 9 3 4 0 4 8 4 9 6 f b d 2 4 2 b 5 e 1 2 9 8 b b 5 e 3 b 3 0 5 8 b 5 3 d 5 4 f 6 8 8 9 e 4 4 6 c b d 8 1 a f 7 b e a 2 c c 6 d 5 e 1 3 c 7 3 5 6 b d
2020-04-07 05:49:51 +08:00
# On update check headers against opengl-registry
2020-01-23 05:06:38 +08:00
P A T C H E S
2019-05-03 13:57:43 +08:00
0 0 1 - f i x - u w p . p a t c h
2019-12-24 06:39:17 +08:00
0 0 2 - f i x - b u i l d e r - e r r o r . p a t c h
2019-05-03 13:57:43 +08:00
)
file ( COPY ${ CMAKE_CURRENT_LIST_DIR } /CMakeLists.txt DESTINATION ${ SOURCE_PATH } )
file ( COPY ${ CMAKE_CURRENT_LIST_DIR } /commit.h DESTINATION ${ SOURCE_PATH } )
2020-05-20 06:07:37 +08:00
file ( COPY ${ CMAKE_CURRENT_LIST_DIR } /commit.h DESTINATION ${ SOURCE_PATH } /src/common )
2019-05-03 13:57:43 +08:00
vcpkg_configure_cmake (
S O U R C E _ P A T H $ { S O U R C E _ P A T H }
P R E F E R _ N I N J A
O P T I O N S _ D E B U G - D D I S A B L E _ I N S T A L L _ H E A D E R S = 1
O P T I O N S
- D $ { A N G L E _ C P U _ B I T N E S S } = 1
)
vcpkg_install_cmake ( )
vcpkg_fixup_cmake_targets ( CONFIG_PATH share/unofficial-angle TARGET_PATH share/unofficial-angle )
vcpkg_copy_pdbs ( )
2019-12-24 06:39:17 +08:00
file ( INSTALL ${ SOURCE_PATH } /LICENSE DESTINATION ${ CURRENT_PACKAGES_DIR } /share/ ${ PORT } RENAME copyright )
2020-04-07 05:49:51 +08:00
# File conflict with opengl-registry! Make sure headers are similar on Update!
# angle defines some additional entrypoints.
# opengl-registry probably needs an upstream update to account for those
# Due to that all angle headers get moved to include/angle.
# If you want to use those instead of the onces provided by opengl-registry make sure
# VCPKG_INSTALLED_DIR/include/angle is before VCPKG_INSTALLED_DIR/include
file ( GLOB_RECURSE angle_includes "${CURRENT_PACKAGES_DIR}/include" )
file ( COPY ${ angle_includes } DESTINATION "${CURRENT_PACKAGES_DIR}/include/angle" )
set ( _double_files
i n c l u d e / G L E S / e g l . h
i n c l u d e / G L E S / g l . h
i n c l u d e / G L E S / g l e x t . h
i n c l u d e / G L E S / g l p l a t f o r m . h
i n c l u d e / G L E S 2 / g l 2 . h
i n c l u d e / G L E S 2 / g l 2 e x t . h
i n c l u d e / G L E S 2 / g l 2 p l a t f o r m . h
i n c l u d e / G L E S 3 / g l 3 . h
i n c l u d e / G L E S 3 / g l 3 1 . h
i n c l u d e / G L E S 3 / g l 3 2 . h
i n c l u d e / G L E S 3 / g l 3 p l a t f o r m . h )
foreach ( _file ${ _double_files } )
if ( EXISTS "${CURRENT_PACKAGES_DIR}/${_file}" )
file ( REMOVE "${CURRENT_PACKAGES_DIR}/${_file}" )
endif ( )
endforeach ( )