2020-12-01 13:37:26 -08:00
#[===[.md:
# vcpkg_find_acquire_program
D o w n l o a d o r f i n d a w e l l - k n o w n t o o l .
## Usage
` ` ` c m a k e
vcpkg_find_acquire_program ( <VAR> )
` ` `
## Parameters
### VAR
T h i s v a r i a b l e s p e c i f i e s b o t h t h e p r o g r a m t o b e a c q u i r e d a s w e l l a s t h e o u t p a r a m e t e r t h a t w i l l b e s e t t o t h e p a t h o f t h e p r o g r a m e x e c u t a b l e .
## Notes
T h e c u r r e n t l i s t o f p r o g r a m s i n c l u d e s :
* 7 Z
* ARIA2 ( Downloader )
* B I S O N
* C L A N G
* D A R K
* D O X Y G E N
* F L E X
* G A S P R E P R O C E S S O R
* G P E R F
* P E R L
* P Y T H O N 2
* P Y T H O N 3
* G I T
* G N
* G O
* J O M
* M E S O N
* N A S M
* N I N J A
* N U G E T
* S C O N S
* S W I G
* Y A S M
N o t e t h a t m s y s 2 h a s a d e d i c a t e d h e l p e r f u n c t i o n : [ ` v c p k g _ a c q u i r e _ m s y s ` ] ( v c p k g _ a c q u i r e _ m s y s . m d ) .
## Examples
* [ f f m p e g ] ( h t t p s : / / g i t h u b . c o m / M i c r o s o f t / v c p k g / b l o b / m a s t e r / p o r t s / f f m p e g / p o r t f i l e . c m a k e )
* [ o p e n s s l ] ( h t t p s : / / g i t h u b . c o m / M i c r o s o f t / v c p k g / b l o b / m a s t e r / p o r t s / o p e n s s l / p o r t f i l e . c m a k e )
* [ q t 5 ] ( h t t p s : / / g i t h u b . c o m / M i c r o s o f t / v c p k g / b l o b / m a s t e r / p o r t s / q t 5 / p o r t f i l e . c m a k e )
#]===]
2020-09-09 19:36:58 +02:00
include ( vcpkg_execute_in_download_mode )
2016-09-18 20:50:08 -07:00
function ( vcpkg_find_acquire_program VAR )
2017-10-12 08:22:50 -07:00
set ( EXPANDED_VAR ${ ${VAR } } )
if ( EXPANDED_VAR )
2016-09-18 20:50:08 -07:00
return ( )
endif ( )
unset ( NOEXTRACT )
2018-03-26 17:21:46 -07:00
unset ( _vfa_RENAME )
2017-02-03 17:16:13 +01:00
unset ( SUBDIR )
2020-08-25 18:41:56 -07:00
unset ( PROG_PATH_SUBDIR )
2017-02-09 18:13:52 +01:00
unset ( REQUIRED_INTERPRETER )
2019-08-20 12:13:26 -07:00
unset ( _vfa_SUPPORTED )
2019-07-02 22:47:50 +02:00
unset ( POST_INSTALL_COMMAND )
2020-08-25 18:41:56 -07:00
unset ( PATHS )
2017-02-14 17:29:47 -08:00
2016-09-18 20:50:08 -07:00
if ( VAR MATCHES "PERL" )
2017-08-02 14:36:02 -07:00
set ( PROGNAME perl )
2020-08-25 18:41:56 -07:00
set ( PERL_VERSION 5.30.0.1 )
set ( SUBDIR ${ PERL_VERSION } )
set ( PATHS ${ DOWNLOADS } /tools/perl/ ${ SUBDIR } /perl/bin )
2018-03-13 11:35:19 -07:00
set ( BREW_PACKAGE_NAME "perl" )
set ( APT_PACKAGE_NAME "perl" )
2020-06-19 00:42:20 +02:00
set ( URL
2020-08-25 18:41:56 -07:00
" h t t p s : / / s t r a w b e r r y . p e r l . b o t / d o w n l o a d / $ { P E R L _ V E R S I O N } / s t r a w b e r r y - p e r l - $ { P E R L _ V E R S I O N } - 3 2 b i t . z i p "
" h t t p : / / s t r a w b e r r y p e r l . c o m / d o w n l o a d / $ { P E R L _ V E R S I O N } / s t r a w b e r r y - p e r l - $ { P E R L _ V E R S I O N } - 3 2 b i t . z i p "
2020-06-19 00:42:20 +02:00
)
2020-08-25 18:41:56 -07:00
set ( ARCHIVE "strawberry-perl-${PERL_VERSION}-32bit.zip" )
2019-07-01 15:31:17 -05:00
set ( HASH d353d3dc743ebdc6d1e9f6f2b7a6db3c387c1ce6c890bae8adc8ae5deae8404f4c5e3cf249d1e151e7256d4c5ee9cd317e6c41f3b6f244340de18a24b938e0c4 )
2016-09-18 20:50:08 -07:00
elseif ( VAR MATCHES "NASM" )
set ( PROGNAME nasm )
2020-12-07 17:34:47 +01:00
set ( NASM_VERSION 2.15.05 )
2020-08-25 18:41:56 -07:00
set ( PATHS ${ DOWNLOADS } /tools/nasm/nasm- ${ NASM_VERSION } )
2018-03-13 11:35:19 -07:00
set ( BREW_PACKAGE_NAME "nasm" )
set ( APT_PACKAGE_NAME "nasm" )
2019-07-10 07:17:17 +01:00
set ( URL
2020-08-25 18:41:56 -07:00
" h t t p s : / / w w w . n a s m . u s / p u b / n a s m / r e l e a s e b u i l d s / $ { N A S M _ V E R S I O N } / w i n 3 2 / n a s m - $ { N A S M _ V E R S I O N } - w i n 3 2 . z i p "
" h t t p s : / / f o s s i e s . o r g / w i n d o w s / m i s c / n a s m - $ { N A S M _ V E R S I O N } - w i n 3 2 . z i p "
2019-07-10 07:17:17 +01:00
)
2020-08-25 18:41:56 -07:00
set ( ARCHIVE "nasm-${NASM_VERSION}-win32.zip" )
2020-12-07 17:34:47 +01:00
set ( HASH 9412b8caa07e15eac8f500f6f8fab9f038d95dc25e0124b08a80645607cf5761225f98546b52eac7b894420d64f26c3cbf22c19cd286bbe583f7c964256c97ed )
2016-09-18 20:50:08 -07:00
elseif ( VAR MATCHES "YASM" )
set ( PROGNAME yasm )
2020-08-25 18:41:56 -07:00
set ( YASM_VERSION 1.3.0.6.g1962 )
2018-03-26 17:21:46 -07:00
set ( SUBDIR 1.3.0.6 )
2019-12-07 01:01:12 +01:00
set ( BREW_PACKAGE_NAME "yasm" )
set ( APT_PACKAGE_NAME "yasm" )
2020-08-25 18:41:56 -07:00
set ( URL "https://www.tortall.net/projects/yasm/snapshots/v${YASM_VERSION}/yasm-${YASM_VERSION}.exe" )
set ( ARCHIVE "yasm-${YASM_VERSION}.exe" )
2018-03-26 17:21:46 -07:00
set ( _vfa_RENAME "yasm.exe" )
2016-09-18 20:50:08 -07:00
set ( NOEXTRACT ON )
2018-03-26 17:21:46 -07:00
set ( HASH c1945669d983b632a10c5ff31e86d6ecbff143c3d8b2c433c0d3d18f84356d2b351f71ac05fd44e5403651b00c31db0d14615d7f9a6ecce5750438d37105c55b )
2020-03-05 14:23:05 -08:00
elseif ( VAR MATCHES "GIT" )
set ( PROGNAME git )
if ( CMAKE_HOST_WIN32 )
2020-08-25 18:41:56 -07:00
set ( GIT_VERSION 2.26.2 )
set ( SUBDIR "git-${GIT_VERSION}-1-windows" )
set ( URL "https://github.com/git-for-windows/git/releases/download/v${GIT_VERSION}.windows.1/PortableGit-${GIT_VERSION}-32-bit.7z.exe" )
set ( ARCHIVE "PortableGit-${GIT_VERSION}-32-bit.7z.exe" )
2020-04-24 04:47:47 +08:00
set ( HASH d3cb60d62ca7b5d05ab7fbed0fa7567bec951984568a6c1646842a798c4aaff74bf534cf79414a6275c1927081a11b541d09931c017bf304579746e24fe57b36 )
2020-07-28 02:43:23 +02:00
set ( PATHS
2020-03-05 14:23:05 -08:00
" $ { D O W N L O A D S } / t o o l s / $ { S U B D I R } / m i n g w 3 2 / b i n "
" $ { D O W N L O A D S } / t o o l s / g i t / $ { S U B D I R } / m i n g w 3 2 / b i n " )
else ( )
set ( BREW_PACKAGE_NAME "git" )
set ( APT_PACKAGE_NAME "git" )
endif ( )
2020-05-12 04:58:12 +07:00
elseif ( VAR MATCHES "GN" )
set ( PROGNAME gn )
set ( _vfa_RENAME "gn" )
set ( CIPD_DOWNLOAD_GN "https://chrome-infra-packages.appspot.com/dl/gn/gn" )
if ( CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" )
set ( _vfa_SUPPORTED ON )
set ( GN_VERSION "xus7xtaPhpv5vCmKFOnsBVoB-PKmhZvRsSTjbQAuF0MC" )
set ( GN_PLATFORM "linux-amd64" )
set ( HASH "871e75d7f3597b74fb99e36bb41fe5a9f8ce8a4d9f167f4729fc6e444807a59f35ec8aca70c2274a99c79d70a1108272be1ad991678a8ceb39e30f77abb13135" )
elseif ( CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin" )
set ( _vfa_SUPPORTED ON )
set ( GN_VERSION "qhxILDNcJ2H44HfHmfiU-XIY3E_SIXvFqLd2wvbIgOoC" )
set ( GN_PLATFORM "mac-amd64" )
set ( HASH "03ee64cb15bae7fceb412900d470601090bce147cfd45eb9b46683ac1a5dca848465a5d74c55a47df7f0e334d708151249a6d37bb021de74dd48b97ed4a07937" )
else ( )
set ( GN_VERSION "qUkAhy9J0P7c5racy-9wB6AHNK_btS18im8S06_ehhwC" )
set ( GN_PLATFORM "windows-amd64" )
set ( HASH "263e02bd79eee0cb7b664831b7898565c5656a046328d8f187ef7ae2a4d766991d477b190c9b425fcc960ab76f381cd3e396afb85cba7408ca9e74eb32c175db" )
endif ( )
set ( SUBDIR "${GN_VERSION}" )
set ( URL "${CIPD_DOWNLOAD_GN}/${GN_PLATFORM}/+/${GN_VERSION}" )
set ( ARCHIVE "gn-${GN_PLATFORM}.zip" )
2019-10-04 20:14:35 +02:00
elseif ( VAR MATCHES "GO" )
set ( PROGNAME go )
2020-08-25 18:41:56 -07:00
set ( SUBDIR 1.13.1.windows-386 )
set ( PATHS ${ DOWNLOADS } /tools/go/ ${ SUBDIR } /go/bin )
2019-10-04 20:14:35 +02:00
set ( BREW_PACKAGE_NAME "go" )
set ( APT_PACKAGE_NAME "golang-go" )
2020-08-25 18:41:56 -07:00
set ( URL "https://dl.google.com/go/go${SUBDIR}.zip" )
set ( ARCHIVE "go${SUBDIR}.zip" )
2019-10-04 20:14:35 +02:00
set ( HASH 2ab0f07e876ad98d592351a8808c2de42351ab387217e088bc4c5fa51d6a835694c501e2350802323b55a27dc0157f8b70045597f789f9e50f5ceae50dea3027 )
2016-11-01 19:19:05 -04:00
elseif ( VAR MATCHES "PYTHON3" )
2018-11-27 01:52:11 +01:00
if ( CMAKE_HOST_WIN32 )
set ( PROGNAME python )
2020-11-20 12:44:51 -05:00
set ( PYTHON_VERSION 3.9.0 )
2020-02-05 03:32:03 +08:00
if ( VCPKG_TARGET_ARCHITECTURE STREQUAL x86 )
2020-08-25 18:41:56 -07:00
set ( SUBDIR "python-${PYTHON_VERSION}-x86" )
set ( URL "https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-embed-win32.zip" )
set ( ARCHIVE "python-${PYTHON_VERSION}-embed-win32.zip" )
2020-11-20 12:44:51 -05:00
set ( HASH 1501ad0b3ed1053466bef303e639c4d5cd9c270beacd07d70fb631db15503ea9e1f9de054cafe8759403e77aa898cd8b8878bf9024add4c081b28a4c5a9947ed )
2020-02-05 03:32:03 +08:00
else ( )
2020-08-25 18:41:56 -07:00
set ( SUBDIR "python-${PYTHON_VERSION}-x64" )
set ( URL "https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-embed-amd64.zip" )
set ( ARCHIVE "python-${PYTHON_VERSION}-embed-amd64.zip" )
2020-11-20 12:44:51 -05:00
set ( HASH e969622b74ea79a6adcf41b4d628bd80c9320df2f3d797905872610172838f1ab70d9bb0c70fcf7da396e03c3a73de96fa69a4b212b26f97de0e4f3366accf51 )
2020-02-05 03:32:03 +08:00
endif ( )
2018-11-27 01:52:11 +01:00
set ( PATHS ${ DOWNLOADS } /tools/python/ ${ SUBDIR } )
2020-11-20 12:44:51 -05:00
set ( POST_INSTALL_COMMAND ${ CMAKE_COMMAND } -E rm python39._pth )
2018-11-27 01:52:11 +01:00
else ( )
set ( PROGNAME python3 )
set ( BREW_PACKAGE_NAME "python" )
set ( APT_PACKAGE_NAME "python3" )
endif ( )
2016-11-28 17:17:28 -08:00
elseif ( VAR MATCHES "PYTHON2" )
2019-05-02 22:57:43 -07:00
if ( CMAKE_HOST_WIN32 )
set ( PROGNAME python )
2020-08-25 18:41:56 -07:00
set ( PYTHON_VERSION 2.7.16 )
2020-02-05 03:32:03 +08:00
if ( VCPKG_TARGET_ARCHITECTURE STREQUAL x86 )
2020-08-25 18:41:56 -07:00
set ( SUBDIR "python-${PYTHON_VERSION}-x86" )
set ( URL "https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}.msi" )
set ( ARCHIVE "python-${PYTHON_VERSION}.msi" )
2020-02-05 03:32:03 +08:00
set ( HASH c34a6fa2438682104dccb53650a2bdb79eac7996deff075201a0f71bb835d60d3ed866652a1931f15a29510fe8e1009ac04e423b285122d2e5747fefc4c10254 )
else ( )
2020-08-25 18:41:56 -07:00
set ( SUBDIR "python-${PYTHON_VERSION}-x64" )
set ( URL "https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}.amd64.msi" )
set ( ARCHIVE "python-${PYTHON_VERSION}.amd64.msi" )
2020-02-05 03:32:03 +08:00
set ( HASH 47c1518d1da939e3ba6722c54747778b93a44c525bcb358b253c23b2510374a49a43739c8d0454cedade858f54efa6319763ba33316fdc721305bc457efe4ffb )
endif ( )
2019-05-02 22:57:43 -07:00
set ( PATHS ${ DOWNLOADS } /tools/python/ ${ SUBDIR } )
2020-11-23 18:18:51 -06:00
elseif ( CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin" )
# macOS includes Python 2.7 built-in as `python`
set ( PROGNAME python )
set ( BREW_PACKAGE_NAME "python2" )
2019-05-02 22:57:43 -07:00
else ( )
set ( PROGNAME python2 )
set ( APT_PACKAGE_NAME "python" )
endif ( )
2017-05-29 09:05:52 +02:00
elseif ( VAR MATCHES "RUBY" )
set ( PROGNAME "ruby" )
2019-07-01 15:31:17 -05:00
set ( PATHS ${ DOWNLOADS } /tools/ruby/rubyinstaller-2.6.3-1-x86/bin )
set ( URL https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.3-1/rubyinstaller-2.6.3-1-x86.7z )
set ( ARCHIVE rubyinstaller-2.6.3-1-x86.7z )
set ( HASH 4322317dd02ce13527bf09d6e6a7787ca3814ea04337107d28af1ac360bd272504b32e20ed3ea84eb5b21dae7b23bfe5eb0e529b6b0aa21a1a2bbb0a542d7aec )
2016-10-25 20:56:02 +11:00
elseif ( VAR MATCHES "JOM" )
2016-10-25 12:39:50 +11:00
set ( PROGNAME jom )
2019-04-26 02:56:36 +08:00
set ( SUBDIR "jom-1.1.3" )
2017-02-23 03:29:25 -08:00
set ( PATHS ${ DOWNLOADS } /tools/jom/ ${ SUBDIR } )
2020-07-28 02:43:23 +02:00
set ( URL
2020-08-24 19:50:30 +02:00
" h t t p s : / / d o w n l o a d . q t . i o / o f f i c i a l _ r e l e a s e s / j o m / j o m _ 1 _ 1 _ 3 . z i p "
" h t t p s : / / m i r r o r s . o c f . b e r k e l e y . e d u / q t / o f f i c i a l _ r e l e a s e s / j o m / j o m _ 1 _ 1 _ 3 . z i p "
2020-01-27 17:44:33 -05:00
)
2019-04-26 02:56:36 +08:00
set ( ARCHIVE "jom_1_1_3.zip" )
set ( HASH 5b158ead86be4eb3a6780928d9163f8562372f30bde051d8c281d81027b766119a6e9241166b91de0aa6146836cea77e5121290e62e31b7a959407840fc57b33 )
2017-01-11 11:37:19 +01:00
elseif ( VAR MATCHES "7Z" )
set ( PROGNAME 7z )
2020-08-25 18:41:56 -07:00
set ( PATHS "${DOWNLOADS}/tools/7z/Files/7-Zip" )
2019-07-01 15:31:17 -05:00
set ( URL "https://7-zip.org/a/7z1900.msi" )
set ( ARCHIVE "7z1900.msi" )
set ( HASH f73b04e2d9f29d4393fde572dcf3c3f0f6fa27e747e5df292294ab7536ae24c239bf917689d71eb10cc49f6b9a4ace26d7c122ee887d93cc935f268c404e9067 )
2017-02-03 17:16:13 +01:00
elseif ( VAR MATCHES "NINJA" )
set ( PROGNAME ninja )
2020-09-24 21:15:54 +02:00
set ( NINJA_VERSION 1.10.1 )
2020-08-16 21:07:17 +02:00
set ( _vfa_SUPPORTED ON )
2018-03-30 16:59:59 -07:00
if ( CMAKE_HOST_WIN32 )
2020-08-16 21:07:17 +02:00
set ( ARCHIVE "ninja-win-${NINJA_VERSION}.zip" )
2020-08-25 18:41:56 -07:00
set ( SUBDIR "${NINJA_VERSION}-windows" )
2020-08-16 21:07:17 +02:00
set ( URL "https://github.com/ninja-build/ninja/releases/download/v${NINJA_VERSION}/ninja-win.zip" )
2020-09-24 21:15:54 +02:00
set ( HASH 0120054f0fea6eea4035866201f69fba1c039f681f680cfcbbefcaee97419815d092a6e2f3823ea6c3928ad296395f36029e337127ee977270000b35df5f9c40 )
2018-04-24 16:04:14 -07:00
elseif ( CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin" )
2020-08-16 21:07:17 +02:00
set ( ARCHIVE "ninja-mac-${NINJA_VERSION}.zip" )
set ( URL "https://github.com/ninja-build/ninja/releases/download/v${NINJA_VERSION}/ninja-mac.zip" )
2020-08-25 18:41:56 -07:00
set ( SUBDIR "${NINJA_VERSION}-osx" )
set ( PATHS "${DOWNLOADS}/tools/ninja-${NINJA_VERSION}-osx" )
2020-09-24 21:15:54 +02:00
set ( HASH 99f5ccca2461a4d340f4528a8eef6d81180757da78313f1f9412ed13a7bbaf6df537a342536fd053db00524bcb734d205af5f6fde419a1eb2e6f77ee8b7860fe )
2019-01-08 08:03:35 +08:00
elseif ( CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD" )
set ( PATHS "${DOWNLOADS}/tools/${SUBDIR}-freebsd" )
2020-08-16 21:07:17 +02:00
set ( _vfa_SUPPORTED OFF )
2018-03-30 16:59:59 -07:00
else ( )
2020-08-16 21:07:17 +02:00
set ( ARCHIVE "ninja-linux-${NINJA_VERSION}.zip" )
set ( URL "https://github.com/ninja-build/ninja/releases/download/v${NINJA_VERSION}/ninja-linux.zip" )
2020-08-25 18:41:56 -07:00
set ( SUBDIR "${NINJA_VERSION}-linux" )
set ( PATHS "${DOWNLOADS}/tools/ninja-${NINJA_VERSION}-linux" )
2020-09-24 21:15:54 +02:00
set ( HASH 9820c76fde6fac398743766e7ea0fe8a7d6e4191a77512a2d2f51c2ddcc947fcd91ac08522742281a285418c114e760b0158a968305f8dc854bb9693883b7f1e )
2018-03-30 16:59:59 -07:00
endif ( )
2020-08-16 21:07:17 +02:00
set ( VERSION_CMD --version )
2019-03-14 00:10:11 -07:00
elseif ( VAR MATCHES "NUGET" )
set ( PROGNAME nuget )
2020-06-30 14:02:26 -07:00
set ( SUBDIR "5.5.1" )
2020-08-25 18:41:56 -07:00
set ( PATHS "${DOWNLOADS}/tools/nuget-${SUBDIR}-windows" )
2019-03-14 00:10:11 -07:00
set ( BREW_PACKAGE_NAME "nuget" )
2020-06-30 14:02:26 -07:00
set ( URL "https://dist.nuget.org/win-x86-commandline/v5.5.1/nuget.exe" )
set ( _vfa_RENAME "nuget.exe" )
set ( ARCHIVE "nuget.5.5.1.exe" )
2019-04-02 15:49:03 -05:00
set ( NOEXTRACT ON )
2020-06-30 14:02:26 -07:00
set ( HASH 22ea847d8017cd977664d0b13c889cfb13c89143212899a511be217345a4e243d4d8d4099700114a11d26a087e83eb1a3e2b03bdb5e0db48f10403184cd26619 )
2017-02-09 18:13:52 +01:00
elseif ( VAR MATCHES "MESON" )
2020-11-18 22:36:20 +01:00
set ( MESON_VERSION 0.56.01 )
2020-08-17 16:25:05 +02:00
set ( PROGNAME meson )
set ( REQUIRED_INTERPRETER PYTHON3 )
set ( APT_PACKAGE_NAME "meson" )
set ( BREW_PACKAGE_NAME "meson" )
set ( SCRIPTNAME meson meson.py )
2020-11-18 22:36:20 +01:00
set ( PATHS ${ DOWNLOADS } /tools/meson/meson-91876b40316962620c1705ae14075ab46f8dd644 )
set ( URL "https://github.com/mesonbuild/meson/archive/91876b40316962620c1705ae14075ab46f8dd644.tar.gz" )
set ( ARCHIVE "meson-91876b40316962620c1705ae14075ab46f8dd644.tar.gz" )
#set(PATHS ${DOWNLOADS}/tools/meson/meson-${MESON_VERSION})
#set(URL "https://github.com/mesonbuild/meson/releases/download/${MESON_VERSION}/meson-${MESON_VERSION}.tar.gz")
#set(ARCHIVE "meson-${MESON_VERSION}.tar.gz")
set ( HASH 784b740a01de70312f9240d38b683b2065f40572c87d30929386fe417b2cc70bcc86213c86e143f349c78121c9cc6d7392526d6e53512ae22a6ec0db57f26e3e )
2020-08-17 16:25:05 +02:00
set ( _vfa_SUPPORTED ON )
set ( VERSION_CMD --version )
2020-07-13 13:43:39 -07:00
elseif ( VAR MATCHES "FLEX" OR VAR MATCHES "BISON" )
2018-11-06 17:03:59 -08:00
if ( CMAKE_HOST_WIN32 )
2020-07-13 13:43:39 -07:00
set ( SOURCEFORGE_ARGS
R E P O w i n f l e x b i s o n
F I L E N A M E w i n f l e x b i s o n - 2 . 5 . 1 6 . z i p
S H A 5 1 2 0 a 1 4 1 5 4 b f f 5 d 9 9 8 f e b 2 3 9 0 3 c 4 6 9 6 1 5 2 8 f 8 c c b 4 4 6 4 3 7 5 d 5 3 8 4 d b 8 c 4 a 7 d 2 3 0 c 0 c 5 9 9 d a 9 b 6 8 e 7 a 3 2 f 3 2 1 7 a 0 a 0 7 3 5 7 4 2 2 4 2 e a f 3 7 6 9 c b 4 f 0 3 e 0 0 9 3 1 a f 8 6 4 0 2 5 0 e 9 1 2 3
N O _ R E M O V E _ O N E _ L E V E L
W O R K I N G _ D I R E C T O R Y " $ { D O W N L O A D S } / t o o l s / w i n f l e x b i s o n "
)
if ( VAR MATCHES "FLEX" )
set ( PROGNAME win_flex )
else ( )
set ( PROGNAME win_bison )
endif ( )
set ( PATHS ${ DOWNLOADS } /tools/winflexbison/0a14154bff-a8cf65db07 )
2019-01-28 15:37:23 -08:00
if ( NOT EXISTS "${PATHS}/data/m4sugar/m4sugar.m4" )
2018-12-17 16:26:56 -08:00
file ( REMOVE_RECURSE "${PATHS}" )
endif ( )
2020-07-13 13:43:39 -07:00
elseif ( VAR MATCHES "FLEX" )
2018-08-22 23:04:20 +02:00
set ( PROGNAME flex )
set ( APT_PACKAGE_NAME flex )
set ( BREW_PACKAGE_NAME flex )
else ( )
set ( PROGNAME bison )
set ( APT_PACKAGE_NAME bison )
set ( BREW_PACKAGE_NAME bison )
2020-06-18 04:42:40 +08:00
if ( APPLE )
set ( PATHS /usr/local/opt/bison/bin )
endif ( )
2018-08-22 23:04:20 +02:00
endif ( )
2020-09-06 04:50:30 +02:00
elseif ( VAR MATCHES "CLANG" )
set ( PROGNAME clang )
set ( SUBDIR "clang-10.0.0" )
if ( CMAKE_HOST_WIN32 )
set ( PATHS
# Support LLVM in Visual Studio 2019
" $ E N V { L L V M I n s t a l l D i r } / x 6 4 / b i n "
" $ E N V { L L V M I n s t a l l D i r } / b i n "
" $ E N V { V C I N S T A L L D I R } / T o o l s / L l v m / x 6 4 / b i n "
" $ E N V { V C I N S T A L L D I R } / T o o l s / L l v m / b i n "
" $ { D O W N L O A D S } / t o o l s / $ { S U B D I R } - w i n d o w s / b i n "
" $ { D O W N L O A D S } / t o o l s / c l a n g / $ { S U B D I R } / b i n " )
if ( DEFINED ENV{PROCESSOR_ARCHITEW6432} )
set ( HOST_ARCH_ $ENV{ PROCESSOR_ARCHITEW6432 } )
else ( )
set ( HOST_ARCH_ $ENV{ PROCESSOR_ARCHITECTURE } )
endif ( )
if ( HOST_ARCH_ MATCHES "64" )
set ( URL "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/LLVM-10.0.0-win64.exe" )
set ( ARCHIVE "LLVM-10.0.0-win64.7z.exe" )
set ( HASH 3603a4be3548dabc7dda94f3ed4384daf8a94337e44ee62c0d54776c79f802b0cb98fc106e902409942e841c39bc672cc6d61153737ad1cc386b609ef25db71c )
else ( )
set ( URL "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/LLVM-10.0.0-win32.exe" )
set ( ARCHIVE "LLVM-10.0.0-win32.7z.exe" )
set ( HASH 8494922b744ca0dc8d075a1d3a35a0db5a9287544afd5c4984fa328bc26f291209f6030175896b4895019126f5832045e06d8ad48072b549916df29a2228348b )
endif ( )
endif ( )
set ( BREW_PACKAGE_NAME "llvm" )
set ( APT_PACKAGE_NAME "clang" )
2017-05-29 09:05:52 +02:00
elseif ( VAR MATCHES "GPERF" )
set ( PROGNAME gperf )
2020-08-25 18:41:56 -07:00
set ( GPERF_VERSION 3.0.1 )
2017-05-29 09:05:52 +02:00
set ( PATHS ${ DOWNLOADS } /tools/gperf/bin )
2020-08-25 18:41:56 -07:00
set ( URL "https://sourceforge.net/projects/gnuwin32/files/gperf/${GPERF_VERSION}/gperf-${GPERF_VERSION}-bin.zip/download" )
set ( ARCHIVE "gperf-${GPERF_VERSION}-bin.zip" )
2017-05-29 09:05:52 +02:00
set ( HASH 3f2d3418304390ecd729b85f65240a9e4d204b218345f82ea466ca3d7467789f43d0d2129fcffc18eaad3513f49963e79775b10cc223979540fa2e502fe7d4d9 )
2017-06-17 11:30:03 -07:00
elseif ( VAR MATCHES "GASPREPROCESSOR" )
set ( NOEXTRACT true )
set ( PROGNAME gas-preprocessor )
2019-12-04 04:17:08 +09:00
set ( SUBDIR "b5ea3a50" )
2017-06-17 11:30:03 -07:00
set ( REQUIRED_INTERPRETER PERL )
set ( SCRIPTNAME "gas-preprocessor.pl" )
2019-12-04 04:17:08 +09:00
set ( PATHS ${ DOWNLOADS } /tools/gas-preprocessor/ ${ SUBDIR } )
set ( _vfa_RENAME "gas-preprocessor.pl" )
set ( URL "https://raw.githubusercontent.com/FFmpeg/gas-preprocessor/b5ea3a50ed991e6a3218e89402a8162c73f59cb2/gas-preprocessor.pl" )
set ( ARCHIVE "gas-preprocessor-${SUBDIR}.pl" )
set ( HASH 3a42a90dee09f3c8653d043d848057287f7460806a08f9471131d0c546ba541bdfa4efa3019e7ffc57a6c20538f1034f7a53b30ecaad9db5add7c71d8de35db9 )
2017-10-03 00:55:54 +09:00
elseif ( VAR MATCHES "DARK" )
set ( PROGNAME dark )
set ( SUBDIR "wix311-binaries" )
set ( PATHS ${ DOWNLOADS } /tools/dark/ ${ SUBDIR } )
set ( URL "https://github.com/wixtoolset/wix3/releases/download/wix311rtm/wix311-binaries.zip" )
set ( ARCHIVE "wix311-binaries.zip" )
set ( HASH 74f0fa29b5991ca655e34a9d1000d47d4272e071113fada86727ee943d913177ae96dc3d435eaf494d2158f37560cd4c2c5274176946ebdb17bf2354ced1c516 )
2017-11-19 11:42:52 +00:00
elseif ( VAR MATCHES "SCONS" )
set ( PROGNAME scons )
2020-08-25 18:41:56 -07:00
set ( SCONS_VERSION 3.0.1 )
set ( SUBDIR ${ SCONS_VERSION } )
2017-11-19 11:42:52 +00:00
set ( REQUIRED_INTERPRETER PYTHON2 )
set ( SCRIPTNAME "scons.py" )
2020-08-25 18:41:56 -07:00
set ( URL "https://sourceforge.net/projects/scons/files/scons-local-${SCONS_VERSION}.zip/download" )
set ( ARCHIVE "scons-local-${SCONS_VERSION}.zip" )
2020-08-03 00:49:20 +02:00
set ( HASH fe121b67b979a4e9580c7f62cfdbe0c243eba62a05b560d6d513ac7f35816d439b26d92fc2d7b7d7241c9ce2a49ea7949455a17587ef53c04a5f5125ac635727 )
elseif ( VAR MATCHES "SWIG" )
2020-10-23 03:29:35 -04:00
set ( SWIG_VERSION 4.0.2 )
2020-08-03 00:49:20 +02:00
set ( PROGNAME swig )
if ( CMAKE_HOST_WIN32 )
2020-10-23 03:29:35 -04:00
set ( SOURCEFORGE_ARGS
2020-08-25 18:41:56 -07:00
R E P O s w i g / s w i g w i n
2020-10-23 03:29:35 -04:00
R E F s w i g w i n - $ { S W I G _ V E R S I O N }
F I L E N A M E " s w i g w i n - $ { S W I G _ V E R S I O N } . z i p "
S H A 5 1 2 b 8 f 1 0 5 f 9 b 9 d b 6 a c c 1 f 6 e 3 7 4 1 9 9 0 9 1 5 b 5 3 3 c d 1 b c 2 0 6 e b 9 6 4 5 f d 6 8 3 6 4 5 7 f d 3 0 7 8 9 b 7 2 2 9 d 2 e 3 2 1 9 d 8 e 3 5 f 2 3 9 0 6 0 5 a d e 0 f b c a 4 9 3 a e 1 6 2 e c 3 b 4 b c 4 e 4 2 8 b 5 7 1 5 5 d b 0 3 d
2020-08-03 00:49:20 +02:00
N O _ R E M O V E _ O N E _ L E V E L
W O R K I N G _ D I R E C T O R Y " $ { D O W N L O A D S } / t o o l s / s w i g "
2020-10-23 03:29:35 -04:00
)
set ( SUBDIR b8f105f9b9-f0518bc3b7/swigwin- ${ SWIG_VERSION } )
else ( )
set ( APT_PACKAGE_NAME "swig" )
set ( BREW_PACKAGE_NAME "swig" )
endif ( )
2018-02-24 16:00:51 +08:00
elseif ( VAR MATCHES "DOXYGEN" )
set ( PROGNAME doxygen )
2020-01-22 21:27:45 +01:00
set ( DOXYGEN_VERSION 1.8.17 )
2020-08-25 18:41:56 -07:00
set ( SOURCEFORGE_ARGS
R E P O d o x y g e n
R E F r e l - $ { D O X Y G E N _ V E R S I O N }
F I L E N A M E " d o x y g e n - $ { D O X Y G E N _ V E R S I O N } . w i n d o w s . b i n . z i p "
S H A 5 1 2 6 b a c 4 7 e c 5 5 2 4 8 6 7 8 3 a 7 0 c c 7 3 b 4 4 c f 8 6 b 4 c e d a 1 2 a b a 6 b 5 2 8 3 5 c 2 2 2 1 7 1 2 b d 0 a 6 c 8 4 5 c e c e c 1 7 8 c 9 d d a a 8 8 2 3 7 f 5 a 7 8 1 f 7 9 7 a d d 5 2 8 f 4 7 e 4 e d 0 1 7 c 7 8 8 8 e b 1 d d 2 b c 0 b 4 b
N O _ R E M O V E _ O N E _ L E V E L
W O R K I N G _ D I R E C T O R Y " $ { D O W N L O A D S } / t o o l s / d o x y g e n "
)
set ( SUBDIR 6bac47ec55-25c819fd77 )
2019-08-20 12:13:26 -07:00
elseif ( VAR MATCHES "BAZEL" )
set ( PROGNAME bazel )
[tensorflow-cc] More or less completely rewritten port, update to 2.3.1 (#13028)
* fix build issues occurring from default bazel config being used because customized bazel config is stored in wrong directory
* [tensorflow-cc] Update CONTROL and ci.baseline.txt
* fix also applies to windows static build
* fix debug and static builds as well as library naming for non-linux
- add patch to fix debug builds
- add patch to fix exports for static linking
- really build debug (instead of cloning release)
- override bazel build options for debug (work around bazel bug)
- bazel doesn't support static libraries: work around by building dynamic library and constructing static linkage commands from build log
- Windows .pdb file can't be >4GB even on x64: work around using reduced debug information
- Windows doesn't support .lib files >4GB even on x64, so split into multiple libs
- vcpkg requires equal amount of libs for debug and release: work around using handcrafted empty dummy libs
- fix naming of libs (.dll on Windows and .dylib on macOS)
* upgrade tensorflow from v1.14 to v2.3
- adapt patch files to tensorflow code changes
- update bazel from v0.25.2 to v3.1
- on Windows use python installed on the host instead of embedded python obtained via vcpkg because embedded python lacks pip, which we need to obtain numpy
- on Windows add MSYS2 to the PATH so that bazel tools can access MSYS2 GIT
- add support for custom CA certificates when using HTTPS_PROXY
* fix execute process macro
The existing implementation totally screwed up commands if the command's arguments contained semicolons (this is the case, e.g., in the FindPython modules of the cmake distribution).
* extend overriden execute_process to more than one COMMAND as there actually are use cases for this
* added another patch required for tensorflow v2.3, fixed path and working directory
* Revert "incorporate changes from microsoft:master"
* Revert "Revert "incorporate changes from microsoft:master""
* final fixes for static build + improving out messages
* enabling linux and osx in CI to see if it works now
* simplified code, fixed version numbers, fixed generated include cmake file
* fix failing postbuild check on handcrafted empty dummy library by spreading the last real libraries contents over the required number of libraries
* remove dead code commit by mistake again
* improvements from code review
* cleaner fix for debug code
* find pip3 in PATH (PYTHON3_DIR apparently not valid for pip3)
* fix error in python helper script
* fix wrong libname in postbuild script
* fix python detection + switch to python on msys2 (instead of embedded python) for Windows as we need numpy
* fix order of arguments
* fix command (it may contain spaces such as C:\Program Files\...)
* revert last commit (root cause for CI failures is something different: there are line breaks in path)
* fix regex comparision
(value needs to be escaped as it may contains regex special characters such as brackets, eg C:/Program Files (x86)/...)
* fix linebreaks in generated file
* fix CRT linkage
(macOS doesn't support static CRT linkage; it's set to dynamic even static target triplets for macOS and linux)
* refactor implemenation to avoid as much code duplication as possible -- algorithmically identical
* fix version numbers in helper scripts
* enable work-around for Windows until bazel fix is available
* install missing python3-pip on linux
* fix linux build by patching
* apply timeout feature now available via merged master branch
* correct linux build patch
* improve debug build patches
(no functional difference because LOG(FATAL, ...) macro internally anyway calls abort(), which the compiler doesn't detect in debug mode...
* improve linux patch
* temporarily add debug to inspect what's going on on macOS CI
* remove temporary debug code and fix static linking scripts for linux and macOS
* fix regex escaping
* fix ambiguous match while grepping for the framework link command
* extend fix of ambiguous match while grepping for the framework link command
* fix what merge of master broke
* fix more what got broken by merging master
(all packages and their dependencies are now maintained manually instead of using pacman...)
* remove "unofficial" from filename
* added switch do distinct classic and manifest mode when generating config.cmake file
* create symlinks for libraries without version number
* fix linux postbuild script
* temporarily disable code making problems
* add note for linking on Linux and macOS
* forget to add README file in previous commit
* add file forgotton in macro fixing patch
* fix python library path
* fix macOS static link command
* update linkage instructions in README
* Update ports/tensorflow-cc/CONTROL
* Update ports/tensorflow-cc/portfile.cmake
* Update scripts/ci.baseline.txt
* use vcpkg_execute_required_process
* pass C_FLAGS and CXX_FLAGS to bazel
* fix INTERFACE_INCLUDE_DIRECTORIES
* fix optional c/cxx arguments
* also add linker opts
* update README
* merge static libs into one
to support force_load (cannot force_load both due to duplicate symbols)
* update README
* quote python path (it might contain spaces that don't get escaped inside outer quotes of bash command)
* fix python path also for static build
* add arm(64) as currently unsupported arch
* bazel 3.7 is available -> remove workaround
* update README, remove necessary c-ares from deps
* update msys package
* add uwp specific options, and minor general improvements
* fix string replace
* fix control file and windows path separator
* revert backslashes-fix -- the root cause was missing .exe extension
* upgrade to tf 2.3.1
* fix hard-coded version
* remove uwp work-in-progress code so that PR can be merged
* update README and print out usage info in portfile
* Update ports/tensorflow-cc/README-linux
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/README-linux
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/README-linux
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/README-linux
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/README-linux
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/README-windows
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/portfile.cmake
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/portfile.cmake
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/portfile.cmake
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/portfile.cmake
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/portfile.cmake
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* improve usage hints as discussed in review
* add comment
* apply changes from review
* make additional compiler / linker args space-proof
* Update ports/tensorflow-cc/README-macos
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/tensorflow-cc-config-shared.cmake.in
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/tensorflow-cc-config-shared.cmake.in
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/README-linux
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/README-macos
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* apply changes from code review
* maybe fix the config files
* rob.maynard CRs
* fix windows static lib naming for first part
* Update ports/tensorflow-cc/generate_static_link_cmd_windows.py
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* apply rob maynards 1st suggestion
* nicole CRs
* format/fix-compile
* fix missing string termination
* prefer IMPORTED_LOCATION over IMPORTED_LOCATION_RELEASE to have default fall-back
* hopefully fix the issue where no libraries are generated
* final stuff
Co-authored-by: Gehweiler <Joachim_Gehweiler@McAfee.com>
Co-authored-by: wangli28 <wangli28@beyondsoft.com>
Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
Co-authored-by: Joachim Gehweiler <joachim@Joachims-iMac.local>
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
2020-11-12 19:15:48 +01:00
set ( BAZEL_VERSION 3.7.0 )
2019-08-20 12:13:26 -07:00
set ( _vfa_RENAME "bazel" )
if ( CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" )
set ( _vfa_SUPPORTED ON )
2020-08-25 18:41:56 -07:00
set ( SUBDIR ${ BAZEL_VERSION } -linux )
set ( URL "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${SUBDIR}-x86_64" )
set ( ARCHIVE "bazel-${SUBDIR}-x86_64" )
2019-08-20 12:13:26 -07:00
set ( NOEXTRACT ON )
[tensorflow-cc] More or less completely rewritten port, update to 2.3.1 (#13028)
* fix build issues occurring from default bazel config being used because customized bazel config is stored in wrong directory
* [tensorflow-cc] Update CONTROL and ci.baseline.txt
* fix also applies to windows static build
* fix debug and static builds as well as library naming for non-linux
- add patch to fix debug builds
- add patch to fix exports for static linking
- really build debug (instead of cloning release)
- override bazel build options for debug (work around bazel bug)
- bazel doesn't support static libraries: work around by building dynamic library and constructing static linkage commands from build log
- Windows .pdb file can't be >4GB even on x64: work around using reduced debug information
- Windows doesn't support .lib files >4GB even on x64, so split into multiple libs
- vcpkg requires equal amount of libs for debug and release: work around using handcrafted empty dummy libs
- fix naming of libs (.dll on Windows and .dylib on macOS)
* upgrade tensorflow from v1.14 to v2.3
- adapt patch files to tensorflow code changes
- update bazel from v0.25.2 to v3.1
- on Windows use python installed on the host instead of embedded python obtained via vcpkg because embedded python lacks pip, which we need to obtain numpy
- on Windows add MSYS2 to the PATH so that bazel tools can access MSYS2 GIT
- add support for custom CA certificates when using HTTPS_PROXY
* fix execute process macro
The existing implementation totally screwed up commands if the command's arguments contained semicolons (this is the case, e.g., in the FindPython modules of the cmake distribution).
* extend overriden execute_process to more than one COMMAND as there actually are use cases for this
* added another patch required for tensorflow v2.3, fixed path and working directory
* Revert "incorporate changes from microsoft:master"
* Revert "Revert "incorporate changes from microsoft:master""
* final fixes for static build + improving out messages
* enabling linux and osx in CI to see if it works now
* simplified code, fixed version numbers, fixed generated include cmake file
* fix failing postbuild check on handcrafted empty dummy library by spreading the last real libraries contents over the required number of libraries
* remove dead code commit by mistake again
* improvements from code review
* cleaner fix for debug code
* find pip3 in PATH (PYTHON3_DIR apparently not valid for pip3)
* fix error in python helper script
* fix wrong libname in postbuild script
* fix python detection + switch to python on msys2 (instead of embedded python) for Windows as we need numpy
* fix order of arguments
* fix command (it may contain spaces such as C:\Program Files\...)
* revert last commit (root cause for CI failures is something different: there are line breaks in path)
* fix regex comparision
(value needs to be escaped as it may contains regex special characters such as brackets, eg C:/Program Files (x86)/...)
* fix linebreaks in generated file
* fix CRT linkage
(macOS doesn't support static CRT linkage; it's set to dynamic even static target triplets for macOS and linux)
* refactor implemenation to avoid as much code duplication as possible -- algorithmically identical
* fix version numbers in helper scripts
* enable work-around for Windows until bazel fix is available
* install missing python3-pip on linux
* fix linux build by patching
* apply timeout feature now available via merged master branch
* correct linux build patch
* improve debug build patches
(no functional difference because LOG(FATAL, ...) macro internally anyway calls abort(), which the compiler doesn't detect in debug mode...
* improve linux patch
* temporarily add debug to inspect what's going on on macOS CI
* remove temporary debug code and fix static linking scripts for linux and macOS
* fix regex escaping
* fix ambiguous match while grepping for the framework link command
* extend fix of ambiguous match while grepping for the framework link command
* fix what merge of master broke
* fix more what got broken by merging master
(all packages and their dependencies are now maintained manually instead of using pacman...)
* remove "unofficial" from filename
* added switch do distinct classic and manifest mode when generating config.cmake file
* create symlinks for libraries without version number
* fix linux postbuild script
* temporarily disable code making problems
* add note for linking on Linux and macOS
* forget to add README file in previous commit
* add file forgotton in macro fixing patch
* fix python library path
* fix macOS static link command
* update linkage instructions in README
* Update ports/tensorflow-cc/CONTROL
* Update ports/tensorflow-cc/portfile.cmake
* Update scripts/ci.baseline.txt
* use vcpkg_execute_required_process
* pass C_FLAGS and CXX_FLAGS to bazel
* fix INTERFACE_INCLUDE_DIRECTORIES
* fix optional c/cxx arguments
* also add linker opts
* update README
* merge static libs into one
to support force_load (cannot force_load both due to duplicate symbols)
* update README
* quote python path (it might contain spaces that don't get escaped inside outer quotes of bash command)
* fix python path also for static build
* add arm(64) as currently unsupported arch
* bazel 3.7 is available -> remove workaround
* update README, remove necessary c-ares from deps
* update msys package
* add uwp specific options, and minor general improvements
* fix string replace
* fix control file and windows path separator
* revert backslashes-fix -- the root cause was missing .exe extension
* upgrade to tf 2.3.1
* fix hard-coded version
* remove uwp work-in-progress code so that PR can be merged
* update README and print out usage info in portfile
* Update ports/tensorflow-cc/README-linux
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/README-linux
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/README-linux
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/README-linux
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/README-linux
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/README-windows
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/portfile.cmake
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/portfile.cmake
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/portfile.cmake
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/portfile.cmake
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/portfile.cmake
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* improve usage hints as discussed in review
* add comment
* apply changes from review
* make additional compiler / linker args space-proof
* Update ports/tensorflow-cc/README-macos
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/tensorflow-cc-config-shared.cmake.in
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/tensorflow-cc-config-shared.cmake.in
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/README-linux
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/README-macos
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* apply changes from code review
* maybe fix the config files
* rob.maynard CRs
* fix windows static lib naming for first part
* Update ports/tensorflow-cc/generate_static_link_cmd_windows.py
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* apply rob maynards 1st suggestion
* nicole CRs
* format/fix-compile
* fix missing string termination
* prefer IMPORTED_LOCATION over IMPORTED_LOCATION_RELEASE to have default fall-back
* hopefully fix the issue where no libraries are generated
* final stuff
Co-authored-by: Gehweiler <Joachim_Gehweiler@McAfee.com>
Co-authored-by: wangli28 <wangli28@beyondsoft.com>
Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
Co-authored-by: Joachim Gehweiler <joachim@Joachims-iMac.local>
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
2020-11-12 19:15:48 +01:00
set ( HASH 1118eb939627cc5570616f7bd41c72a90df9bb4a3c802eb8149b5b2eebf27090535c029590737557e270c5a8556267b8c1843eb0ff55dc9e4b82581a64e07ec1 )
2020-03-05 14:17:08 -08:00
elseif ( CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin" )
set ( _vfa_SUPPORTED ON )
2020-08-25 18:41:56 -07:00
set ( SUBDIR ${ BAZEL_VERSION } -darwin )
set ( URL "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${SUBDIR}-x86_64" )
set ( ARCHIVE "bazel-${SUBDIR}-x86_64" )
2020-03-05 14:17:08 -08:00
set ( NOEXTRACT ON )
[tensorflow-cc] More or less completely rewritten port, update to 2.3.1 (#13028)
* fix build issues occurring from default bazel config being used because customized bazel config is stored in wrong directory
* [tensorflow-cc] Update CONTROL and ci.baseline.txt
* fix also applies to windows static build
* fix debug and static builds as well as library naming for non-linux
- add patch to fix debug builds
- add patch to fix exports for static linking
- really build debug (instead of cloning release)
- override bazel build options for debug (work around bazel bug)
- bazel doesn't support static libraries: work around by building dynamic library and constructing static linkage commands from build log
- Windows .pdb file can't be >4GB even on x64: work around using reduced debug information
- Windows doesn't support .lib files >4GB even on x64, so split into multiple libs
- vcpkg requires equal amount of libs for debug and release: work around using handcrafted empty dummy libs
- fix naming of libs (.dll on Windows and .dylib on macOS)
* upgrade tensorflow from v1.14 to v2.3
- adapt patch files to tensorflow code changes
- update bazel from v0.25.2 to v3.1
- on Windows use python installed on the host instead of embedded python obtained via vcpkg because embedded python lacks pip, which we need to obtain numpy
- on Windows add MSYS2 to the PATH so that bazel tools can access MSYS2 GIT
- add support for custom CA certificates when using HTTPS_PROXY
* fix execute process macro
The existing implementation totally screwed up commands if the command's arguments contained semicolons (this is the case, e.g., in the FindPython modules of the cmake distribution).
* extend overriden execute_process to more than one COMMAND as there actually are use cases for this
* added another patch required for tensorflow v2.3, fixed path and working directory
* Revert "incorporate changes from microsoft:master"
* Revert "Revert "incorporate changes from microsoft:master""
* final fixes for static build + improving out messages
* enabling linux and osx in CI to see if it works now
* simplified code, fixed version numbers, fixed generated include cmake file
* fix failing postbuild check on handcrafted empty dummy library by spreading the last real libraries contents over the required number of libraries
* remove dead code commit by mistake again
* improvements from code review
* cleaner fix for debug code
* find pip3 in PATH (PYTHON3_DIR apparently not valid for pip3)
* fix error in python helper script
* fix wrong libname in postbuild script
* fix python detection + switch to python on msys2 (instead of embedded python) for Windows as we need numpy
* fix order of arguments
* fix command (it may contain spaces such as C:\Program Files\...)
* revert last commit (root cause for CI failures is something different: there are line breaks in path)
* fix regex comparision
(value needs to be escaped as it may contains regex special characters such as brackets, eg C:/Program Files (x86)/...)
* fix linebreaks in generated file
* fix CRT linkage
(macOS doesn't support static CRT linkage; it's set to dynamic even static target triplets for macOS and linux)
* refactor implemenation to avoid as much code duplication as possible -- algorithmically identical
* fix version numbers in helper scripts
* enable work-around for Windows until bazel fix is available
* install missing python3-pip on linux
* fix linux build by patching
* apply timeout feature now available via merged master branch
* correct linux build patch
* improve debug build patches
(no functional difference because LOG(FATAL, ...) macro internally anyway calls abort(), which the compiler doesn't detect in debug mode...
* improve linux patch
* temporarily add debug to inspect what's going on on macOS CI
* remove temporary debug code and fix static linking scripts for linux and macOS
* fix regex escaping
* fix ambiguous match while grepping for the framework link command
* extend fix of ambiguous match while grepping for the framework link command
* fix what merge of master broke
* fix more what got broken by merging master
(all packages and their dependencies are now maintained manually instead of using pacman...)
* remove "unofficial" from filename
* added switch do distinct classic and manifest mode when generating config.cmake file
* create symlinks for libraries without version number
* fix linux postbuild script
* temporarily disable code making problems
* add note for linking on Linux and macOS
* forget to add README file in previous commit
* add file forgotton in macro fixing patch
* fix python library path
* fix macOS static link command
* update linkage instructions in README
* Update ports/tensorflow-cc/CONTROL
* Update ports/tensorflow-cc/portfile.cmake
* Update scripts/ci.baseline.txt
* use vcpkg_execute_required_process
* pass C_FLAGS and CXX_FLAGS to bazel
* fix INTERFACE_INCLUDE_DIRECTORIES
* fix optional c/cxx arguments
* also add linker opts
* update README
* merge static libs into one
to support force_load (cannot force_load both due to duplicate symbols)
* update README
* quote python path (it might contain spaces that don't get escaped inside outer quotes of bash command)
* fix python path also for static build
* add arm(64) as currently unsupported arch
* bazel 3.7 is available -> remove workaround
* update README, remove necessary c-ares from deps
* update msys package
* add uwp specific options, and minor general improvements
* fix string replace
* fix control file and windows path separator
* revert backslashes-fix -- the root cause was missing .exe extension
* upgrade to tf 2.3.1
* fix hard-coded version
* remove uwp work-in-progress code so that PR can be merged
* update README and print out usage info in portfile
* Update ports/tensorflow-cc/README-linux
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/README-linux
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/README-linux
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/README-linux
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/README-linux
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/README-windows
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/portfile.cmake
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/portfile.cmake
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/portfile.cmake
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/portfile.cmake
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/portfile.cmake
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* improve usage hints as discussed in review
* add comment
* apply changes from review
* make additional compiler / linker args space-proof
* Update ports/tensorflow-cc/README-macos
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/tensorflow-cc-config-shared.cmake.in
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/tensorflow-cc-config-shared.cmake.in
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/README-linux
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/README-macos
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* apply changes from code review
* maybe fix the config files
* rob.maynard CRs
* fix windows static lib naming for first part
* Update ports/tensorflow-cc/generate_static_link_cmd_windows.py
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* apply rob maynards 1st suggestion
* nicole CRs
* format/fix-compile
* fix missing string termination
* prefer IMPORTED_LOCATION over IMPORTED_LOCATION_RELEASE to have default fall-back
* hopefully fix the issue where no libraries are generated
* final stuff
Co-authored-by: Gehweiler <Joachim_Gehweiler@McAfee.com>
Co-authored-by: wangli28 <wangli28@beyondsoft.com>
Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
Co-authored-by: Joachim Gehweiler <joachim@Joachims-iMac.local>
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
2020-11-12 19:15:48 +01:00
set ( HASH e2d792f0fc03a4a57a4c2c8345141d86a2dc25a09757f26cb18534426f73d10b4de021e2a3d439956a92d2a712aae9ad75357db24d02f9b0890cc643615a997c )
2019-08-20 12:13:26 -07:00
else ( )
2020-08-25 18:41:56 -07:00
set ( SUBDIR ${ BAZEL_VERSION } -windows )
set ( URL "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${SUBDIR}-x86_64.zip" )
set ( ARCHIVE "bazel-${SUBDIR}-x86_64.zip" )
[tensorflow-cc] More or less completely rewritten port, update to 2.3.1 (#13028)
* fix build issues occurring from default bazel config being used because customized bazel config is stored in wrong directory
* [tensorflow-cc] Update CONTROL and ci.baseline.txt
* fix also applies to windows static build
* fix debug and static builds as well as library naming for non-linux
- add patch to fix debug builds
- add patch to fix exports for static linking
- really build debug (instead of cloning release)
- override bazel build options for debug (work around bazel bug)
- bazel doesn't support static libraries: work around by building dynamic library and constructing static linkage commands from build log
- Windows .pdb file can't be >4GB even on x64: work around using reduced debug information
- Windows doesn't support .lib files >4GB even on x64, so split into multiple libs
- vcpkg requires equal amount of libs for debug and release: work around using handcrafted empty dummy libs
- fix naming of libs (.dll on Windows and .dylib on macOS)
* upgrade tensorflow from v1.14 to v2.3
- adapt patch files to tensorflow code changes
- update bazel from v0.25.2 to v3.1
- on Windows use python installed on the host instead of embedded python obtained via vcpkg because embedded python lacks pip, which we need to obtain numpy
- on Windows add MSYS2 to the PATH so that bazel tools can access MSYS2 GIT
- add support for custom CA certificates when using HTTPS_PROXY
* fix execute process macro
The existing implementation totally screwed up commands if the command's arguments contained semicolons (this is the case, e.g., in the FindPython modules of the cmake distribution).
* extend overriden execute_process to more than one COMMAND as there actually are use cases for this
* added another patch required for tensorflow v2.3, fixed path and working directory
* Revert "incorporate changes from microsoft:master"
* Revert "Revert "incorporate changes from microsoft:master""
* final fixes for static build + improving out messages
* enabling linux and osx in CI to see if it works now
* simplified code, fixed version numbers, fixed generated include cmake file
* fix failing postbuild check on handcrafted empty dummy library by spreading the last real libraries contents over the required number of libraries
* remove dead code commit by mistake again
* improvements from code review
* cleaner fix for debug code
* find pip3 in PATH (PYTHON3_DIR apparently not valid for pip3)
* fix error in python helper script
* fix wrong libname in postbuild script
* fix python detection + switch to python on msys2 (instead of embedded python) for Windows as we need numpy
* fix order of arguments
* fix command (it may contain spaces such as C:\Program Files\...)
* revert last commit (root cause for CI failures is something different: there are line breaks in path)
* fix regex comparision
(value needs to be escaped as it may contains regex special characters such as brackets, eg C:/Program Files (x86)/...)
* fix linebreaks in generated file
* fix CRT linkage
(macOS doesn't support static CRT linkage; it's set to dynamic even static target triplets for macOS and linux)
* refactor implemenation to avoid as much code duplication as possible -- algorithmically identical
* fix version numbers in helper scripts
* enable work-around for Windows until bazel fix is available
* install missing python3-pip on linux
* fix linux build by patching
* apply timeout feature now available via merged master branch
* correct linux build patch
* improve debug build patches
(no functional difference because LOG(FATAL, ...) macro internally anyway calls abort(), which the compiler doesn't detect in debug mode...
* improve linux patch
* temporarily add debug to inspect what's going on on macOS CI
* remove temporary debug code and fix static linking scripts for linux and macOS
* fix regex escaping
* fix ambiguous match while grepping for the framework link command
* extend fix of ambiguous match while grepping for the framework link command
* fix what merge of master broke
* fix more what got broken by merging master
(all packages and their dependencies are now maintained manually instead of using pacman...)
* remove "unofficial" from filename
* added switch do distinct classic and manifest mode when generating config.cmake file
* create symlinks for libraries without version number
* fix linux postbuild script
* temporarily disable code making problems
* add note for linking on Linux and macOS
* forget to add README file in previous commit
* add file forgotton in macro fixing patch
* fix python library path
* fix macOS static link command
* update linkage instructions in README
* Update ports/tensorflow-cc/CONTROL
* Update ports/tensorflow-cc/portfile.cmake
* Update scripts/ci.baseline.txt
* use vcpkg_execute_required_process
* pass C_FLAGS and CXX_FLAGS to bazel
* fix INTERFACE_INCLUDE_DIRECTORIES
* fix optional c/cxx arguments
* also add linker opts
* update README
* merge static libs into one
to support force_load (cannot force_load both due to duplicate symbols)
* update README
* quote python path (it might contain spaces that don't get escaped inside outer quotes of bash command)
* fix python path also for static build
* add arm(64) as currently unsupported arch
* bazel 3.7 is available -> remove workaround
* update README, remove necessary c-ares from deps
* update msys package
* add uwp specific options, and minor general improvements
* fix string replace
* fix control file and windows path separator
* revert backslashes-fix -- the root cause was missing .exe extension
* upgrade to tf 2.3.1
* fix hard-coded version
* remove uwp work-in-progress code so that PR can be merged
* update README and print out usage info in portfile
* Update ports/tensorflow-cc/README-linux
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/README-linux
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/README-linux
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/README-linux
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/README-linux
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/README-windows
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/portfile.cmake
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/portfile.cmake
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/portfile.cmake
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/portfile.cmake
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/portfile.cmake
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* improve usage hints as discussed in review
* add comment
* apply changes from review
* make additional compiler / linker args space-proof
* Update ports/tensorflow-cc/README-macos
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/tensorflow-cc-config-shared.cmake.in
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/tensorflow-cc-config-shared.cmake.in
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/README-linux
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* Update ports/tensorflow-cc/README-macos
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* apply changes from code review
* maybe fix the config files
* rob.maynard CRs
* fix windows static lib naming for first part
* Update ports/tensorflow-cc/generate_static_link_cmd_windows.py
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* apply rob maynards 1st suggestion
* nicole CRs
* format/fix-compile
* fix missing string termination
* prefer IMPORTED_LOCATION over IMPORTED_LOCATION_RELEASE to have default fall-back
* hopefully fix the issue where no libraries are generated
* final stuff
Co-authored-by: Gehweiler <Joachim_Gehweiler@McAfee.com>
Co-authored-by: wangli28 <wangli28@beyondsoft.com>
Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
Co-authored-by: Joachim Gehweiler <joachim@Joachims-iMac.local>
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
2020-11-12 19:15:48 +01:00
set ( HASH 410b6788f624b3b0b9f13f5b4d12c1b24447f133210a68e2f110aff8d95bb954e40ea1d863a8cc3473402d1c2f15c38042e6af0cb207056811e4cc7bd0b9ca00 )
2019-08-20 12:13:26 -07:00
endif ( )
2018-03-07 17:57:16 +08:00
elseif ( VAR MATCHES "ARIA2" )
set ( PROGNAME aria2c )
2020-08-25 18:41:56 -07:00
set ( ARIA2_VERSION 1.34.0 )
set ( PATHS ${ DOWNLOADS } /tools/aria2c/aria2- ${ ARIA2_VERSION } -win-32bit-build1 )
set ( URL "https://github.com/aria2/aria2/releases/download/release-${ARIA2_VERSION}/aria2-${ARIA2_VERSION}-win-32bit-build1.zip" )
set ( ARCHIVE "aria2-${ARIA2_VERSION}-win-32bit-build1.zip" )
2019-07-01 15:31:17 -05:00
set ( HASH 2a5480d503ac6e8203040c7e516a3395028520da05d0ebf3a2d56d5d24ba5d17630e8f318dd4e3cc2094cc4668b90108fb58e8b986b1ffebd429995058063c27 )
2020-08-18 12:16:39 -07:00
elseif ( VAR MATCHES "PKGCONFIG" )
set ( PROGNAME pkg-config )
if ( ENV{PKG_CONFIG} )
debug_message ( STATUS "PKG_CONFIG found in ENV! Using $ENV{PKG_CONFIG}" )
set ( PKGCONFIG $ENV{ PKG_CONFIG } PARENT_SCOPE )
return ( )
2020-11-23 18:43:23 +01:00
elseif ( CMAKE_HOST_SYSTEM_NAME STREQUAL "OpenBSD" )
# As of 6.8, the OpenBSD specific pkg-config doesn't support {pcfiledir}
set ( _vfa_SUPPORTED ON )
set ( _vfa_RENAME "pkg-config" )
set ( PKGCONFIG_VERSION 0.29.2.1 )
set ( NOEXTRACT ON )
set ( ARCHIVE "pkg-config.openbsd" )
set ( SUBDIR "openbsd" )
set ( URL "https://raw.githubusercontent.com/jgilje/pkg-config-openbsd/master/pkg-config" )
set ( HASH b7ec9017b445e00ae1377e36e774cf3f5194ab262595840b449832707d11e443a102675f66d8b7e8b2e2f28cebd6e256835507b1e0c69644cc9febab8285080b )
set ( VERSION_CMD --version )
2020-08-18 12:16:39 -07:00
elseif ( CMAKE_HOST_WIN32 )
if ( NOT EXISTS "${PKGCONFIG}" )
2020-10-05 17:39:47 -07:00
set ( VERSION 0.29.2-1 )
set ( LIBWINPTHREAD_VERSION git-8.0.0.5906.c9a21571-1 )
vcpkg_acquire_msys (
P K G C O N F I G _ R O O T
N O _ D E F A U L T _ P A C K A G E S
D I R E C T _ P A C K A G E S
" h t t p s : / / r e p o . m s y s 2 . o r g / m i n g w / i 6 8 6 / m i n g w - w 6 4 - i 6 8 6 - p k g - c o n f i g - $ { V E R S I O N } - a n y . p k g . t a r . x z "
3 b 1 b 7 0 6 a 2 4 d 9 a e f 7 b b d f 3 c e 4 4 2 7 a a a 8 1 3 b a 6 f b d 2 9 2 e d 9 d d a 1 8 1 b 4 3 0 0 e 1 1 7 c 3 d 5 9 a 1 5 9 d d c c a 8 b 0 1 3 f d 0 1 c e 7 6 d a 2 d 9 5 d 5 9 0 3 1 4 f f 9 6 2 8 c 0 d 6 8 a 6 9 6 6 b a c 4 8 4 2 5 4 0 f 0
" h t t p s : / / r e p o . m s y s 2 . o r g / m i n g w / i 6 8 6 / m i n g w - w 6 4 - i 6 8 6 - l i b w i n p t h r e a d - $ { L I B W I N P T H R E A D _ V E R S I O N } - a n y . p k g . t a r . z s t "
2 c 3 d 9 e 6 b 2 e e e 6 a 4 c 1 6 f d 6 9 d d f a d b 6 e 2 d c 7 f 3 1 1 5 6 6 2 7 d 8 5 8 4 5 c 5 2 3 a c 8 5 e 5 c 5 8 5 d 4 c f a 9 7 8 6 5 9 b 1 f e 2 e c 8 2 3 d 4 4 e f 5 7 b c 2 b 9 2 a 6 1 2 7 6 1 8 f f 1 a 8 d 7 5 0 5 4 5 8 b 7 9 4 f 3 f 0 1 c
2020-08-18 12:16:39 -07:00
)
endif ( )
2020-10-05 17:39:47 -07:00
set ( ${ VAR } "${PKGCONFIG_ROOT}/mingw32/bin/pkg-config.exe" PARENT_SCOPE )
2020-08-18 12:16:39 -07:00
return ( )
else ( )
set ( BREW_PACKAGE_NAME pkg-config )
set ( APT_PACKAGE_NAME pkg-config )
set ( PATHS "/bin" "/usr/bin" "/usr/local/bin" )
endif ( )
2016-09-18 20:50:08 -07:00
else ( )
message ( FATAL "unknown tool ${VAR} -- unable to acquire." )
endif ( )
2020-08-16 21:07:17 +02:00
macro ( do_version_check )
if ( VERSION_CMD )
2020-12-01 13:37:26 -08:00
vcpkg_execute_in_download_mode (
2020-08-16 21:07:17 +02:00
C O M M A N D $ { $ { V A R } } $ { V E R S I O N _ C M D }
W O R K I N G _ D I R E C T O R Y $ { D O W N L O A D S }
O U T P U T _ V A R I A B L E $ { V A R } _ V E R S I O N _ O U T P U T
)
string ( STRIP "${${VAR}_VERSION_OUTPUT}" ${ VAR } _VERSION_OUTPUT )
#TODO: REGEX MATCH case for more complex cases!
if ( NOT ${ VAR } _VERSION_OUTPUT VERSION_GREATER_EQUAL ${ VAR } _VERSION )
message ( STATUS "Found ${PROGNAME}('${${VAR}_VERSION_OUTPUT}') but at least version ${${VAR}_VERSION} is required! Trying to use internal version if possible!" )
set ( ${ VAR } "${VAR}-NOTFOUND" CACHE INTERNAL "" )
else ( )
message ( STATUS "Found external ${PROGNAME}('${${VAR}_VERSION_OUTPUT}')." )
endif ( )
endif ( )
endmacro ( )
2017-02-09 18:13:52 +01:00
macro ( do_find )
if ( NOT DEFINED REQUIRED_INTERPRETER )
2020-05-06 22:52:51 +02:00
find_program ( ${ VAR } ${ PROGNAME } PATHS ${ PATHS } NO_DEFAULT_PATH )
2020-08-16 21:07:17 +02:00
if ( NOT ${ VAR } )
find_program ( ${ VAR } ${ PROGNAME } )
if ( ${ VAR } AND NOT ${ VAR } _VERSION_CHECKED )
do_version_check ( )
set ( ${ VAR } _VERSION_CHECKED ON )
elseif ( ${ VAR } _VERSION_CHECKED )
message ( FATAL_ERROR "Unable to find ${PROGNAME} with min version of ${${VAR}_VERSION}" )
endif ( )
endif ( )
2017-02-09 18:13:52 +01:00
else ( )
vcpkg_find_acquire_program ( ${ REQUIRED_INTERPRETER } )
2020-08-17 16:25:05 +02:00
find_file ( SCRIPT_ ${ VAR } NAMES ${ SCRIPTNAME } PATHS ${ PATHS } NO_DEFAULT_PATH )
if ( NOT SCRIPT_ ${ VAR } )
find_file ( SCRIPT_ ${ VAR } NAMES ${ SCRIPTNAME } )
if ( SCRIPT_ ${ VAR } AND NOT ${ VAR } _VERSION_CHECKED )
set ( ${ VAR } ${ ${REQUIRED_INTERPRETER } } ${ SCRIPT_${VAR } } )
do_version_check ( )
set ( ${ VAR } _VERSION_CHECKED ON )
if ( NOT ${ VAR } )
unset ( SCRIPT_ ${ VAR } CACHE )
endif ( )
elseif ( ${ VAR } _VERSION_CHECKED )
message ( FATAL_ERROR "Unable to find ${PROGNAME} with min version of ${${VAR}_VERSION}" )
endif ( )
endif ( )
if ( SCRIPT_ ${ VAR } )
set ( ${ VAR } ${ ${REQUIRED_INTERPRETER } } ${ SCRIPT_${VAR } } )
endif ( )
2017-02-09 18:13:52 +01:00
endif ( )
endmacro ( )
2020-08-25 18:41:56 -07:00
if ( NOT DEFINED PROG_PATH_SUBDIR )
set ( PROG_PATH_SUBDIR "${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}" )
endif ( )
if ( DEFINED SUBDIR )
list ( APPEND PATHS ${ PROG_PATH_SUBDIR } )
endif ( )
2017-02-09 18:13:52 +01:00
do_find ( )
2020-08-17 16:25:05 +02:00
if ( NOT ${ VAR } )
2019-08-20 12:13:26 -07:00
if ( NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows" AND NOT _vfa_SUPPORTED )
2018-03-06 10:07:39 -08:00
set ( EXAMPLE "." )
if ( DEFINED BREW_PACKAGE_NAME AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin" )
set ( EXAMPLE ":\n brew install ${BREW_PACKAGE_NAME}" )
elseif ( DEFINED APT_PACKAGE_NAME AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" )
set ( EXAMPLE ":\n sudo apt-get install ${APT_PACKAGE_NAME}" )
endif ( )
message ( FATAL_ERROR "Could not find ${PROGNAME}. Please install it via your package manager${EXAMPLE}" )
endif ( )
2020-07-13 13:43:39 -07:00
if ( DEFINED SOURCEFORGE_ARGS )
# Locally change editable to suppress re-extraction each time
set ( _VCPKG_EDITABLE 1 )
vcpkg_from_sourceforge ( OUT_SOURCE_PATH SFPATH ${ SOURCEFORGE_ARGS } )
unset ( _VCPKG_EDITABLE )
2016-09-18 20:50:08 -07:00
else ( )
2020-07-13 13:43:39 -07:00
vcpkg_download_distfile ( ARCHIVE_PATH
U R L S $ { U R L }
S H A 5 1 2 $ { H A S H }
F I L E N A M E $ { A R C H I V E }
)
file ( MAKE_DIRECTORY ${ PROG_PATH_SUBDIR } )
if ( DEFINED NOEXTRACT )
if ( DEFINED _vfa_RENAME )
file ( INSTALL ${ ARCHIVE_PATH } DESTINATION ${ PROG_PATH_SUBDIR } RENAME ${ _vfa_RENAME } FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE )
else ( )
file ( COPY ${ ARCHIVE_PATH } DESTINATION ${ PROG_PATH_SUBDIR } FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE )
endif ( )
2017-01-11 11:37:19 +01:00
else ( )
2020-07-13 13:43:39 -07:00
get_filename_component ( ARCHIVE_EXTENSION ${ ARCHIVE } LAST_EXT )
string ( TOLOWER "${ARCHIVE_EXTENSION}" ARCHIVE_EXTENSION )
if ( ARCHIVE_EXTENSION STREQUAL ".msi" )
file ( TO_NATIVE_PATH "${ARCHIVE_PATH}" ARCHIVE_NATIVE_PATH )
file ( TO_NATIVE_PATH "${PROG_PATH_SUBDIR}" DESTINATION_NATIVE_PATH )
2020-09-09 19:36:58 +02:00
vcpkg_execute_in_download_mode (
2020-07-13 13:43:39 -07:00
C O M M A N D m s i e x e c / a $ { A R C H I V E _ N A T I V E _ P A T H } / q n T A R G E T D I R = $ { D E S T I N A T I O N _ N A T I V E _ P A T H }
W O R K I N G _ D I R E C T O R Y $ { D O W N L O A D S }
)
elseif ( "${ARCHIVE_PATH}" MATCHES ".7z.exe$" )
vcpkg_find_acquire_program ( 7Z )
2020-09-09 19:36:58 +02:00
vcpkg_execute_in_download_mode (
2020-07-13 13:43:39 -07:00
C O M M A N D $ { 7 Z } x " $ { A R C H I V E _ P A T H } " " - o $ { P R O G _ P A T H _ S U B D I R } " - y - b s o 0 - b s p 0
W O R K I N G _ D I R E C T O R Y $ { P R O G _ P A T H _ S U B D I R }
)
else ( )
2020-09-09 19:36:58 +02:00
vcpkg_execute_in_download_mode (
2020-07-13 13:43:39 -07:00
C O M M A N D $ { C M A K E _ C O M M A N D } - E t a r x z f $ { A R C H I V E _ P A T H }
W O R K I N G _ D I R E C T O R Y $ { P R O G _ P A T H _ S U B D I R }
)
endif ( )
2017-01-11 11:37:19 +01:00
endif ( )
2016-09-18 20:50:08 -07:00
endif ( )
2019-07-02 22:47:50 +02:00
if ( DEFINED POST_INSTALL_COMMAND )
vcpkg_execute_required_process (
2019-08-28 13:49:29 -07:00
A L L O W _ I N _ D O W N L O A D _ M O D E
2019-07-02 22:47:50 +02:00
C O M M A N D $ { P O S T _ I N S T A L L _ C O M M A N D }
W O R K I N G _ D I R E C T O R Y $ { P R O G _ P A T H _ S U B D I R }
L O G N A M E $ { V A R } - t o o l - p o s t - i n s t a l l
)
endif ( )
2020-08-16 21:07:17 +02:00
unset ( ${ VAR } CACHE )
2017-02-09 18:13:52 +01:00
do_find ( )
2020-08-16 21:07:17 +02:00
if ( NOT ${ VAR } )
message ( FATAL_ERROR "Unable to find ${VAR}" )
endif ( )
2016-09-18 20:50:08 -07:00
endif ( )
2017-10-12 11:54:47 -07:00
set ( ${ VAR } "${${VAR}}" PARENT_SCOPE )
2016-09-18 20:50:08 -07:00
endfunction ( )