Skip to content

Commit

Permalink
Fix aquire flex and bison when not on Windows (microsoft#4120)
Browse files Browse the repository at this point in the history
* use find_program to locate flex and bison when not Windows

* reset changes to thrift/portfile.cmake

* fix aquire flex and bison on non win platforms

* [vcpkg_find_acquire_program] Indentation and use CMAKE_HOST_WIN32
  • Loading branch information
markaren authored and ras0219-msft committed Aug 22, 2018
1 parent 57a4b8b commit 107ed00
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions scripts/cmake/vcpkg_find_acquire_program.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -134,17 +134,29 @@ function(vcpkg_find_acquire_program VAR)
set(ARCHIVE "meson-0.43.0.zip")
set(HASH dde4de72eff37046731224f32aa5f4618d45bdf148cec2d1af6e25e7522ebc2b04aedc9eceed483dfa93823a0ea7ea472d0c0c9380061bf3ee2f16b87dd1425e)
elseif(VAR MATCHES "FLEX")
if(CMAKE_HOST_WIN32)
set(PROGNAME win_flex)
set(PATHS ${DOWNLOADS}/tools/win_flex)
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)
set(PATHS ${DOWNLOADS}/tools/win_flex)
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()
set(PROGNAME flex)
set(APT_PACKAGE_NAME flex)
set(BREW_PACKAGE_NAME flex)
endif()
elseif(VAR MATCHES "BISON")
set(PROGNAME win_bison)
set(PATHS ${DOWNLOADS}/tools/win_bison)
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)
if(CMAKE_HOST_WIN32)
set(PROGNAME win_bison)
set(PATHS ${DOWNLOADS}/tools/win_bison)
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()
set(PROGNAME bison)
set(APT_PACKAGE_NAME bison)
set(BREW_PACKAGE_NAME bison)
endif()
elseif(VAR MATCHES "GPERF")
set(PROGNAME gperf)
set(PATHS ${DOWNLOADS}/tools/gperf/bin)
Expand Down

0 comments on commit 107ed00

Please sign in to comment.