2022-08-27 05:07:10 +08:00
if ( NOT X_VCPKG_FORCE_VCPKG_WAYLAND_LIBRARIES AND NOT VCPKG_TARGET_IS_WINDOWS )
message ( STATUS "Utils and libraries provided by '${PORT}' should be provided by your system! Install the required packages or force vcpkg libraries by setting X_VCPKG_FORCE_VCPKG_WAYLAND_LIBRARIES" )
set ( VCPKG_POLICY_EMPTY_PACKAGE enabled )
else ( )
vcpkg_from_gitlab (
G I T L A B _ U R L h t t p s : / / g i t l a b . f r e e d e s k t o p . o r g
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 w a y l a n d / w a y l a n d
2022-10-26 12:01:40 +08:00
R E F 8 1 3 5 e 8 5 6 e b d 7 9 8 7 2 f 8 8 6 4 6 6 e 9 c e e 3 9 a f f b 7 d 9 e e 8
S H A 5 1 2 c 4 1 1 5 1 8 7 8 2 6 0 8 3 e 5 f 0 1 a 2 4 d a d 0 c 4 3 7 7 4 5 8 b 7 c a 2 2 9 7 3 e a 1 6 1 e c 9 d 4 a e e b 2 1 8 6 9 b d b 9 a c d 7 b a 7 e 8 9 a b a 9 6 4 5 7 1 c e 2 f d e 3 1 9 c b 0 1 8 0 8 e 9 4 e 5 0 2 f f 0 9 0 6 1 b f 5 f b d 3 a 6 0 0 7 9
2022-08-27 05:07:10 +08:00
H E A D _ R E F m a s t e r
2022-10-26 12:01:40 +08:00
)
if ( VCPKG_CROSSCOMPILING )
set ( OPTIONS -Dscanner=false )
else ( )
set ( OPTIONS -Dscanner=true )
endif ( )
2022-08-27 05:07:10 +08:00
vcpkg_configure_meson (
S O U R C E _ P A T H " $ { S O U R C E _ P A T H } "
O P T I O N S - D d t d _ v a l i d a t i o n = f a l s e
- D d o c u m e n t a t i o n = f a l s e
- D t e s t s = f a l s e
2022-10-26 12:01:40 +08:00
$ { O P T I O N S }
2022-08-27 05:07:10 +08:00
)
vcpkg_install_meson ( )
if ( EXISTS "${CURRENT_PACKAGES_DIR}/lib/" AND VCPKG_LIBRARY_LINKAGE STREQUAL static )
file ( INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/src/${VCPKG_TARGET_STATIC_LIBRARY_PREFIX}wayland-private${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}"
D E S T I N A T I O N " $ { C U R R E N T _ P A C K A G E S _ D I R } / l i b " )
file ( INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/src/${VCPKG_TARGET_STATIC_LIBRARY_PREFIX}wayland-util${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}"
D E S T I N A T I O N " $ { C U R R E N T _ P A C K A G E S _ D I R } / l i b " )
endif ( )
if ( EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/" AND VCPKG_LIBRARY_LINKAGE STREQUAL static )
file ( INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/src/${VCPKG_TARGET_STATIC_LIBRARY_PREFIX}wayland-private${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}"
D E S T I N A T I O N " $ { C U R R E N T _ P A C K A G E S _ D I R } / d e b u g / l i b " )
file ( INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/src/${VCPKG_TARGET_STATIC_LIBRARY_PREFIX}wayland-util${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}"
D E S T I N A T I O N " $ { C U R R E N T _ P A C K A G E S _ D I R } / d e b u g / l i b " )
endif ( )
vcpkg_fixup_pkgconfig ( )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" )
# Handle copyright
file ( INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright )
file ( MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}" )
file ( RENAME "${CURRENT_PACKAGES_DIR}/bin/wayland-scanner${VCPKG_TARGET_EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/wayland-scanner${VCPKG_TARGET_EXECUTABLE_SUFFIX}" )
file ( MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}" )
file ( RENAME "${CURRENT_PACKAGES_DIR}/share/aclocal" "${CURRENT_PACKAGES_DIR}/share/${PORT}/aclocal" )
if ( VCPKG_LIBRARY_LINKAGE STREQUAL static OR NOT VCPKG_TARGET_IS_WINDOWS )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin" )
endif ( )
set ( _file "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/wayland-scanner.pc" )
if ( EXISTS "${_file}" )
file ( READ "${_file}" _contents )
string ( REPLACE "bindir=\${prefix}/bin" "bindir=\${prefix}/tools/${PORT}" _contents "${_contents}" )
file ( WRITE "${_file}" "${_contents}" )
endif ( )
set ( _file "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/wayland-scanner.pc" )
if ( EXISTS "${_file}" )
file ( READ "${_file}" _contents )
string ( REPLACE "bindir=\${prefix}/bin" "bindir=\${prefix}/../tools/${PORT}" _contents "${_contents}" )
file ( WRITE "${_file}" "${_contents}" )
endif ( )
endif ( )