2018-11-09 21:41:16 +08:00
vcpkg_check_linkage ( ONLY_STATIC_LIBRARY )
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 D a v 1 d d e / g l a d
2021-04-08 04:33:59 +08:00
R E F 7 e c e 5 3 8 8 5 6 b f 1 2 4 d 7 9 8 a b 3 2 3 c 8 e 1 e 6 4 e b b 8 3 c b 5 0
S H A 5 1 2 f 6 a 8 b a 7 d 0 d 0 9 b 8 9 c 2 3 b 6 f 7 6 9 6 2 d 3 e 6 e e f 1 b a b c 8 e 1 a 6 5 9 e 2 3 8 d 3 0 e 1 4 3 e b 3 3 c c b a 4 2 4 9 5 7 e 5 a 6 d 4 6 d 9 9 a 7 1 4 b f a 2 9 6 7 5 2 3 b 1 9 3 5 8 6 d 0 f f 2 4 e 2 9 a d 8 d 8 6 c 9 2 c 9 f a f 9 c 0 2
2018-11-09 21:41:16 +08:00
H E A D _ R E F m a s t e r
2021-04-08 04:33:59 +08:00
P A T C H E S e n c o d i n g . p a t c h f i n d _ p y t h o n . p a t c h
2018-11-09 21:41:16 +08:00
)
2021-04-08 04:33:59 +08:00
if ( NOT GLAD_PROFILE )
set ( GLAD_PROFILE "compatibility" )
endif ( )
message ( STATUS "This version of glad uses the compatibility profile. To use the core profile instead, create an overlay port of this with GLAD_PROFILE set to 'core' or set GLAD_PROFILE to 'core' in a custom triplet." )
message ( STATUS "This recipe is at ${CMAKE_CURRENT_LIST_DIR}" )
message ( STATUS "See the overlay ports documentation at https://github.com/microsoft/vcpkg/blob/master/docs/specifications/ports-overlay.md" )
vcpkg_check_features ( OUT_FEATURE_OPTIONS FEATURE_OPTIONS
F E A T U R E S
e x t e n s i o n s G L A D _ A L L _ E X T E N S I O N S
I N V E R T E D _ F E A T U R E S
l o a d e r G L A D _ N O _ L O A D E R
)
set ( GLAD_SPEC "gl" )
if ( "egl" IN_LIST FEATURES )
string ( APPEND GLAD_SPEC ",egl" )
endif ( )
if ( "wgl" IN_LIST FEATURES )
string ( APPEND GLAD_SPEC ",wgl" )
endif ( )
if ( "glx" IN_LIST FEATURES )
string ( APPEND GLAD_SPEC ",glx" )
endif ( )
if ( "gl-api-latest" IN_LIST FEATURES )
LIST ( APPEND GLAD_API "gl=" )
elseif ( "gl-api-10" IN_LIST FEATURES )
LIST ( APPEND GLAD_API "gl=1.0" )
elseif ( "gl-api-11" IN_LIST FEATURES )
LIST ( APPEND GLAD_API "gl=1.1" )
elseif ( "gl-api-12" IN_LIST FEATURES )
LIST ( APPEND GLAD_API "gl=1.2" )
elseif ( "gl-api-13" IN_LIST FEATURES )
LIST ( APPEND GLAD_API "gl=1.3" )
elseif ( "gl-api-14" IN_LIST FEATURES )
LIST ( APPEND GLAD_API "gl=1.4" )
elseif ( "gl-api-15" IN_LIST FEATURES )
LIST ( APPEND GLAD_API "gl=1.5" )
elseif ( "gl-api-20" IN_LIST FEATURES )
LIST ( APPEND GLAD_API "gl=2.0" )
elseif ( "gl-api-21" IN_LIST FEATURES )
LIST ( APPEND GLAD_API "gl=2.1" )
elseif ( "gl-api-30" IN_LIST FEATURES )
LIST ( APPEND GLAD_API "gl=3.0" )
elseif ( "gl-api-31" IN_LIST FEATURES )
LIST ( APPEND GLAD_API "gl=3.1" )
elseif ( "gl-api-32" IN_LIST FEATURES )
LIST ( APPEND GLAD_API "gl=3.2" )
elseif ( "gl-api-33" IN_LIST FEATURES )
LIST ( APPEND GLAD_API "gl=3.3" )
elseif ( "gl-api-40" IN_LIST FEATURES )
LIST ( APPEND GLAD_API "gl=4.0" )
elseif ( "gl-api-41" IN_LIST FEATURES )
LIST ( APPEND GLAD_API "gl=4.1" )
elseif ( "gl-api-42" IN_LIST FEATURES )
LIST ( APPEND GLAD_API "gl=4.2" )
elseif ( "gl-api-43" IN_LIST FEATURES )
LIST ( APPEND GLAD_API "gl=4.3" )
elseif ( "gl-api-44" IN_LIST FEATURES )
LIST ( APPEND GLAD_API "gl=4.4" )
elseif ( "gl-api-45" IN_LIST FEATURES )
LIST ( APPEND GLAD_API "gl=4.5" )
elseif ( "gl-api-46" IN_LIST FEATURES )
LIST ( APPEND GLAD_API "gl=4.6" )
endif ( )
if ( "gles1-api-latest" IN_LIST FEATURES )
LIST ( APPEND GLAD_API "gles1=" )
elseif ( "gles1-api-10" IN_LIST FEATURES )
LIST ( APPEND GLAD_API "gles1=1.0" )
endif ( )
if ( "gles2-api-latest" IN_LIST FEATURES )
LIST ( APPEND GLAD_API "gles2=" )
elseif ( "gles2-api-20" IN_LIST FEATURES )
LIST ( APPEND GLAD_API "gles2=2.0" )
elseif ( "gles2-api-30" IN_LIST FEATURES )
LIST ( APPEND GLAD_API "gles2=3.0" )
elseif ( "gles2-api-31" IN_LIST FEATURES )
LIST ( APPEND GLAD_API "gles2=3.1" )
elseif ( "gles2-api-32" IN_LIST FEATURES )
LIST ( APPEND GLAD_API "gles2=3.2" )
endif ( )
if ( "glsc2-api-latest" IN_LIST FEATURES )
LIST ( APPEND GLAD_API "glsc2=" )
elseif ( "glsc2-api-20" IN_LIST FEATURES )
LIST ( APPEND GLAD_API "glsc2=2.0" )
endif ( )
string ( REPLACE ";" "," GLAD_API "${GLAD_API}" )
2019-02-08 07:28:50 +08:00
vcpkg_find_acquire_program ( PYTHON3 )
2018-11-17 10:19:03 +08:00
file ( COPY
$ { C U R R E N T _ I N S T A L L E D _ D I R } / i n c l u d e / K H R / k h r p l a t f o r m . h
2021-04-08 04:33:59 +08:00
$ { C U R R E N T _ I N S T A L L E D _ D I R } / i n c l u d e / E G L / e g l p l a t f o r m . h
2018-11-17 10:19:03 +08:00
$ { C U R R E N T _ I N S T A L L E D _ D I R } / s h a r e / e g l - r e g i s t r y / e g l . x m l
$ { C U R R E N T _ I N S T A L L E D _ D I R } / s h a r e / o p e n g l - r e g i s t r y / g l . x m l
$ { C U R R E N T _ I N S T A L L E D _ D I R } / s h a r e / o p e n g l - r e g i s t r y / g l x . x m l
$ { C U R R E N T _ I N S T A L L E D _ D I R } / s h a r e / o p e n g l - r e g i s t r y / w g l . x m l
D E S T I N A T I O N $ { S O U R C E _ P A T H } / g l a d / f i l e s
)
2018-11-14 07:02:29 +08:00
2021-04-08 04:33:59 +08:00
vcpkg_cmake_configure (
2018-11-09 21:41:16 +08:00
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 G L A D _ E X P O R T = O F F
- D G L A D _ I N S T A L L = O N
- D G L A D _ R E P R O D U C I B L E = O N
2021-04-08 04:33:59 +08:00
- D G L A D _ S P E C = $ { G L A D _ S P E C }
- D G L A D _ A P I = $ { G L A D _ A P I }
- D G L A D _ P R O F I L E = $ { G L A D _ P R O F I L E }
2020-04-30 15:23:48 +08:00
- D P Y T H O N _ E X E C U T A B L E = $ { P Y T H O N 3 }
2021-04-08 04:33:59 +08:00
$ { F E A T U R E _ O P T I O N S }
2018-11-09 21:41:16 +08:00
O P T I O N S _ D E B U G
- D G L A D _ G E N E R A T O R = " c - d e b u g "
2021-04-08 04:33:59 +08:00
O P T I O N S _ R E L E A S E
- D G L A D _ G E N E R A T O R = " c "
2018-11-09 21:41:16 +08:00
)
2021-04-08 04:33:59 +08:00
vcpkg_cmake_install ( )
2018-11-09 21:41:16 +08:00
vcpkg_copy_pdbs ( )
2021-04-08 04:33:59 +08:00
vcpkg_cmake_config_fixup ( CONFIG_PATH lib/cmake/glad )
2018-11-09 21:41:16 +08:00
2018-11-17 10:19:03 +08:00
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /debug/include ${ CURRENT_PACKAGES_DIR } /include/KHR )
2021-04-08 04:33:59 +08:00
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /debug/include ${ CURRENT_PACKAGES_DIR } /include/EGL )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" )
2020-01-16 02:32:11 +08:00
file ( INSTALL ${ SOURCE_PATH } /LICENSE DESTINATION ${ CURRENT_PACKAGES_DIR } /share/ ${ PORT } RENAME copyright )