mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 20:03:02 +08:00
[libnice] Update to 0.1.18 (#20556)
* update libnice * version stuff * update format and add license * update version Co-authored-by: LilyWangLL <v-lilywang@microsoft.com>
This commit is contained in:
parent
d8783052cb
commit
a116481681
@ -1,159 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 3.19)
|
|
||||||
project(libnice
|
|
||||||
LANGUAGES C
|
|
||||||
VERSION 0.1.15)
|
|
||||||
SET (this_target libnice)
|
|
||||||
|
|
||||||
if (WIN32)
|
|
||||||
add_definitions(
|
|
||||||
-D_CRT_SECURE_NO_WARNINGS
|
|
||||||
-D_SCL_SECURE_NO_WARNINGS
|
|
||||||
-DHAVE_OPENSSL
|
|
||||||
-DPACKAGE_STRING="${PROJECT_VERSION}")
|
|
||||||
else()
|
|
||||||
add_definitions(
|
|
||||||
-DHAVE_OPENSSL
|
|
||||||
-DPACKAGE_STRING="${PROJECT_VERSION}"
|
|
||||||
-DHAVE_NETDB_H=1)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/win32/vs9/config.h ${CMAKE_SOURCE_DIR}/config.h COPYONLY)
|
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/win32/vs9/libnice.def ${CMAKE_SOURCE_DIR}/libnice.def COPYONLY)
|
|
||||||
|
|
||||||
find_package(PkgConfig REQUIRED)
|
|
||||||
pkg_check_modules(GLIB2 glib-2.0 gobject-2.0 gmodule-2.0 gio-2.0 IMPORTED_TARGET)
|
|
||||||
find_library(IPHLPAPI_LIBRARY iphlpapi)
|
|
||||||
find_library(WS2_32_LIB ws2_32)
|
|
||||||
find_library(ADVAPI32_LIB advapi32)
|
|
||||||
find_package(OpenSSL REQUIRED)
|
|
||||||
include_directories(
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/agent
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/random
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/socket
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/stun
|
|
||||||
${GLIB2_INCLUDE_DIRS})
|
|
||||||
|
|
||||||
|
|
||||||
SET (SRCS
|
|
||||||
./agent/address.c
|
|
||||||
./agent/agent-enum-types.c
|
|
||||||
./agent/agent.c
|
|
||||||
./agent/candidate.c
|
|
||||||
./agent/component.c
|
|
||||||
./agent/conncheck.c
|
|
||||||
./agent/debug.c
|
|
||||||
./agent/discovery.c
|
|
||||||
./agent/inputstream.c
|
|
||||||
./agent/interfaces.c
|
|
||||||
./agent/iostream.c
|
|
||||||
./agent/outputstream.c
|
|
||||||
./agent/pseudotcp.c
|
|
||||||
./agent/stream.c
|
|
||||||
./random/random-glib.c
|
|
||||||
./random/random.c
|
|
||||||
./random/test.c
|
|
||||||
./socket/http.c
|
|
||||||
./socket/pseudossl.c
|
|
||||||
./socket/socket.c
|
|
||||||
./socket/socks5.c
|
|
||||||
./socket/tcp-active.c
|
|
||||||
./socket/tcp-bsd.c
|
|
||||||
./socket/tcp-passive.c
|
|
||||||
./socket/udp-bsd.c
|
|
||||||
./socket/udp-turn-over-tcp.c
|
|
||||||
./socket/udp-turn.c
|
|
||||||
./stun/debug.c
|
|
||||||
./stun/rand.c
|
|
||||||
./stun/stun5389.c
|
|
||||||
./stun/stunagent.c
|
|
||||||
./stun/stuncrc32.c
|
|
||||||
./stun/stunhmac.c
|
|
||||||
./stun/stunmessage.c
|
|
||||||
./stun/usages/bind.c
|
|
||||||
./stun/usages/ice.c
|
|
||||||
./stun/usages/timer.c
|
|
||||||
./stun/usages/turn.c
|
|
||||||
./stun/utils.c
|
|
||||||
./libnice.def
|
|
||||||
)
|
|
||||||
SET(HEADERS
|
|
||||||
./agent/address.h
|
|
||||||
./agent/agent-enum-types.h
|
|
||||||
./agent/agent-priv.h
|
|
||||||
./agent/agent.h
|
|
||||||
./agent/candidate.h
|
|
||||||
./agent/component.h
|
|
||||||
./agent/conncheck.h
|
|
||||||
./agent/debug.h
|
|
||||||
./agent/discovery.h
|
|
||||||
./agent/inputstream.h
|
|
||||||
./agent/interfaces.h
|
|
||||||
./agent/iostream.h
|
|
||||||
./agent/outputstream.h
|
|
||||||
./agent/pseudotcp.h
|
|
||||||
./agent/stream.h
|
|
||||||
./config.h
|
|
||||||
./nice/nice.h
|
|
||||||
./random/random-glib.h
|
|
||||||
./random/random.h
|
|
||||||
./socket/http.h
|
|
||||||
./socket/pseudossl.h
|
|
||||||
./socket/socket-priv.h
|
|
||||||
./socket/socket.h
|
|
||||||
./socket/socks5.h
|
|
||||||
./socket/tcp-active.h
|
|
||||||
./socket/tcp-bsd.h
|
|
||||||
./socket/tcp-passive.h
|
|
||||||
./socket/udp-bsd.h
|
|
||||||
./socket/udp-turn-over-tcp.h
|
|
||||||
./socket/udp-turn.h
|
|
||||||
./stun/constants.h
|
|
||||||
./stun/debug.h
|
|
||||||
./stun/rand.h
|
|
||||||
./stun/stun5389.h
|
|
||||||
./stun/stunagent.h
|
|
||||||
./stun/stuncrc32.h
|
|
||||||
./stun/stunhmac.h
|
|
||||||
./stun/stunmessage.h
|
|
||||||
./stun/tools/stund.h
|
|
||||||
./stun/usages/bind.h
|
|
||||||
./stun/usages/ice.h
|
|
||||||
./stun/usages/timer.h
|
|
||||||
./stun/usages/turn.h
|
|
||||||
./stun/utils.h
|
|
||||||
./stun/win32_common.h
|
|
||||||
./win32/vs9/config.h
|
|
||||||
)
|
|
||||||
add_library(libnice ${SRCS} ${HEADERS})
|
|
||||||
if (MSVC)
|
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/wd4244 /wd4005 /wd4391 /wd4142 /wd4267")
|
|
||||||
endif()
|
|
||||||
if (WIN32)
|
|
||||||
target_link_libraries(libnice ${IPHLPAPI_LIBRARY} ${WS2_32_LIB} ${ADVAPI32_LIB} PkgConfig::GLIB2 OpenSSL::SSL)
|
|
||||||
else()
|
|
||||||
target_link_libraries(libnice PkgConfig::GLIB2 OpenSSL::SSL)
|
|
||||||
endif()
|
|
||||||
install(TARGETS libnice
|
|
||||||
RUNTIME DESTINATION bin
|
|
||||||
ARCHIVE DESTINATION lib
|
|
||||||
LIBRARY DESTINATION lib)
|
|
||||||
|
|
||||||
if (CMAKE_BUILD_TYPE STREQUAL "Release")
|
|
||||||
install(FILES agent/address.h DESTINATION include/nice)
|
|
||||||
install(FILES agent/agent.h DESTINATION include/nice)
|
|
||||||
install(FILES agent/candidate.h DESTINATION include/nice)
|
|
||||||
install(FILES agent/debug.h DESTINATION include/nice)
|
|
||||||
install(FILES agent/interfaces.h DESTINATION include/nice)
|
|
||||||
install(FILES nice/nice.h DESTINATION include/nice)
|
|
||||||
install(FILES agent/pseudotcp.h DESTINATION include/nice)
|
|
||||||
install(FILES stun/constants.h DESTINATION include/stun)
|
|
||||||
install(FILES stun/debug.h DESTINATION include/stun)
|
|
||||||
install(FILES stun/stunagent.h DESTINATION include/stun)
|
|
||||||
install(FILES stun/stunmessage.h DESTINATION include/stun)
|
|
||||||
install(FILES stun/usages/bind.h DESTINATION include/stun/usages)
|
|
||||||
install(FILES stun/usages/ice.h DESTINATION include/stun/usages)
|
|
||||||
install(FILES stun/usages/timer.h DESTINATION include/stun/usages)
|
|
||||||
install(FILES stun/usages/turn.h DESTINATION include/stun/usages)
|
|
||||||
install(FILES stun/win32_common.h DESTINATION include/stun)
|
|
||||||
endif()
|
|
@ -1,30 +1,40 @@
|
|||||||
vcpkg_download_distfile(
|
vcpkg_from_gitlab(
|
||||||
ARCHIVE
|
GITLAB_URL https://gitlab.freedesktop.org
|
||||||
URLS "https://nice.freedesktop.org/releases/libnice-0.1.15.tar.gz"
|
|
||||||
FILENAME "libnice-0.1.15.tar.gz"
|
|
||||||
SHA512 60a8bcca06c0ab300dfabbf13e45aeac2085d553c420c5cc4d2fdeb46b449b2b9c9aee8015b0662c16bd1cecf5a49824b7e24951a8a0b66a87074cb00a619c0c
|
|
||||||
)
|
|
||||||
vcpkg_extract_source_archive_ex(
|
|
||||||
ARCHIVE ${ARCHIVE}
|
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
)
|
REPO libnice/libnice
|
||||||
|
REF 55b71d47f2b427b3baa8812818ed3f059acc748d # 0.1.18
|
||||||
|
SHA512 78575c487d74734d2dff1c04103fd55c76cf5e78edde03ffd68050348881a3efc985513cfd30553bfce0568c8edfcd61be7dea8991731efc749ee4fee2f503d6
|
||||||
|
HEAD_REF master
|
||||||
|
)
|
||||||
|
|
||||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
vcpkg_configure_meson(
|
||||||
vcpkg_find_acquire_program(PKGCONFIG)
|
|
||||||
vcpkg_configure_cmake(
|
|
||||||
SOURCE_PATH ${SOURCE_PATH}
|
SOURCE_PATH ${SOURCE_PATH}
|
||||||
PREFER_NINJA
|
|
||||||
DISABLE_PARALLEL_CONFIGURE
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}
|
-Dgtk_doc=disabled #Enable generating the API reference (depends on GTK-Doc)
|
||||||
OPTIONS_RELEASE -DOPTIMIZE=1
|
-Dintrospection=disabled #Enable GObject Introspection (depends on GObject)'
|
||||||
OPTIONS_DEBUG -DDEBUGGABLE=1
|
-Dtests=disabled
|
||||||
|
-Dexamples=disabled
|
||||||
|
-Dgstreamer=disabled
|
||||||
|
-Dcrypto-library=openssl
|
||||||
|
ADDITIONAL_NATIVE_BINARIES glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal'
|
||||||
|
glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums'
|
||||||
|
ADDITIONAL_CROSS_BINARIES glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal'
|
||||||
|
glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums'
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_install_cmake()
|
# 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()
|
vcpkg_copy_pdbs()
|
||||||
|
vcpkg_copy_tools(TOOL_NAMES stunbdc stund AUTO_CLEAN)
|
||||||
|
vcpkg_fixup_pkgconfig()
|
||||||
|
|
||||||
file(COPY ${SOURCE_PATH}/COPYING.LGPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
file(COPY "${SOURCE_PATH}/COPYING.LGPL" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||||
file(COPY ${SOURCE_PATH}/COPYING.MPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
file(COPY "${SOURCE_PATH}/COPYING.MPL" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||||
|
@ -1,11 +1,16 @@
|
|||||||
{
|
{
|
||||||
"name": "libnice",
|
"name": "libnice",
|
||||||
"version": "0.1.15",
|
"version": "0.1.18",
|
||||||
"port-version": 7,
|
|
||||||
"description": "Libnice is an implementation of the IETF's Interactive Connectivity Establishment (ICE) standard (RFC 5245) and the Session Traversal Utilities for NAT (STUN) standard (RFC 5389).",
|
"description": "Libnice is an implementation of the IETF's Interactive Connectivity Establishment (ICE) standard (RFC 5245) and the Session Traversal Utilities for NAT (STUN) standard (RFC 5389).",
|
||||||
"homepage": "https://nice.freedesktop.org",
|
"homepage": "https://nice.freedesktop.org",
|
||||||
|
"license": "LGPL-2.1-only",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"glib",
|
"glib",
|
||||||
|
{
|
||||||
|
"name": "glib",
|
||||||
|
"host": true,
|
||||||
|
"default-features": false
|
||||||
|
},
|
||||||
"openssl"
|
"openssl"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -3729,8 +3729,8 @@
|
|||||||
"port-version": 5
|
"port-version": 5
|
||||||
},
|
},
|
||||||
"libnice": {
|
"libnice": {
|
||||||
"baseline": "0.1.15",
|
"baseline": "0.1.18",
|
||||||
"port-version": 7
|
"port-version": 0
|
||||||
},
|
},
|
||||||
"libnoise": {
|
"libnoise": {
|
||||||
"baseline": "1.0.0",
|
"baseline": "1.0.0",
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
{
|
{
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"git-tree": "0317c7f34e075c4ebad894b0a6fffed8657f93e5",
|
||||||
|
"version": "0.1.18",
|
||||||
|
"port-version": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"git-tree": "5149e313236cfc0ae0e7352e6d151559564bd657",
|
"git-tree": "5149e313236cfc0ae0e7352e6d151559564bd657",
|
||||||
"version": "0.1.15",
|
"version": "0.1.15",
|
||||||
|
Loading…
Reference in New Issue
Block a user