From a19151fff1d1201db6218d07ed5f8ece178ae80e Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 3 Sep 2019 22:37:13 +0200 Subject: [PATCH] [pcre2] Fix build with Emscripten/WASM (#7948) PCRE does not support Just-in-time compilation when targeting WebAssembly. --- ports/pcre2/CONTROL | 2 +- ports/pcre2/portfile.cmake | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ports/pcre2/CONTROL b/ports/pcre2/CONTROL index 3d7824a27..462916ef1 100644 --- a/ports/pcre2/CONTROL +++ b/ports/pcre2/CONTROL @@ -1,4 +1,4 @@ Source: pcre2 -Version: 10.30-4 +Version: 10.30-5 Homepage: https://pcre.org/ Description: PCRE2 is a re-working of the original Perl Compatible Regular Expressions library diff --git a/ports/pcre2/portfile.cmake b/ports/pcre2/portfile.cmake index 82b9014d1..f5f81b818 100644 --- a/ports/pcre2/portfile.cmake +++ b/ports/pcre2/portfile.cmake @@ -12,6 +12,12 @@ vcpkg_extract_source_archive_ex( PATCHES fix-space.patch fix-arm64-config.patch) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Emscripten") + set(JIT OFF) +else() + set(JIT ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -19,7 +25,7 @@ vcpkg_configure_cmake( -DPCRE2_BUILD_PCRE2_8=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON - -DPCRE2_SUPPORT_JIT=ON + -DPCRE2_SUPPORT_JIT=${JIT} -DPCRE2_SUPPORT_UNICODE=ON -DPCRE2_BUILD_TESTS=OFF -DPCRE2_BUILD_PCRE2GREP=OFF)