aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Lukashevich <SergeyLukashevich@users.noreply.github.com>2019-09-10 01:43:30 +0300
committerCurtis J Bezault <curtbezault@gmail.com>2019-09-09 15:43:30 -0700
commitc3b02026f8bfd5253ded45680872df69e95a81d2 (patch)
tree7ec18e93f7e8a83426f7c0efbb8b2ee7c17bd8d8
parent937e4d9ebbf9566172288a1e8cc9379c4b511c37 (diff)
downloadvcpkg-c3b02026f8bfd5253ded45680872df69e95a81d2.tar.gz
vcpkg-c3b02026f8bfd5253ded45680872df69e95a81d2.zip
[wampcc] Add new port (#7929)
* [wampcc] Add new port * Cleanup * Allow shared build for non-Windows systems; Add utils and tools features; Add messages about broken Windows build; * Make version based on date * Drop comment
-rw-r--r--ports/wampcc/CONTROL10
-rw-r--r--ports/wampcc/portfile.cmake53
2 files changed, 63 insertions, 0 deletions
diff --git a/ports/wampcc/CONTROL b/ports/wampcc/CONTROL
new file mode 100644
index 000000000..52311079d
--- /dev/null
+++ b/ports/wampcc/CONTROL
@@ -0,0 +1,10 @@
+Source: wampcc
+Build-Depends: openssl, libuv, jansson
+Version: 2019-09-04
+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 \ No newline at end of file
diff --git a/ports/wampcc/portfile.cmake b/ports/wampcc/portfile.cmake
new file mode 100644
index 000000000..b9e4e1d60
--- /dev/null
+++ b/ports/wampcc/portfile.cmake
@@ -0,0 +1,53 @@
+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
+ 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)