aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLily <47812810+LilyWangL@users.noreply.github.com>2020-11-07 05:31:54 +0800
committerGitHub <noreply@github.com>2020-11-06 13:31:54 -0800
commit5a95fe218fb8bfbc00b40c952935c70d30dfb177 (patch)
tree9de7ba56edfe35f9a9cc3c63d9bd8212afcd511d
parent0e1252388d5353f031e177b2826bab98d6c2e21c (diff)
downloadvcpkg-5a95fe218fb8bfbc00b40c952935c70d30dfb177.tar.gz
vcpkg-5a95fe218fb8bfbc00b40c952935c70d30dfb177.zip
[libnice] Fix build error on Linux (#14248)
-rw-r--r--ports/libnice/CMakeLists.txt29
-rw-r--r--ports/libnice/CONTROL2
-rw-r--r--scripts/ci.baseline.txt2
3 files changed, 22 insertions, 11 deletions
diff --git a/ports/libnice/CMakeLists.txt b/ports/libnice/CMakeLists.txt
index da4c2ca6b..78224ecb2 100644
--- a/ports/libnice/CMakeLists.txt
+++ b/ports/libnice/CMakeLists.txt
@@ -4,11 +4,18 @@ project(libnice
VERSION 0.1.15)
SET (this_target libnice)
-add_definitions(
- -D_CRT_SECURE_NO_WARNINGS
- -D_SCL_SECURE_NO_WARNINGS
- -DHAVE_OPENSSL
- -DPACKAGE_STRING="${PROJECT_VERSION}")
+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)
@@ -121,8 +128,14 @@ SET(HEADERS
./win32/vs9/config.h
)
add_library(libnice ${SRCS} ${HEADERS})
-set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/wd4244 /wd4005 /wd4391 /wd4142 /wd4267")
-target_link_libraries(libnice ${IPHLPAPI_LIBRARY} ${WS2_32_LIB} ${ADVAPI32_LIB} ${GLIB_LIBRARY} ${GOBJECT_LIBRARY} ${GIO_LIBRARY} OpenSSL::SSL)
+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} ${GLIB_LIBRARY} ${GOBJECT_LIBRARY} ${GIO_LIBRARY} OpenSSL::SSL)
+else()
+ target_link_libraries(libnice ${GLIB_LIBRARY} ${GOBJECT_LIBRARY} ${GIO_LIBRARY} OpenSSL::SSL)
+endif()
install(TARGETS libnice
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
@@ -145,4 +158,4 @@ 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() \ No newline at end of file
+endif()
diff --git a/ports/libnice/CONTROL b/ports/libnice/CONTROL
index eabcc1255..106ee6064 100644
--- a/ports/libnice/CONTROL
+++ b/ports/libnice/CONTROL
@@ -1,6 +1,6 @@
Source: libnice
Version: 0.1.15
-Port-Version: 5
+Port-Version: 6
Homepage: https://nice.freedesktop.org
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).
Build-Depends: glib, openssl
diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt
index be4c1b8ec..31d1b21a9 100644
--- a/scripts/ci.baseline.txt
+++ b/scripts/ci.baseline.txt
@@ -730,8 +730,6 @@ libmpeg2:x64-osx=fail
libmpeg2:x64-uwp=fail
libmupdf:x64-osx=fail
libmysql:x86-windows=fail
-libnice:x64-linux=fail
-libnice:x64-osx=fail
libopenmpt:x64-linux=fail
libopenmpt:x64-osx=fail
libopusenc:arm-uwp=fail