2017-02-10 01:13:52 +08:00
include ( vcpkg_common_functions )
2019-05-03 13:57:43 +08:00
vcpkg_check_linkage ( ONLY_DYNAMIC_LIBRARY )
2017-05-11 05:15:02 +08:00
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 a n h o l t / l i b e p o x y
2019-05-22 12:00:24 +08:00
R E F 1 . 5 . 3
S H A 5 1 2 e 8 3 1 f 4 f 9 1 8 f 0 8 f d 5 f 7 9 9 5 0 1 e f c 0 e 2 3 b 8 d 4 0 4 4 7 8 6 5 1 6 3 4 f 5 e 7 b 3 5 f 8 e b c c 2 9 d 9 1 a b c 4 4 7 a b 2 0 d a 0 6 2 d d e 5 b e 7 5 e 1 8 c b 3 9 f f e a 7 0 8 6 8 8 e 6 5 3 4 f 7 a b 2 5 7 b 9 4 9 f 9 c 5 3 d d c 8
2017-05-11 05:15:02 +08:00
H E A D _ R E F m a s t e r )
2017-02-10 01:13:52 +08:00
2019-09-18 01:12:33 +08:00
if ( VCPKG_TARGET_IS_WINDOWS )
vcpkg_configure_meson ( SOURCE_PATH ${ SOURCE_PATH }
O P T I O N S
- D e n a b l e - g l x = n o
- D e n a b l e - e g l = n o )
vcpkg_install_meson ( )
vcpkg_copy_pdbs ( )
else ( )
find_program ( autoreconf autoreconf )
if ( NOT autoreconf OR NOT EXISTS "/usr/share/doc/libgles2/copyright" )
message ( FATAL_ERROR "autoreconf and libgles2-mesa-dev must be installed before libepoxy can build. Install them with \" apt-get install dh-autoreconf libgles2-mesa-dev\ "." )
endif ( )
find_program ( MAKE make )
if ( NOT MAKE )
message ( FATAL_ERROR "MAKE not found" )
endif ( )
file ( REMOVE_RECURSE ${ SOURCE_PATH } /m4 )
file ( MAKE_DIRECTORY ${ SOURCE_PATH } /m4 )
set ( LIBEPOXY_CONFIG_ARGS "--enable-x11=yes --enable-glx=yes --enable-egl=yes" )
vcpkg_execute_required_process (
C O M M A N D " a u t o r e c o n f " - v - - i n s t a l l
W O R K I N G _ D I R E C T O R Y $ { S O U R C E _ P A T H }
L O G N A M E a u t o r e c o n f - $ { T A R G E T _ T R I P L E T }
)
message ( STATUS "Configuring ${TARGET_TRIPLET}" )
set ( OUT_PATH_RELEASE ${ CURRENT_BUILDTREES_DIR } /make-build- ${ TARGET_TRIPLET } -release )
file ( REMOVE_RECURSE ${ OUT_PATH_RELEASE } )
file ( MAKE_DIRECTORY ${ OUT_PATH_RELEASE } )
vcpkg_execute_required_process (
C O M M A N D " . / c o n f i g u r e " - - p r e f i x = $ { O U T _ P A T H _ R E L E A S E } " $ { L I B E P O X Y _ C O N F I G _ A R G S } "
W O R K I N G _ D I R E C T O R Y $ { S O U R C E _ P A T H }
L O G N A M E c o n f i g - $ { T A R G E T _ T R I P L E T }
)
message ( STATUS "Building ${TARGET_TRIPLET}" )
vcpkg_execute_required_process (
C O M M A N D m a k e
W O R K I N G _ D I R E C T O R Y $ { S O U R C E _ P A T H }
L O G N A M E b u i l d - $ { T A R G E T _ T R I P L E T } - r e l e a s e
)
message ( STATUS "Installing ${TARGET_TRIPLET}" )
vcpkg_execute_required_process (
C O M M A N D m a k e i n s t a l l
W O R K I N G _ D I R E C T O R Y $ { S O U R C E _ P A T H }
L O G N A M E i n s t a l l - $ { T A R G E T _ T R I P L E T } - r e l e a s e
)
file ( COPY ${ OUT_PATH_RELEASE } /include DESTINATION ${ CURRENT_PACKAGES_DIR } )
file ( COPY ${ OUT_PATH_RELEASE } /lib DESTINATION ${ CURRENT_PACKAGES_DIR } )
file ( RENAME ${ CURRENT_PACKAGES_DIR } /lib ${ CURRENT_PACKAGES_DIR } /bin )
endif ( )
2017-02-10 01:13:52 +08:00
2017-06-06 22:36:34 +08:00
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /share/pkgconfig )
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /debug/share/pkgconfig )
2017-02-10 01:13:52 +08:00
file ( COPY ${ SOURCE_PATH } /COPYING DESTINATION ${ CURRENT_PACKAGES_DIR } /share/libepoxy )
file ( RENAME ${ CURRENT_PACKAGES_DIR } /share/libepoxy/COPYING ${ CURRENT_PACKAGES_DIR } /share/libepoxy/copyright )