diff options
| -rw-r--r-- | ports/arrow/CONTROL | 4 | ||||
| -rw-r--r-- | ports/arrow/portfile.cmake | 29 | ||||
| -rw-r--r-- | ports/double-conversion/001-fix-arm.patch | 13 | ||||
| -rw-r--r-- | ports/double-conversion/CONTROL | 2 | ||||
| -rw-r--r-- | ports/double-conversion/portfile.cmake | 49 | ||||
| -rw-r--r-- | ports/hpx/CONTROL | 5 | ||||
| -rw-r--r-- | ports/hpx/portfile.cmake | 108 | ||||
| -rw-r--r-- | ports/pcre/CONTROL | 2 | ||||
| -rw-r--r-- | ports/pcre/fix-arm-config-define.patch | 54 | ||||
| -rw-r--r-- | ports/pcre/fix-option-2.patch | 24 | ||||
| -rw-r--r-- | ports/pcre/portfile.cmake | 4 | ||||
| -rw-r--r-- | ports/thrift/CONTROL | 4 | ||||
| -rw-r--r-- | ports/thrift/portfile.cmake | 53 | ||||
| -rw-r--r-- | scripts/buildsystems/vcpkg.cmake | 5 | ||||
| -rw-r--r-- | scripts/cmake/vcpkg_find_acquire_program.cmake | 12 |
15 files changed, 346 insertions, 22 deletions
diff --git a/ports/arrow/CONTROL b/ports/arrow/CONTROL new file mode 100644 index 000000000..2e0233bb6 --- /dev/null +++ b/ports/arrow/CONTROL @@ -0,0 +1,4 @@ +Source: arrow +Version: apache-arrow-0.4.0 +Build-Depends: boost +Description: Apache Arrow is a columnar in-memory analytics layer designed to accelerate big data. It houses a set of canonical in-memory representations of flat and hierarchical data along with multiple language-bindings for structure manipulation. It also provides IPC and common algorithm implementations. diff --git a/ports/arrow/portfile.cmake b/ports/arrow/portfile.cmake new file mode 100644 index 000000000..9bf6f999e --- /dev/null +++ b/ports/arrow/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + message(FATAL_ERROR "Apache Arrow only supports x64") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO apache/arrow + REF apache-arrow-0.4.0 + SHA512 cdd67a884528b088688d88c0627b9c13077215e234dd0772797f0bf63319ffc18533276d52110a37a0938d32f006023b74dce93e71d34b1e0003a86761cea6ee + HEAD_REF master +) + + +set(CPP_SOURCE_PATH "${SOURCE_PATH}/cpp") + +vcpkg_configure_cmake( + SOURCE_PATH ${CPP_SOURCE_PATH} + OPTIONS -DARROW_BUILD_TESTS=off +) + + +vcpkg_install_cmake() + + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/arrow RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/double-conversion/001-fix-arm.patch b/ports/double-conversion/001-fix-arm.patch new file mode 100644 index 000000000..98ce2080c --- /dev/null +++ b/ports/double-conversion/001-fix-arm.patch @@ -0,0 +1,13 @@ +diff --git a/double-conversion/utils.h b/double-conversion/utils.h" +index 51d5e61..24cd5f1 100644 +--- a/double-conversion/utils.h ++++ "b/double-conversion/utils.h" +@@ -68,7 +68,7 @@ inline void abort_noreturn() { abort(); } + // disabled.) + // On Linux,x86 89255e-22 != Div_double(89255.0/1e22) + #if defined(_M_X64) || defined(__x86_64__) || \ +- defined(__ARMEL__) || defined(__avr32__) || \ ++ defined(__ARMEL__) || defined(__avr32__) || defined(_M_ARM) || \ + defined(__hppa__) || defined(__ia64__) || \ + defined(__mips__) || \ + defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \ diff --git a/ports/double-conversion/CONTROL b/ports/double-conversion/CONTROL index b997336e7..226a90676 100644 --- a/ports/double-conversion/CONTROL +++ b/ports/double-conversion/CONTROL @@ -1,3 +1,3 @@ Source: double-conversion -Version: 2.0.1 +Version: 2.0.1-1 Description: Efficient binary-decimal and decimal-binary conversion routines for IEEE doubles. diff --git a/ports/double-conversion/portfile.cmake b/ports/double-conversion/portfile.cmake index 05365d777..a4106c2c0 100644 --- a/ports/double-conversion/portfile.cmake +++ b/ports/double-conversion/portfile.cmake @@ -6,35 +6,48 @@ # CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} # -# Common Ambient Variables: -# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg> -# TARGET_TRIPLET is the current triplet (x86-windows, etc) -# PORT is the current port name (zlib, etc) -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + # This is due to a bug in CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS on arm + message(STATUS "DLLs on arm aren't currently supported. Building static libs instead.") + set(VCPKG_LIBRARY_LINKAGE "static") +endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/double-conversion-d4d68e4e788bec89d55a6a3e33af674087837c82) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/google/double-conversion/archive/d4d68e4e788bec89d55a6a3e33af674087837c82.zip" - FILENAME "d4d68e4e788bec89d55a6a3e33af674087837c82.zip" - SHA512 1406dc22b4ea71e1a2490f96cfed3230e122b97607c83ba106df4e90c7e4bfdcfc136c88741e7f1127237b38b4944d462ec5a4627a71f5ea3fe14afbcc64cd44 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/double-conversion + REF d4d68e4e788bec89d55a6a3e33af674087837c82 + SHA512 200b2f5ff1dfe4591f3c168e465ed154993469b7adf22b5bb2ae707d60d360ac45b51385f2d09d2a8358a914db01a790050cd9d9b78645f5ea5159410ce1de17 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=True) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/001-fix-arm.patch +) + +set(OPTIONS) +if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(OPTIONS -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=True) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + ${OPTIONS} +) + vcpkg_install_cmake() + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) file(RENAME ${CURRENT_PACKAGES_DIR}/CMake ${CURRENT_PACKAGES_DIR}/share/double-conversion) file(READ ${CURRENT_PACKAGES_DIR}/debug/CMake/double-conversionLibraryDepends-debug.cmake DEBUG_MODULE) string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" DEBUG_MODULE "${DEBUG_MODULE}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/double-conversion/double-conversionLibraryDepends-debug.cmake "${DEBUG_MODULE}") -#file(COPY ${SOURCE_PATH}/double-conversion DESTINATION ${CURRENT_PACKAGES_DIR}/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/CMake) -vcpkg_copy_pdbs() -message(STATUS "Installing done") +vcpkg_copy_pdbs() # Include files should not be duplicated into the /debug/include directory. file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/hpx/CONTROL b/ports/hpx/CONTROL new file mode 100644 index 000000000..c1433102a --- /dev/null +++ b/ports/hpx/CONTROL @@ -0,0 +1,5 @@ +Source: hpx +Version: 1.0.0-3 +Build-Depends: boost, hwloc +Description: The C++ Standards Library for Concurrency and Parallelism + HPX is a C++ Standards Library for Concurrency and Parallelism. It implements all of the corresponding facilities as defined by the C++ Standard. Additionally, in HPX we implement functionalities proposed as part of the ongoing C++ standardization process. We also extend the C++ Standard APIs to the distributed case. diff --git a/ports/hpx/portfile.cmake b/ports/hpx/portfile.cmake new file mode 100644 index 000000000..3c51bb13b --- /dev/null +++ b/ports/hpx/portfile.cmake @@ -0,0 +1,108 @@ +include(vcpkg_common_functions) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(STATUS "Warning: Static building of HPX not supported yet. Building dynamic.") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/hpx_1.0.0) + +vcpkg_download_distfile(ARCHIVE + URLS "http://stellar-group.org/files/hpx_1.0.0.tar.gz" + FILENAME "hpx_1.0.0.tar.gz" + SHA512 42c155654f118bff34b48d929b1732fd56126b8fd3e7657b5bd2f84275288ddf538572ed1152883c4aed5e9683de53b9b1f1c3613e5092e7bd1a5e165bed606d +) +vcpkg_extract_source_archive(${ARCHIVE}) + +# apply hotfix to enable building with vcpkg +vcpkg_download_distfile(DIFF + URLS "http://stellar-group.org/files/build-system-changes-to-make-HPX-compile-when-built-with-vcpkg.diff" + FILENAME "build-system-changes-to-make-HPX-compile-when-built-with-vcpkg.diff" + SHA512 ceceb84b54bf564b7b9258063454084207538a2bd212f7f65503c6638914eb3c093076e4303369639ef9b34812a2c8ed363c08bbdf5a39cc5d49f720a376af75 +) +vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${DIFF}) + +# apply hotfix to fix issues with building 32bit version +vcpkg_download_distfile(DIFF + URLS "http://stellar-group.org/files/Fixing-32bit-MSVC-compilation.diff" + FILENAME "Fixing-32bit-MSVC-compilation.diff" + SHA512 31c904d317b4c24eddd819e4856f8326ff3850a5a196c7648c46a11dbb85f35e972e077957b3c4aec67c8b043816fe1cebc92cfe28ed815f682537dfc3421b8b +) +vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${DIFF}) + +# apply hotfix to fix issues when building with UNICODE enabled +vcpkg_download_distfile(DIFF + URLS "http://stellar-group.org/files/Making-sure-UNICODE-on-Windows-does-not-break-by-default.diff" + FILENAME "Making-sure-UNICODE-on-Windows-does-not-break-by-default.diff" + SHA512 8fcdb36307702d64b9d2b26920374a6c5a29a50d125305dc95926c4cbc91215cb0c72ede83b06d0fc007fe7b2283845e08351bd45f11f3677f0d3db4ac8f9424 +) +vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${DIFF}) + + +SET(BOOST_PATH "${CURRENT_INSTALLED_DIR}/share/boost") +SET(HWLOC_PATH "${CURRENT_INSTALLED_DIR}/share/hwloc") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBOOST_ROOT=${BOOST_PATH} + -DHWLOC_ROOT=${HWLOC_ROOT} + -DHPX_WITH_VCPKG=ON + -DHPX_WITH_HWLOC=ON + -DHPX_WITH_TESTS=OFF + -DHPX_WITH_EXAMPLES=OFF + -DHPX_WITH_TOOLS=OFF + -DHPX_WITH_RUNTIME=OFF +) + +vcpkg_install_cmake() + +# post build cleanup +file(RENAME ${CURRENT_PACKAGES_DIR}/share/hpx-1.0.0 ${CURRENT_PACKAGES_DIR}/share/hpx) + +file(INSTALL + ${SOURCE_PATH}/LICENSE_1_0.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/hpx RENAME copyright) + +file(GLOB __hpx_cmakes ${CURRENT_PACKAGES_DIR}/lib/cmake/HPX/*.*) +foreach(__hpx_cmake ${__hpx_cmakes}) + file(COPY ${__hpx_cmake} DESTINATION ${CURRENT_PACKAGES_DIR}/share/hpx/cmake) + file(REMOVE ${__hpx_cmake}) +endforeach() + +file(GLOB __hpx_dlls ${CURRENT_PACKAGES_DIR}/lib/*.dll) +foreach(__hpx_dll ${__hpx_dlls}) + file(COPY ${__hpx_dll} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${__hpx_dll}) +endforeach() + +file(GLOB __hpx_dlls ${CURRENT_PACKAGES_DIR}/lib/hpx/*.dll) +foreach(__hpx_dll ${__hpx_dlls}) + file(COPY ${__hpx_dll} DESTINATION ${CURRENT_PACKAGES_DIR}/bin/hpx) + file(REMOVE ${__hpx_dll}) +endforeach() + +file(GLOB __hpx_dlls ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) +foreach(__hpx_dll ${__hpx_dlls}) + file(COPY ${__hpx_dll} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${__hpx_dll}) +endforeach() + +file(GLOB __hpx_dlls ${CURRENT_PACKAGES_DIR}/debug/lib/hpx/*.dll) +foreach(__hpx_dll ${__hpx_dlls}) + file(COPY ${__hpx_dll} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/hpx) + file(REMOVE ${__hpx_dll}) +endforeach() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/bazel) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/bazel) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) + +vcpkg_copy_pdbs() + diff --git a/ports/pcre/CONTROL b/ports/pcre/CONTROL index f1b583592..aeabb2012 100644 --- a/ports/pcre/CONTROL +++ b/ports/pcre/CONTROL @@ -1,3 +1,3 @@ Source: pcre -Version: 8.40 +Version: 8.40-1 Description: Perl Compatible Regular Expresions diff --git a/ports/pcre/fix-arm-config-define.patch b/ports/pcre/fix-arm-config-define.patch new file mode 100644 index 000000000..94ca808c3 --- /dev/null +++ b/ports/pcre/fix-arm-config-define.patch @@ -0,0 +1,54 @@ +diff --git a/sljit/sljitConfigInternal.h b/sljit/sljitConfigInternal.h +index 4dc452f..5a9827d 100644 +--- "a/sljit/sljitConfigInternal.h" ++++ "b/sljit/sljitConfigInternal.h" +@@ -149,7 +149,7 @@ + + #if defined(_M_X64) || defined(__x86_64__) + #define SLJIT_CONFIG_X86_64 1 +-#elif defined(_ARM_) ++#elif defined(_M_ARM) + #define SLJIT_CONFIG_ARM_V5 1 + #else + #define SLJIT_CONFIG_X86_32 1 +@@ -332,9 +332,16 @@ + + #else + ++#if defined(__linux__) + /* Calls __ARM_NR_cacheflush on ARM-Linux. */ + #define SLJIT_CACHE_FLUSH(from, to) \ + __clear_cache((char*)(from), (char*)(to)) ++#elif(_WIN32) ++#pragma comment(lib, "kernel32.lib") ++uint32_t FlushInstructionCache(void *hProcess, void *lpBaseAddress, uintptr_t dwSize); ++#define SLJIT_CACHE_FLUSH(from, to) \ ++ FlushInstructionCache(GetCurrentProcess(), (void*)(from), (uintptr_t)(to - from)); ++#endif + + #endif + +diff --git "a/sljit/sljitNativeARM_32.c" "b/sljit/sljitNativeARM_32.c" +index a756f82..86bdcbb 100644 +--- "a/sljit/sljitNativeARM_32.c" ++++ "b/sljit/sljitNativeARM_32.c" +@@ -1798,7 +1798,8 @@ extern "C" { + extern unsigned int __aeabi_uidivmod(unsigned int numerator, unsigned int denominator); + extern int __aeabi_idivmod(int numerator, int denominator); + #else +-#error "Software divmod functions are needed" ++extern unsigned int __aeabi_uidivmod(unsigned int numerator, unsigned int denominator); ++extern int __aeabi_idivmod(int numerator, int denominator); + #endif + + #ifdef __cplusplus +@@ -1852,7 +1853,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile + FAIL_IF(sljit_emit_ijump(compiler, SLJIT_FAST_CALL, SLJIT_IMM, + ((op | 0x2) == SLJIT_DIV_UW ? SLJIT_FUNC_OFFSET(__aeabi_uidivmod) : SLJIT_FUNC_OFFSET(__aeabi_idivmod)))); + #else +-#error "Software divmod functions are needed" ++ FAIL_IF(sljit_emit_ijump(compiler, SLJIT_FAST_CALL, SLJIT_IMM, ++ ((op | 0x2) == SLJIT_DIV_UW ? SLJIT_FUNC_OFFSET(__aeabi_uidivmod) : SLJIT_FUNC_OFFSET(__aeabi_idivmod)))); + #endif + + if ((op >= SLJIT_DIV_UW) && (compiler->scratches >= 3)) { diff --git a/ports/pcre/fix-option-2.patch b/ports/pcre/fix-option-2.patch new file mode 100644 index 000000000..f9d8e0e5e --- /dev/null +++ b/ports/pcre/fix-option-2.patch @@ -0,0 +1,24 @@ +diff --git b/CMakeLists.txt a/CMakeLists.txt +index 858a34bd..d1a64570 100644 +--- b/CMakeLists.txt ++++ a/CMakeLists.txt +@@ -74,7 +74,6 @@ PROJECT(PCRE C CXX) + # CMP0026 to avoid warnings for the use of LOCATION in GET_TARGET_PROPERTY. + + CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0) +-CMAKE_POLICY(SET CMP0026 OLD) + + SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) # for FindReadline.cmake + +@@ -191,9 +190,8 @@ IF (MINGW) + ENDIF(MINGW) + + IF(MSVC) +- OPTION(PCRE_STATIC_RUNTIME +- "ON=Compile against the static runtime (/MT)." +- OFF) ++ add_definitions(/wd4703) ++ OPTION(PCRE_STATIC_RUNTIME "ON=Compile against the static runtime (/MT)." OFF) + OPTION(INSTALL_MSVC_PDB + "ON=Install .pdb files built by MSVC, if generated" + OFF) diff --git a/ports/pcre/portfile.cmake b/ports/pcre/portfile.cmake index 3b310b7ea..f2088ef69 100644 --- a/ports/pcre/portfile.cmake +++ b/ports/pcre/portfile.cmake @@ -18,7 +18,9 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-option.patch) + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-option.patch + ${CMAKE_CURRENT_LIST_DIR}/fix-option-2.patch + ${CMAKE_CURRENT_LIST_DIR}/fix-arm-config-define.patch) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL new file mode 100644 index 000000000..aef580f73 --- /dev/null +++ b/ports/thrift/CONTROL @@ -0,0 +1,4 @@ +Source: thrift +Version: 20172805-72ca60debae1d9fb35d9f0085118873669006d7f +Build-Depends: boost, zlib, libevent, openssl +Description: Apache Thrift is a software project spanning a variety of programming languages and use cases. Our goal is to make reliable, performant communication and data serialization across languages as efficient and seamless as possible. Originally developed at Facebook, Thrift was open sourced in April 2007 and entered the Apache Incubator in May, 2008. Thrift became an Apache TLP in October, 2010. diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake new file mode 100644 index 000000000..94e8201bf --- /dev/null +++ b/ports/thrift/portfile.cmake @@ -0,0 +1,53 @@ +include(vcpkg_common_functions) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported. Building static.") # See note below + set(VCPKG_LIBRARY_LINKAGE static) + + # As per Ben Craig thrift comment see https://issues.apache.org/jira/browse/THRIFT-1834 + # Currently, Thrift is designed to be packaged as a static library. As a static library, the consuming program / dll will only pull in the object files that it needs, so the per-binary size increase should be pretty small. + # Thrift isn't a very good candidate to become a dynamic library. No attempts are made to preserve binary compatibility, or to provide a C / COM-like interface to make binary compatibility easy. +endif() + +vcpkg_find_acquire_program(FLEX) +vcpkg_find_acquire_program(BISON) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO apache/thrift + REF 72ca60debae1d9fb35d9f0085118873669006d7f + SHA512 6050c66b176ad596d9632b224b8fb49aa3b823c977dacad729dbcdefb0da60eb983d3a32d9326b4317bae6755fb1fc4cee2cc6c282b3e1636a4528844c0f5915 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DWITH_SHARED_LIB=OFF + -DWITH_STATIC_LIB=ON + -DBUILD_TESTING=off + -DBUILD_JAVA=off + -DBUILD_C_GLIB=off + -DBUILD_PYTHON=off + -DBUILD_CPP=on + -DBUILD_HASKELL=off + -DBUILD_TUTORIALS=off + -DFLEX_EXECUTABLE=${FLEX} + -DBISON_EXECUTABLE=${BISON} +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/thrift RENAME copyright) + +file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*.exe") +if(EXES) + file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/thrift) + file(REMOVE ${EXES}) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/thrift) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +vcpkg_copy_pdbs() diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 26fa020db..d3e1e814a 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -1,3 +1,6 @@ +# Mark variables as used so cmake doesn't complain about them +set(CMAKE_TOOLCHAIN_FILE ${CMAKE_TOOLCHAIN_FILE}) + if(NOT VCPKG_TOOLCHAIN) if(CMAKE_GENERATOR_PLATFORM MATCHES "^[Ww][Ii][Nn]32$") set(_VCPKG_TARGET_TRIPLET_ARCH x86) @@ -32,7 +35,7 @@ if(NOT VCPKG_TOOLCHAIN) endif() endif() - if(WINDOWS_STORE OR WINDOWS_PHONE) + if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone") set(_VCPKG_TARGET_TRIPLET_PLAT uwp) else() set(_VCPKG_TARGET_TRIPLET_PLAT windows) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 5c8a00ad2..127982842 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -84,6 +84,18 @@ function(vcpkg_find_acquire_program VAR) set(URL "https://github.com/mesonbuild/meson/archive/0.40.1.zip") set(ARCHIVE "meson-0.40.1.zip") set(HASH 4c1d07f32d527859f762c34de74d31d569573fc833335ab9652ed38d1f9e64b49869e826527c28a6a07cb8e594fd5c647b34aa95e626236a2707f75df0a2d435) + elseif(VAR MATCHES "FLEX") + set(PROGNAME win_flex) + set(PATHS ${DOWNLOADS}/tools/winflexbison) + set(URL "https://sourceforge.net/projects/winflexbison/files/win_flex_bison-2.5.9.zip/download") + set(ARCHIVE "win_flex_bison-2.5.9.zip") + set(HASH 9580f0e46893670a011645947c1becda69909a41a38bb4197fe33bd1ab7719da6b80e1be316f269e1a4759286870d49a9b07ef83afc4bac33232bd348e0bc814) + elseif(VAR MATCHES "BISON") + set(PROGNAME win_bison) + set(PATHS ${DOWNLOADS}/tools/winflexbison) + set(URL "https://sourceforge.net/projects/winflexbison/files/win_flex_bison-2.5.9.zip/download") + set(ARCHIVE "win_flex_bison-2.5.9.zip") + set(HASH 9580f0e46893670a011645947c1becda69909a41a38bb4197fe33bd1ab7719da6b80e1be316f269e1a4759286870d49a9b07ef83afc4bac33232bd348e0bc814) else() message(FATAL "unknown tool ${VAR} -- unable to acquire.") endif() |
