aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGriffin Downs <35574547+grdowns@users.noreply.github.com>2019-03-11 14:22:58 -0700
committerGitHub <noreply@github.com>2019-03-11 14:22:58 -0700
commitbe4158fb89045319f19d83d08b851e6e694b5b12 (patch)
treeaffc6e8f85739bea7e94845e3f5213d52c0a62f2
parent3a0e5304cf2f104ce2983b6b2b156a78f2c9be25 (diff)
parent0d7f4c1b89a13b4548b1b9329019545661596e8c (diff)
downloadvcpkg-be4158fb89045319f19d83d08b851e6e694b5b12.tar.gz
vcpkg-be4158fb89045319f19d83d08b851e6e694b5b12.zip
Merge pull request #5509 from myd7349/simdjson-init
[simdjson] Add new port (fix #5418)
-rw-r--r--ports/simdjson/CONTROL3
-rw-r--r--ports/simdjson/portfile.cmake41
2 files changed, 44 insertions, 0 deletions
diff --git a/ports/simdjson/CONTROL b/ports/simdjson/CONTROL
new file mode 100644
index 000000000..8c71eeee5
--- /dev/null
+++ b/ports/simdjson/CONTROL
@@ -0,0 +1,3 @@
+Source: simdjson
+Version: 2019-03-09
+Description: A extremely fast JSON library that can parse gigabytes of JSON per second
diff --git a/ports/simdjson/portfile.cmake b/ports/simdjson/portfile.cmake
new file mode 100644
index 000000000..f6b2f347a
--- /dev/null
+++ b/ports/simdjson/portfile.cmake
@@ -0,0 +1,41 @@
+include(vcpkg_common_functions)
+
+# https://github.com/Microsoft/vcpkg/issues/5418#issuecomment-470519894
+if(TARGET_TRIPLET MATCHES "^(x86|arm-)")
+ message(FATAL_ERROR "simdjson doesn't support x86 or 32-bit ARM architecture.")
+elseif(TARGET_TRIPLET MATCHES "^arm64")
+ message(FATAL_ERROR "simdjson doesn't support ARM64 architecture currently.")
+endif()
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO lemire/simdjson
+ REF d2fa086198b77df44e7fa48b25200e118fa81eb0
+ SHA512 fe92b65e44502381d286b6a7c949055d185e56e7c244a5ab3086b2fe7da76ce81a966daa2d8459794ff0a911b426b1c77e1fc9ef0d616e20868621b1bb30cf67
+ HEAD_REF master
+)
+
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SIMDJSON_BUILD_STATIC)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DSIMDJSON_BUILD_STATIC=${SIMDJSON_BUILD_STATIC}
+)
+
+vcpkg_install_cmake()
+
+vcpkg_copy_pdbs()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
+
+file(REMOVE_RECURSE
+ ${CURRENT_PACKAGES_DIR}/debug/include
+)
+
+# Handle copyright
+configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
+
+# CMake integration test
+#vcpkg_test_cmake(PACKAGE_NAME ${PORT})