parquet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject parquet-cpp git commit: PARQUET-981: Resolve Windows build issues with 3rd party libs referen…
Date Sun, 14 May 2017 20:47:37 GMT
Repository: parquet-cpp
Updated Branches:
  refs/heads/master b91a71549 -> 149db622e


PARQUET-981: Resolve Windows build issues with 3rd party libs referen…

…ced by *_HOME variables

Author: Max Risuhin <risuhin.max@gmail.com>

Closes #325 from MaxRis/PARQUET-981 and squashes the following commits:

28b213c [Max Risuhin] PARQUET-981: Resolve Windows build issues with 3rd party libs referenced
by *_HOME variables


Project: http://git-wip-us.apache.org/repos/asf/parquet-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/parquet-cpp/commit/149db622
Tree: http://git-wip-us.apache.org/repos/asf/parquet-cpp/tree/149db622
Diff: http://git-wip-us.apache.org/repos/asf/parquet-cpp/diff/149db622

Branch: refs/heads/master
Commit: 149db622ec782db51b7b94935319650c607028d3
Parents: b91a715
Author: Max Risuhin <risuhin.max@gmail.com>
Authored: Sun May 14 16:47:32 2017 -0400
Committer: Wes McKinney <wes.mckinney@twosigma.com>
Committed: Sun May 14 16:47:32 2017 -0400

----------------------------------------------------------------------
 CMakeLists.txt                          | 10 ++++
 appveyor.yml                            |  2 +
 ci/msvc-build.bat                       | 26 ++++++--
 cmake_modules/FindArrow.cmake           | 10 +++-
 cmake_modules/FindBrotli.cmake          | 17 +++---
 cmake_modules/FindGTest.cmake           |  8 +--
 cmake_modules/FindSnappy.cmake          |  6 +-
 cmake_modules/FindThrift.cmake          |  6 +-
 cmake_modules/FindZLIB.cmake            | 16 +++--
 cmake_modules/ThirdpartyToolchain.cmake | 88 ++++++++++++++--------------
 docs/Windows.md                         | 42 ++++++++++++-
 11 files changed, 158 insertions(+), 73 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/149db622/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9c0ffc6..a710db4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -116,6 +116,16 @@ if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
   option(PARQUET_MINIMAL_DEPENDENCY
     "Depend only on Thirdparty headers to build libparquet. Always OFF if building binaries"
     OFF)
+  set(ARROW_MSVC_STATIC_LIB_SUFFIX "_static" CACHE STRING
+    "Arrow static lib suffix used on Windows with MSVC (default _static)")
+  set(BROTLI_MSVC_STATIC_LIB_SUFFIX "_static" CACHE STRING
+    "Brotli static lib suffix used on Windows with MSVC (default _static)")
+  set(SNAPPY_MSVC_STATIC_LIB_SUFFIX "" CACHE STRING
+    "Snappy static lib suffix used on Windows with MSVC (default is empty string)")
+  set(THRIFT_MSVC_STATIC_LIB_SUFFIX "md" CACHE STRING
+    "Thrift static lib suffix used on Windows with MSVC (default md)")
+  set(ZLIB_MSVC_STATIC_LIB_SUFFIX "libstatic" CACHE STRING
+    "Zlib static lib suffix used on Windows with MSVC (default libstatic)")
 endif()
 
 include(BuildUtils)

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/149db622/appveyor.yml
----------------------------------------------------------------------
diff --git a/appveyor.yml b/appveyor.yml
index f3fac11..8ced854 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -34,11 +34,13 @@ environment:
 configuration:
   - Debug
   - Release
+  - Toolchain
 
 init:
   - set MINICONDA=C:\Miniconda35-x64
   - set PATH=%MINICONDA%;%MINICONDA%/Scripts;%MINICONDA%/Library/bin;%PATH%
   - if "%GENERATOR%"=="NMake Makefiles" call "C:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\vcvarsall.bat" x64
+  - if "%CONFIGURATION%"=="Toolchain" conda install -y boost-cpp=1.63 arrow-cpp=0.3.0 brotli=0.6.0
zlib=1.2.11 snappy=1.1.4 thrift-cpp=0.10.0 -c conda-forge
 
 build_script:
   - call ci\msvc-build.bat

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/149db622/ci/msvc-build.bat
----------------------------------------------------------------------
diff --git a/ci/msvc-build.bat b/ci/msvc-build.bat
index b1b54b4..6789b46 100644
--- a/ci/msvc-build.bat
+++ b/ci/msvc-build.bat
@@ -22,14 +22,30 @@ cd build
 
 SET PARQUET_TEST_DATA=%APPVEYOR_BUILD_FOLDER%\data
 
-cmake -G "%GENERATOR%" ^
-      -DCMAKE_BUILD_TYPE=%CONFIGURATION% ^
+if "%CONFIGURATION%" == "Toolchain" (
+  set PARQUET_BUILD_TOOLCHAIN=%MINICONDA%/Library
+
+  cmake -G "%GENERATOR%" ^
+      -DCMAKE_BUILD_TYPE=Release ^
       -DPARQUET_BOOST_USE_SHARED=OFF ^
       -DPARQUET_CXXFLAGS="/MP" ^
+      -DPARQUET_ZLIB_VENDORED=OFF ^
       .. || exit /B
 
-cmake --build . --config %CONFIGURATION% || exit /B
-
-if "%CONFIGURATION%" == "Release" (
+  cmake --build . --config Release || exit /B
   ctest -VV || exit /B
+)
+
+if NOT "%CONFIGURATION%" == "Toolchain" (
+  cmake -G "%GENERATOR%" ^
+        -DCMAKE_BUILD_TYPE=%CONFIGURATION% ^
+        -DPARQUET_BOOST_USE_SHARED=OFF ^
+        -DPARQUET_CXXFLAGS="/MP" ^
+        .. || exit /B
+
+  cmake --build . --config %CONFIGURATION% || exit /B
+
+  if "%CONFIGURATION%" == "Release" (
+    ctest -VV || exit /B
+  )
 )
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/149db622/cmake_modules/FindArrow.cmake
----------------------------------------------------------------------
diff --git a/cmake_modules/FindArrow.cmake b/cmake_modules/FindArrow.cmake
index ad47513..bd6765a 100644
--- a/cmake_modules/FindArrow.cmake
+++ b/cmake_modules/FindArrow.cmake
@@ -72,11 +72,15 @@ else()
     set(ARROW_FOUND TRUE)
     set(ARROW_HEADER_NAME arrow/api.h)
     set(ARROW_HEADER ${ARROW_INCLUDE_DIR}/${ARROW_HEADER_NAME})
-    set(ARROW_LIB_NAME libarrow)
+    set(ARROW_LIB_NAME arrow)
+    if (MSVC AND NOT ARROW_MSVC_STATIC_LIB_SUFFIX)
+      set(ARROW_MSVC_STATIC_LIB_SUFFIX _static)
+    endif()
 
     get_filename_component(ARROW_LIBS ${ARROW_LIB_PATH} DIRECTORY)
-    set(ARROW_STATIC_LIB ${ARROW_LIBS}/${ARROW_LIB_NAME}.a)
-    set(ARROW_SHARED_LIB ${ARROW_LIBS}/${ARROW_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
+    set(ARROW_STATIC_LIB ${ARROW_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${ARROW_LIB_NAME}${ARROW_MSVC_STATIC_LIB_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX})
+    set(ARROW_SHARED_LIB ${ARROW_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${ARROW_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
+    set(ARROW_SHARED_IMPLIB ${ARROW_LIBS}/${ARROW_LIB_NAME}.lib)
   endif ()
 endif()
 

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/149db622/cmake_modules/FindBrotli.cmake
----------------------------------------------------------------------
diff --git a/cmake_modules/FindBrotli.cmake b/cmake_modules/FindBrotli.cmake
index 40d58ac..669c3f3 100644
--- a/cmake_modules/FindBrotli.cmake
+++ b/cmake_modules/FindBrotli.cmake
@@ -65,15 +65,18 @@ if (BROTLI_INCLUDE_DIR AND (PARQUET_MINIMAL_DEPENDENCY OR BROTLI_LIBRARIES))
   get_filename_component( BROTLI_LIBS ${BROTLI_LIBRARY_ENC} PATH )
   set(BROTLI_HEADER_NAME brotli.h)
   set(BROTLI_HEADER ${BROTLI_INCLUDE_DIR}/${BROTLI_HEADER_NAME})
-  set(BROTLI_LIB_NAME libbrotli)
+  set(BROTLI_LIB_NAME brotli)
+  if (MSVC AND NOT BROTLI_MSVC_STATIC_LIB_SUFFIX)
+    set(BROTLI_MSVC_STATIC_LIB_SUFFIX _static)
+  endif()
   set(BROTLI_STATIC_LIB
-      ${BROTLI_LIBS}/${BROTLI_LIB_NAME}enc.a
-      ${BROTLI_LIBS}/${BROTLI_LIB_NAME}dec.a
-      ${BROTLI_LIBS}/${BROTLI_LIB_NAME}common.a)
+      ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}enc${BROTLI_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
+      ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}dec${BROTLI_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
+      ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}common${BROTLI_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
   set(BROTLI_SHARED_LIB
-      ${BROTLI_LIBS}/${BROTLI_LIB_NAME}enc${CMAKE_SHARED_LIBRARY_SUFFIX}
-      ${BROTLI_LIBS}/${BROTLI_LIB_NAME}dec${CMAKE_SHARED_LIBRARY_SUFFIX}
-      ${BROTLI_LIBS}/${BROTLI_LIB_NAME}common${CMAKE_SHARED_LIBRARY_SUFFIX})
+      ${BROTLI_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${BROTLI_LIB_NAME}enc${CMAKE_SHARED_LIBRARY_SUFFIX}
+      ${BROTLI_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${BROTLI_LIB_NAME}dec${CMAKE_SHARED_LIBRARY_SUFFIX}
+      ${BROTLI_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${BROTLI_LIB_NAME}common${CMAKE_SHARED_LIBRARY_SUFFIX})
 else ()
   set(BROTLI_FOUND FALSE)
 endif ()

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/149db622/cmake_modules/FindGTest.cmake
----------------------------------------------------------------------
diff --git a/cmake_modules/FindGTest.cmake b/cmake_modules/FindGTest.cmake
index c6a4238..c6ea16b 100644
--- a/cmake_modules/FindGTest.cmake
+++ b/cmake_modules/FindGTest.cmake
@@ -56,10 +56,10 @@ endif ()
 if (GTEST_INCLUDE_DIR AND GTEST_LIBRARIES)
   set(GTEST_FOUND TRUE)
   get_filename_component( GTEST_LIBS ${GTEST_LIBRARIES} PATH )
-  set(GTEST_LIB_NAME libgtest)
-  set(GTEST_STATIC_LIB ${GTEST_LIBS}/${GTEST_LIB_NAME}.a)
-  set(GTEST_MAIN_STATIC_LIB ${GTEST_LIBS}/${GTEST_LIB_NAME}_main.a)
-  set(GTEST_SHARED_LIB ${GTEST_LIBS}/${GTEST_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
+  set(GTEST_LIB_NAME gtest)
+  set(GTEST_STATIC_LIB ${GTEST_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${GTEST_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX})
+  set(GTEST_MAIN_STATIC_LIB ${GTEST_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${GTEST_LIB_NAME}_main${CMAKE_STATIC_LIBRARY_SUFFIX})
+  set(GTEST_SHARED_LIB ${GTEST_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${GTEST_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
 else ()
   set(GTEST_FOUND FALSE)
 endif ()

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/149db622/cmake_modules/FindSnappy.cmake
----------------------------------------------------------------------
diff --git a/cmake_modules/FindSnappy.cmake b/cmake_modules/FindSnappy.cmake
index d2825c0..867963c 100644
--- a/cmake_modules/FindSnappy.cmake
+++ b/cmake_modules/FindSnappy.cmake
@@ -54,9 +54,9 @@ if (SNAPPY_INCLUDE_DIR AND (PARQUET_MINIMAL_DEPENDENCY OR SNAPPY_LIBRARIES))
   get_filename_component( SNAPPY_LIBS ${SNAPPY_LIBRARIES} PATH )
   set(SNAPPY_HEADER_NAME snappy.h)
   set(SNAPPY_HEADER ${SNAPPY_INCLUDE_DIR}/${SNAPPY_HEADER_NAME})
-  set(SNAPPY_LIB_NAME libsnappy)
-  set(SNAPPY_STATIC_LIB ${SNAPPY_LIBS}/${SNAPPY_LIB_NAME}.a)
-  set(SNAPPY_SHARED_LIB ${SNAPPY_LIBS}/${SNAPPY_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
+  set(SNAPPY_LIB_NAME snappy)
+  set(SNAPPY_STATIC_LIB ${SNAPPY_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${SNAPPY_LIB_NAME}${SNAPPY_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
+  set(SNAPPY_SHARED_LIB ${SNAPPY_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${SNAPPY_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
 else ()
   set(SNAPPY_FOUND FALSE)
 endif ()

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/149db622/cmake_modules/FindThrift.cmake
----------------------------------------------------------------------
diff --git a/cmake_modules/FindThrift.cmake b/cmake_modules/FindThrift.cmake
index 39432e9..6c5d9fe 100644
--- a/cmake_modules/FindThrift.cmake
+++ b/cmake_modules/FindThrift.cmake
@@ -48,8 +48,12 @@ find_path(THRIFT_CONTRIB_DIR share/fb303/if/fb303.thrift HINTS
   NO_DEFAULT_PATH
 )
 
+if (MSVC AND NOT THRIFT_MSVC_STATIC_LIB_SUFFIX)
+  set(THRIFT_MSVC_STATIC_LIB_SUFFIX md)
+endif()
+
 find_library(THRIFT_STATIC_LIB NAMES
-  ${CMAKE_STATIC_LIBRARY_PREFIX}thrift${CMAKE_STATIC_LIBRARY_SUFFIX}
+  ${CMAKE_STATIC_LIBRARY_PREFIX}thrift${THRIFT_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
   HINTS ${_thrift_roots}
   NO_DEFAULT_PATH
   PATH_SUFFIXES "lib/${CMAKE_LIBRARY_ARCHITECTURE}" "lib"

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/149db622/cmake_modules/FindZLIB.cmake
----------------------------------------------------------------------
diff --git a/cmake_modules/FindZLIB.cmake b/cmake_modules/FindZLIB.cmake
index 1cae74a..78b84f2 100644
--- a/cmake_modules/FindZLIB.cmake
+++ b/cmake_modules/FindZLIB.cmake
@@ -44,13 +44,13 @@ if ( _zlib_roots )
     find_path( ZLIB_INCLUDE_DIR NAMES zlib.h
         PATHS ${_zlib_roots} NO_DEFAULT_PATH
         PATH_SUFFIXES "include" )
-    find_library( ZLIB_LIBRARIES NAMES libz.a
+    find_library( ZLIB_LIBRARIES NAMES libz.a zlib
         PATHS ${_zlib_roots} NO_DEFAULT_PATH
         PATH_SUFFIXES "lib" )
 else ()
     find_path( ZLIB_INCLUDE_DIR NAMES zlib.h )
     # Only look for the static library
-    find_library( ZLIB_LIBRARIES NAMES libz.a )
+    find_library( ZLIB_LIBRARIES NAMES libz.a zlib )
 endif ()
 
 
@@ -59,9 +59,15 @@ if (ZLIB_INCLUDE_DIR AND (PARQUET_MINIMAL_DEPENDENCY OR ZLIB_LIBRARIES))
   get_filename_component( ZLIB_LIBS ${ZLIB_LIBRARIES} PATH )
   set(ZLIB_HEADER_NAME zlib.h)
   set(ZLIB_HEADER ${ZLIB_INCLUDE_DIR}/${ZLIB_HEADER_NAME})
-  set(ZLIB_LIB_NAME libz)
-  set(ZLIB_STATIC_LIB ${ZLIB_LIBS}/${ZLIB_LIB_NAME}.a)
-  set(ZLIB_SHARED_LIB ${ZLIB_LIBS}/${ZLIB_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
+  set(ZLIB_LIB_NAME z)
+  if (MSVC)
+    if (NOT ZLIB_MSVC_STATIC_LIB_SUFFIX)
+      set(ZLIB_MSVC_STATIC_LIB_SUFFIX libstatic)
+    endif()
+    set(ZLIB_MSVC_SHARED_LIB_SUFFIX lib)
+  endif()
+  set(ZLIB_STATIC_LIB ${ZLIB_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${ZLIB_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
+  set(ZLIB_SHARED_LIB ${ZLIB_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${ZLIB_MSVC_SHARED_LIB_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX})
 else ()
   set(ZLIB_FOUND FALSE)
 endif ()

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/149db622/cmake_modules/ThirdpartyToolchain.cmake
----------------------------------------------------------------------
diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake
index 7b4c941..7be349e 100644
--- a/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cmake_modules/ThirdpartyToolchain.cmake
@@ -240,42 +240,43 @@ if (NOT THRIFT_FOUND)
       STEP_TARGETS flex_step libevent_step
       DEPENDS ${THRIFT_DEPENDENCIES})
   endif()
-    set(THRIFT_VENDORED 1)
-else()
-    set(THRIFT_VENDORED 0)
-endif()
 
-if (MSVC)
-  ExternalProject_Get_Property(thrift_ep SOURCE_DIR)
-
-  set(WINFLEXBISON_VERSION 2.4.9)
-  set(LIBEVENT_VERSION 2.1.7)
-
-  # Download and configure Windows build of Flex and Bison
-  ExternalProject_Add_Step(thrift_ep flex_step
-    COMMAND ${CMAKE_COMMAND} -E make_directory thirdparty/dist/winflexbison
-    COMMAND cd thirdparty/dist/winflexbison
-    COMMAND curl -SLO https://github.com/lexxmark/winflexbison/releases/download/v.${WINFLEXBISON_VERSION}/win_flex_bison-${WINFLEXBISON_VERSION}.zip
-    COMMAND ${CMAKE_COMMAND} -E tar xzf win_flex_bison-${WINFLEXBISON_VERSION}.zip
-    DEPENDERS configure
-    DEPENDEES download
-    WORKING_DIRECTORY ${SOURCE_DIR})
-
-  # Download and build libevent
-  ExternalProject_Add_Step(thrift_ep libevent_step
-    COMMAND ${CMAKE_COMMAND} -E make_directory thirdparty/src
-    COMMAND cd thirdparty/src
-    COMMAND curl -SLO https://github.com/nmathewson/Libevent/archive/release-${LIBEVENT_VERSION}-rc.zip
-    COMMAND ${CMAKE_COMMAND} -E tar xzf release-${LIBEVENT_VERSION}-rc.zip
-    COMMAND cd Libevent-release-${LIBEVENT_VERSION}-rc
-    COMMAND ${CMAKE_COMMAND} -E make_directory build
-    COMMAND cd build
-    COMMAND ${CMAKE_COMMAND} -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX=.. ..
-    COMMAND nmake
-    COMMAND nmake install
-    DEPENDERS configure
-    DEPENDEES download
-    WORKING_DIRECTORY ${SOURCE_DIR})
+  if (MSVC)
+    ExternalProject_Get_Property(thrift_ep SOURCE_DIR)
+
+    set(WINFLEXBISON_VERSION 2.4.9)
+    set(LIBEVENT_VERSION 2.1.7)
+
+    # Download and configure Windows build of Flex and Bison
+    ExternalProject_Add_Step(thrift_ep flex_step
+      COMMAND ${CMAKE_COMMAND} -E make_directory thirdparty/dist/winflexbison
+      COMMAND cd thirdparty/dist/winflexbison
+      COMMAND curl -SLO https://github.com/lexxmark/winflexbison/releases/download/v.${WINFLEXBISON_VERSION}/win_flex_bison-${WINFLEXBISON_VERSION}.zip
+      COMMAND ${CMAKE_COMMAND} -E tar xzf win_flex_bison-${WINFLEXBISON_VERSION}.zip
+      DEPENDERS configure
+      DEPENDEES download
+      WORKING_DIRECTORY ${SOURCE_DIR})
+
+    # Download and build libevent
+    ExternalProject_Add_Step(thrift_ep libevent_step
+      COMMAND ${CMAKE_COMMAND} -E make_directory thirdparty/src
+      COMMAND cd thirdparty/src
+      COMMAND curl -SLO https://github.com/nmathewson/Libevent/archive/release-${LIBEVENT_VERSION}-rc.zip
+      COMMAND ${CMAKE_COMMAND} -E tar xzf release-${LIBEVENT_VERSION}-rc.zip
+      COMMAND cd Libevent-release-${LIBEVENT_VERSION}-rc
+      COMMAND ${CMAKE_COMMAND} -E make_directory build
+      COMMAND cd build
+      COMMAND ${CMAKE_COMMAND} -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX=.. ..
+      COMMAND nmake
+      COMMAND nmake install
+      DEPENDERS configure
+      DEPENDEES download
+      WORKING_DIRECTORY ${SOURCE_DIR})
+  endif()
+
+  set(THRIFT_VENDORED 1)
+else()
+  set(THRIFT_VENDORED 0)
 endif()
 
 include_directories(SYSTEM ${THRIFT_INCLUDE_DIR} ${THRIFT_INCLUDE_DIR}/thrift)
@@ -412,19 +413,18 @@ if (NOT BROTLI_FOUND)
       URL "https://github.com/google/brotli/archive/${BROTLI_VERSION}.tar.gz"
       CMAKE_ARGS ${BROTLI_CMAKE_ARGS})
   endif()
+  if (MSVC)
+    ExternalProject_Get_Property(brotli_ep SOURCE_DIR)
+
+    ExternalProject_Add_Step(brotli_ep headers_copy
+      COMMAND xcopy /E /I include ..\\..\\..\\brotli_ep\\src\\brotli_ep-install\\include
/Y
+      DEPENDEES build
+      WORKING_DIRECTORY ${SOURCE_DIR})
+  endif()
 else()
   set(BROTLI_VENDORED 0)
 endif()
 
-if (MSVC)
-  ExternalProject_Get_Property(brotli_ep SOURCE_DIR)
-
-  ExternalProject_Add_Step(brotli_ep headers_copy
-    COMMAND xcopy /E /I include ..\\..\\..\\brotli_ep\\src\\brotli_ep-install\\include /Y
-    DEPENDEES build
-    WORKING_DIRECTORY ${SOURCE_DIR})
-endif()
-
 include_directories(SYSTEM ${BROTLI_INCLUDE_DIR})
 add_library(brotlistatic_enc STATIC IMPORTED)
 set_target_properties(brotlistatic_enc PROPERTIES IMPORTED_LOCATION ${BROTLI_LIBRARY_ENC})

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/149db622/docs/Windows.md
----------------------------------------------------------------------
diff --git a/docs/Windows.md b/docs/Windows.md
index 8c7d1a3..9659509 100644
--- a/docs/Windows.md
+++ b/docs/Windows.md
@@ -30,9 +30,30 @@ We recommend using packages from [conda-forge][2].
 Launch cmd.exe and run following to bootstrap a build environment:
 
 ```shell
-conda create -n parquet-dev cmake git boost-cpp curl zlib snappy -c conda-forge
+conda create -n parquet-dev cmake git boost-cpp curl zlib snappy arrow-cpp brotli thrift-cpp
-c conda-forge
 ```
 
+To allow cmake to pick up 3rd party dependencies, you should set
+`PARQUET_BUILD_TOOLCHAIN` environment variable to contain `Library` folder
+path of new created on previous step `parquet-dev` conda environment.
+For instance, if `Miniconda` was installed to default destination, `Library`
+folder path for `parquet-dev` conda environment will be as following:
+
+```shell
+C:\Users\YOUR_USER_NAME\Miniconda3\envs\parquet-dev\Library
+```
+
+As alternative to `PARQUET_BUILD_TOOLCHAIN`, it's possible to configure path
+to each 3rd party dependency separately by setting appropriate environment
+variable:
+
+`BOOST_ROOT` variable with path to `boost` installation  
+`THRIFT_HOME` variable with path to `thrift-cpp` installation  
+`SNAPPY_HOME` variable with path to `snappy` installation  
+`ZLIB_HOME` variable with path to `zlib` installation  
+`BROTLI_HOME` variable with path to `brotli` installation  
+`ARROW_HOME` variable with path to `arrow` installation
+
 ### Visual Studio
 
 Microsoft provides the free Visual Studio Community edition. Once you have
@@ -69,6 +90,25 @@ cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release ..
 nmake
 ```
 
+## Building with Visual Studio cmake generator
+
+Activate your conda build environment:
+
+```
+activate parquet-dev
+```
+
+Change working directory in cmd.exe to the root directory of parquet-cpp and
+do an out of source build:
+
+```
+cd %PARQUET_ROOT_SOURCES_DIRECTORY%
+mkdir build
+cd build
+cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_BUILD_TYPE=Release ..
+cmake --build . --config Release
+```
+
 When using conda, only release builds are currently supported.
 
 [1]: https://conda.io/miniconda.html


Mime
View raw message