diff options
| author | Arkady Shapkin <arkady.shapkin@gmail.com> | 2017-06-01 21:09:01 +0300 |
|---|---|---|
| committer | Arkady Shapkin <arkady.shapkin@gmail.com> | 2017-08-02 01:38:09 +0300 |
| commit | b5489350abeaae55a303fcd6cf7c6b2094d91a4d (patch) | |
| tree | 1e5122fbc3ba7ede23dd379beff43771cc564f6b | |
| parent | c22ab980bcab362134ef3e5db329a81c1767c2c9 (diff) | |
| download | vcpkg-b5489350abeaae55a303fcd6cf7c6b2094d91a4d.tar.gz vcpkg-b5489350abeaae55a303fcd6cf7c6b2094d91a4d.zip | |
[folly] Updated to version v2017.07.17.01
| -rw-r--r-- | ports/folly/CONTROL | 2 | ||||
| -rw-r--r-- | ports/folly/fix-cmakelists.patch | 89 | ||||
| -rw-r--r-- | ports/folly/fix-generators.patch | 36 | ||||
| -rw-r--r-- | ports/folly/portfile.cmake | 18 |
4 files changed, 9 insertions, 136 deletions
diff --git a/ports/folly/CONTROL b/ports/folly/CONTROL index f9a4a4329..489465d74 100644 --- a/ports/folly/CONTROL +++ b/ports/folly/CONTROL @@ -1,4 +1,4 @@ Source: folly -Version: v2017.05.08.00-2 +Version: v2017.07.17.01 Description: An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows Build-Depends: zlib, openssl, boost, libevent, double-conversion, glog, gflags, lz4, liblzma, snappy diff --git a/ports/folly/fix-cmakelists.patch b/ports/folly/fix-cmakelists.patch deleted file mode 100644 index 9f5700dbb..000000000 --- a/ports/folly/fix-cmakelists.patch +++ /dev/null @@ -1,89 +0,0 @@ -diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake -index 211c6fbf..988225a2 100755 ---- a/CMake/folly-deps.cmake -+++ b/CMake/folly-deps.cmake -@@ -11,8 +11,8 @@ find_package(Boost 1.55.0 MODULE - REQUIRED - ) - find_package(DoubleConversion MODULE REQUIRED) --find_package(GFlags MODULE REQUIRED) --find_package(GLog MODULE REQUIRED) -+find_package(gflags CONFIG REQUIRED) -+find_package(glog CONFIG REQUIRED) - find_package(LibEvent MODULE REQUIRED) - find_package(OpenSSL MODULE REQUIRED) - find_package(PThread MODULE) -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 38886d65..4c796eac 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,15 +1,8 @@ - cmake_minimum_required(VERSION 3.4.0 FATAL_ERROR) - --# Unfortunately, CMake doesn't easily provide us a way to merge static --# libraries, which is what we want to do to generate the main folly library, so --# we do a bit of a workaround here to inject a property into the generated --# project files that will only get enabled for the folly target. Ugly, but --# the alternatives are far, far worse. - if ("${CMAKE_GENERATOR}" MATCHES "Visual Studio 15( 2017)? Win64") -- set(CMAKE_GENERATOR_TOOLSET "v141</PlatformToolset></PropertyGroup><ItemDefinitionGroup Condition=\"'$(ProjectName)'=='folly'\"><ProjectReference><LinkLibraryDependencies>true</LinkLibraryDependencies></ProjectReference></ItemDefinitionGroup><PropertyGroup><PlatformToolset>v141") - set(MSVC_IS_2017 ON) - elseif ("${CMAKE_GENERATOR}" STREQUAL "Visual Studio 14 2015 Win64") -- set(CMAKE_GENERATOR_TOOLSET "v140</PlatformToolset></PropertyGroup><ItemDefinitionGroup Condition=\"'$(ProjectName)'=='folly'\"><ProjectReference><LinkLibraryDependencies>true</LinkLibraryDependencies></ProjectReference></ItemDefinitionGroup><PropertyGroup><PlatformToolset>v140") - set(MSVC_IS_2017 OFF) - else() - message(FATAL_ERROR "This build script only supports building Folly on 64-bit Windows with Visual Studio 2015 or Visual Studio 2017.") -@@ -122,7 +115,8 @@ add_library(folly_base STATIC - ) - auto_source_group(folly ${FOLLY_DIR} ${files} ${hfiles}) - apply_folly_compile_options_to_target(folly_base) --target_include_directories(folly_base PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) -+target_include_directories(folly_base PUBLIC -+ $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>) - # Add the generated files to the correct source group. - source_group("folly" FILES ${CMAKE_CURRENT_BINARY_DIR}/folly/folly-config.h) - source_group("folly\\build" FILES -@@ -133,10 +127,9 @@ source_group("folly\\build" FILES - ) - - target_include_directories(folly_base -- PUBLIC -+ PRIVATE - ${DOUBLE_CONVERSION_INCLUDE_DIR} - ${LIBGFLAGS_INCLUDE_DIR} -- ${LIBGLOG_INCLUDE_DIR} - ${LIBEVENT_INCLUDE_DIR} - ) - target_link_libraries(folly_base -@@ -151,13 +144,13 @@ target_link_libraries(folly_base - ${DOUBLE_CONVERSION_LIBRARY} - ${LIBEVENT_LIB} - ${LIBGFLAGS_LIBRARY} -- ${LIBGLOG_LIBRARY} -+ glog::glog - OpenSSL::SSL - OpenSSL::Crypto - Ws2_32.lib - ) - if (FOLLY_HAVE_PTHREAD) -- target_include_directories(folly_base PUBLIC ${LIBPTHREAD_INCLUDE_DIRS}) -+ target_include_directories(folly_base PRIVATE ${LIBPTHREAD_INCLUDE_DIRS}) - target_link_libraries(folly_base PUBLIC ${LIBPTHREAD_LIBRARIES}) - endif() - -@@ -199,13 +192,10 @@ add_library(folly ${CMAKE_CURRENT_BINARY_DIR}/folly_dep.cpp) - apply_folly_compile_options_to_target(folly) - source_group("" FILES ${CMAKE_CURRENT_BINARY_DIR}/folly_dep.cpp) - --# Rather than list the dependencies in two places, we apply them directly on --# the folly_base target and then copy them over to the folly target. --get_target_property(FOLLY_LINK_LIBRARIES folly_base INTERFACE_LINK_LIBRARIES) --target_link_libraries(folly PUBLIC ${FOLLY_LINK_LIBRARIES}) -+target_link_libraries(folly PUBLIC folly_base) - target_include_directories(folly PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>) - --install(TARGETS folly -+install(TARGETS folly folly_base - EXPORT folly - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib diff --git a/ports/folly/fix-generators.patch b/ports/folly/fix-generators.patch deleted file mode 100644 index e774b8c6b..000000000 --- a/ports/folly/fix-generators.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4c796ea..684f48f 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,13 +1,5 @@ - cmake_minimum_required(VERSION 3.4.0 FATAL_ERROR) - --if ("${CMAKE_GENERATOR}" MATCHES "Visual Studio 15( 2017)? Win64") -- set(MSVC_IS_2017 ON) --elseif ("${CMAKE_GENERATOR}" STREQUAL "Visual Studio 14 2015 Win64") -- set(MSVC_IS_2017 OFF) --else() -- message(FATAL_ERROR "This build script only supports building Folly on 64-bit Windows with Visual Studio 2015 or Visual Studio 2017.") --endif() -- - # includes - set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH}) - include_directories(${CMAKE_CURRENT_SOURCE_DIR}) -@@ -24,10 +16,14 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) - - project(${PACKAGE_NAME} CXX) - --# Check architecture OS --if (NOT CMAKE_SIZEOF_VOID_P EQUAL 8) -- message(FATAL_ERROR "Folly requires a 64bit OS") -+if (NOT MSVC_VERSION LESS 1910) -+ set(MSVC_IS_2017 ON) -+elseif (NOT MSVC_VERSION LESS 1900) -+ set(MSVC_IS_2017 OFF) -+else() -+ message(FATAL_ERROR "This build script only supports building Folly on 64-bit Windows with Visual Studio 2015 or Visual Studio 2017.") - endif() -+ - if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") - message(FATAL_ERROR "You should only be using CMake to build Folly if you are on Windows!") - endif() diff --git a/ports/folly/portfile.cmake b/ports/folly/portfile.cmake index 6d5ce8d25..919e799d5 100644 --- a/ports/folly/portfile.cmake +++ b/ports/folly/portfile.cmake @@ -17,17 +17,11 @@ set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/folly - REF v2017.05.08.00 - SHA512 1f689ec288e2a5de28223bddd68fdbb37c26c46ed9d9b831cacc46580788b9bf8eed151a043a4905172e509c70ed3d845689bf2c0cd45ce05fbe76907e2049aa + REF v2017.07.17.01 + SHA512 1529941ebcc9ee3502e4ab07463bb5bc6a397259cbbf1817ac64fd186fd4cd964ffe8b473fe6a432e80632ffa553106a0d3fe2962e860eb409e3391029ed5584 HEAD_REF master ) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-cmakelists.patch" - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-generators.patch" -) - if(VCPKG_CRT_LINKAGE STREQUAL static) set(MSVC_USE_STATIC_RUNTIME ON) else() @@ -42,8 +36,7 @@ vcpkg_configure_cmake( ) # Folly runs built executables during the build, so they need access to the installed DLLs. -# TODO: Confirm it's ok that we aren't adding the debug/bin folder. -set(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin") +set(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin") vcpkg_install_cmake(MSVC_64_TOOLSET) @@ -51,6 +44,11 @@ vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets() +# changes target search path +file(READ ${CURRENT_PACKAGES_DIR}/share/folly/folly-targets.cmake FOLLY_MODULE) +string(REPLACE "${CURRENT_INSTALLED_DIR}/lib/" "" FOLLY_MODULE "${FOLLY_MODULE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/folly/folly-targets.cmake "${FOLLY_MODULE}") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright |
