Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port for libsrtp #8046

Merged
merged 3 commits into from
Sep 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ports/libsrtp/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Source: libsrtp
Version: 2.2.0
Description: This package provides an implementation of the Secure Real-time Transport Protocol (SRTP), the Universal Security Transform (UST), and a supporting cryptographic kernel.
33 changes: 33 additions & 0 deletions ports/libsrtp/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
include(vcpkg_common_functions)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO cisco/libsrtp
REF 56a065555aea2abddaf9fb60353fe59f277837a3
SHA512 59afa25df79f875d28eefe95ef89b5956b1d2f319bba38ec34b832c2faa16b5425aae2f6ad19cf478afe02b28f4032b5dcf20a301d647d897d4577f66ca77376
)

if (VCPKG_TARGET_IS_WINDOWS)
set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS /wd4703")
set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS /wd4703")
endif()

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)

vcpkg_install_cmake()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)

if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/srtp2.dll)
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin)
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/srtp2.dll ${CURRENT_PACKAGES_DIR}/bin/srtp2.dll)
endif()
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/srtp2.dll)
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/srtp2.dll ${CURRENT_PACKAGES_DIR}/debug/bin/srtp2.dll)
endif()

file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libsrtp RENAME copyright)