diff options
| author | Lars Ivar Hatledal <larsivarhatledal@gmail.com> | 2018-08-22 23:04:20 +0200 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2018-08-22 14:04:20 -0700 |
| commit | 107ed006280e2e6204787dcf25d7819eb869b43f (patch) | |
| tree | 2593efb878bac338943e2fa51fd13588a0754bb0 /scripts | |
| parent | 57a4b8b8e3cf1b91ccf275aefd922655f43dd1ce (diff) | |
| download | vcpkg-107ed006280e2e6204787dcf25d7819eb869b43f.tar.gz vcpkg-107ed006280e2e6204787dcf25d7819eb869b43f.zip | |
Fix aquire flex and bison when not on Windows (#4120)
* 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
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/cmake/vcpkg_find_acquire_program.cmake | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 39a722d93..99e05960a 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -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) |
