diff --git a/vcpkg_ports/gamenetworkingsockets/CONTROL b/vcpkg_ports/gamenetworkingsockets/CONTROL new file mode 100644 index 0000000..6a97f91 --- /dev/null +++ b/vcpkg_ports/gamenetworkingsockets/CONTROL @@ -0,0 +1,14 @@ +Source: gamenetworkingsockets +Version: 2020-07-10 +Description: GameNetworkingSockets is a basic transport layer for games. +Homepage: https://github.com/ValveSoftware/GameNetworkingSockets +Build-Depends: protobuf +Default-Features: openssl + +Feature: openssl +Description: Use OpenSSL as the crypto backend +Build-Depends: openssl + +Feature: libsodium +Description: Use libsodium as the crypto backend +Build-Depends: libsodium \ No newline at end of file diff --git a/vcpkg_ports/gamenetworkingsockets/portfile.cmake b/vcpkg_ports/gamenetworkingsockets/portfile.cmake new file mode 100644 index 0000000..95540c8 --- /dev/null +++ b/vcpkg_ports/gamenetworkingsockets/portfile.cmake @@ -0,0 +1,30 @@ +set(SOURCE_PATH "${CMAKE_CURRENT_LIST_DIR}/../..") + +if(openssl IN_LIST FEATURES) + set(CRYPTO_BACKEND OpenSSL) +endif() + +if(libsodium IN_LIST FEATURES) + set(CRYPTO_BACKEND libsodium) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DGAMENETWORKINGSOCKETS_BUILD_TESTS=OFF + -DGAMENETWORKINGSOCKETS_BUILD_EXAMPLES=OFF + -DUSE_CRYPTO=${CRYPTO_BACKEND} + -DUSE_CRYPTO25519=${CRYPTO_BACKEND} +) + +vcpkg_install_cmake() +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/GameNetworkingSockets" TARGET_PATH "share/GameNetworkingSockets") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + + +vcpkg_copy_pdbs() \ No newline at end of file