2023-04-05 11:09:18 +08:00
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 l i b n i c e / l i b n i c e
R E F 0 . 1 . 2 1
S H A 5 1 2 8 8 0 8 5 2 3 d 6 6 3 d a 5 9 7 4 e 8 1 f f e e f 1 0 8 1 2 b 7 5 8 7 9 2 b 1 f 7 6 2 e d c 1 f 3 7 1 3 d 0 9 9 6 2 5 9 8 a 8 a 3 0 d 1 7 a c 1 9 8 5 4 3 8 3 6 1 d 2 a 2 8 4 b 9 b c 8 2 b 5 b a 1 e 8 d 7 3 c 6 e 1 c a 8 6 c 9 3 9 0 1 b c 0 6 b 6 3 4 e 9 a
H E A D _ R E F m a s t e r
P A T C H E S
s k i p _ l i b n i c e . p a t c h
)
set ( VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled )
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 g t k _ d o c = d i s a b l e d #Enable generating the API reference (depends on GTK-Doc)
- D i n t r o s p e c t i o n = d i s a b l e d #Enable GObject Introspection (depends on GObject)'
- D t e s t s = d i s a b l e d
- D e x a m p l e s = d i s a b l e d
- D g s t r e a m e r = e n a b l e d
- D c r y p t o - l i b r a r y = o p e n s s l
A D D I T I O N A L _ B I N A R I E S g l i b - g e n m a r s h a l = ' $ { C U R R E N T _ H O S T _ I N S T A L L E D _ D I R } / t o o l s / g l i b / g l i b - g e n m a r s h a l '
g l i b - m k e n u m s = ' $ { C U R R E N T _ H O S T _ I N S T A L L E D _ D I R } / t o o l s / g l i b / g l i b - m k e n u m s '
)
# Could be features:
# option('gupnp', type: 'feature', value: 'auto',
# description: 'Enable or disable GUPnP IGD support')
# option('ignored-network-interface-prefix', type: 'array', value: ['docker', 'veth', 'virbr', 'vnet'],
# description: 'Ignore network interfaces whose name starts with a string from this list in the ICE connection check algorithm. For example, "virbr" to ignore virtual bridge interfaces added by virtd, which do not help in finding connectivity.')
# option('crypto-library', type: 'combo', choices : ['auto', 'gnutls', 'openssl'], value : 'auto')
vcpkg_install_meson ( )
vcpkg_copy_pdbs ( )
if ( VCPKG_LIBRARY_LINKAGE STREQUAL "static" )
# Move plugin pkg-config file
file ( COPY "${CURRENT_PACKAGES_DIR}/lib/gstreamer-1.0/pkgconfig/gstnice.pc"
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 / p k g c o n f i g " )
file ( COPY "${CURRENT_PACKAGES_DIR}/debug/lib/gstreamer-1.0/pkgconfig/gstnice.pc"
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 / p k g c o n f i g " )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/gstreamer-1.0/pkgconfig/"
" $ { C U R R E N T _ P A C K A G E S _ D I R } / l i b / g s t r e a m e r - 1 . 0 / p k g c o n f i g / " )
endif ( )
vcpkg_fixup_pkgconfig ( )
vcpkg_install_copyright (
F I L E _ L I S T
" $ { S O U R C E _ P A T H } / C O P Y I N G "
" $ { S O U R C E _ P A T H } / C O P Y I N G . L G P L "
" $ { S O U R C E _ P A T H } / C O P Y I N G . M P L "
)
set ( USAGE_FILE "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" )
file ( WRITE "${USAGE_FILE}" "${PORT} usage:\n\n" )
if ( VCPKG_LIBRARY_LINKAGE STREQUAL dynamic )
set ( VCPKG_POLICY_SKIP_ABSOLUTE_PATHS_CHECK enabled )
2023-04-15 05:50:53 +08:00
file ( APPEND "${USAGE_FILE}" "\tMake sure one of the following paths is added to the 'GST_PLUGIN_PATH' environment variable\n" )
2023-04-05 11:09:18 +08:00
file ( APPEND "${USAGE_FILE}" "\tFor more information on GStreamer environment variables see https://gstreamer.freedesktop.org/documentation/gstreamer/running.html?gi-language=c#environment-variables\n" )
2023-04-15 05:50:53 +08:00
if ( NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug" )
file ( MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/plugins/gstreamer" )
file ( RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/gstreamer-1.0/${CMAKE_SHARED_LIBRARY_PREFIX}gstnice${CMAKE_SHARED_LIBRARY_SUFFIX}"
" $ { C U R R E N T _ P A C K A G E S _ D I R } / d e b u g / p l u g i n s / g s t r e a m e r / $ { C M A K E _ S H A R E D _ L I B R A R Y _ P R E F I X } g s t n i c e $ { C M A K E _ S H A R E D _ L I B R A R Y _ S U F F I X } " )
if ( VCPKG_TARGET_IS_WINDOWS )
file ( RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/gstreamer-1.0/gstnice.pdb"
" $ { C U R R E N T _ P A C K A G E S _ D I R } / d e b u g / p l u g i n s / g s t r e a m e r / g s t n i c e . p d b " )
else ( )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib" )
2023-04-05 11:09:18 +08:00
endif ( )
2023-04-15 05:50:53 +08:00
file ( APPEND "${USAGE_FILE}" "\t\t* '${CURRENT_INSTALLED_DIR}/debug/plugins/gstreamer/'\n" )
endif ( )
if ( NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release" )
file ( MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/plugins/gstreamer" )
file ( RENAME "${CURRENT_PACKAGES_DIR}/lib/gstreamer-1.0/${CMAKE_SHARED_LIBRARY_PREFIX}gstnice${CMAKE_SHARED_LIBRARY_SUFFIX}"
" $ { C U R R E N T _ P A C K A G E S _ D I R } / p l u g i n s / g s t r e a m e r / $ { C M A K E _ S H A R E D _ L I B R A R Y _ P R E F I X } g s t n i c e $ { C M A K E _ S H A R E D _ L I B R A R Y _ S U F F I X } " )
if ( VCPKG_TARGET_IS_WINDOWS )
file ( RENAME "${CURRENT_PACKAGES_DIR}/lib/gstreamer-1.0/gstnice.pdb"
" $ { C U R R E N T _ P A C K A G E S _ D I R } / p l u g i n s / g s t r e a m e r / g s t n i c e . p d b " )
else ( )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib" )
2023-04-05 11:09:18 +08:00
endif ( )
2023-04-15 05:50:53 +08:00
file ( APPEND "${USAGE_FILE}" "\t\t* '${CURRENT_INSTALLED_DIR}/plugins/gstreamer/'\n" )
2023-04-05 11:09:18 +08:00
endif ( )
else ( )
file ( APPEND "${USAGE_FILE}" "\tRegister static plugin with gst_plugin_register_static()\n" )
file ( APPEND "${USAGE_FILE}" "\thttps://gstreamer.freedesktop.org/documentation/application-development/appendix/compiling.html#embedding-static-elements-in-your-application\n" )
endif ( )