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

[wampcc] Add new port #7929

Merged
merged 5 commits into from Sep 9, 2019
Merged
Show file tree
Hide file tree
Changes from 3 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
10 changes: 10 additions & 0 deletions ports/wampcc/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Source: wampcc
Build-Depends: openssl, libuv, jansson
Version: 1.6
Description: Wampcc is C++ library that implements the Web Application Messaging Protocol (WAMP) protocol.

Feature: utils
Description: Build utility apps

Feature: examples
Description: Build example apps
56 changes: 56 additions & 0 deletions ports/wampcc/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
include(vcpkg_common_functions)

if (VCPKG_TARGET_IS_WINDOWS)
message("Shared build is broken under Windows. See https://github.com/darrenjs/wampcc/issues/57")
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
endif()

if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(BUILD_ARCH "Win32")
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
set(BUILD_ARCH "x64")
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
set(BUILD_ARCH "ARM")
else()
message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}")
endif()

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO darrenjs/wampcc

# master on 27/08/2019
REF 43d10a7ccf37ec1b895742712dd4a05577b73ff1

SHA512 e830d26de00e8f5f378145f06691cb16121c40d3bd2cd663fad9a97db37251a11b56053178b619e3a2627f0cd518b6290a8381b26e517a9f16f0246d2f91958e
HEAD_REF master
)

# Utils build is broken under Windows
if ("utils" IN_LIST FEATURES)
if (VCPKG_TARGET_IS_WINDOWS)
message(FATAL_ERROR "'utils' build is broken under Windows")
endif()

set(ENABLE_UTILS ON)
else()
set(ENABLE_UTILS OFF)
endif()

if ("examples" IN_LIST FEATURES)
set(ENABLE_EXAMPLES ON)
else()
set(ENABLE_EXAMPLES OFF)
endif()

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-DBUILD_UTILS:BOOL=${ENABLE_UTILS}
-DBUILD_EXAMPLES:BOOL=${ENABLE_EXAMPLES}
-DBUILD_TESTS:BOOL=OFF # Tests build is broken
)
vcpkg_install_cmake()

file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/wampcc RENAME copyright)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)