From f56a5e4e94a1151bc09f073b3597ff3b40e9d4b8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 6 Mar 2018 10:07:39 -0800 Subject: [vcpkg] Improve defaults for other platforms --- scripts/cmake/vcpkg_find_acquire_program.cmake | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'scripts/cmake/vcpkg_find_acquire_program.cmake') diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index b24345021..21d7ecd8f 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -106,6 +106,8 @@ function(vcpkg_find_acquire_program VAR) set(PROGNAME ninja) set(SUBDIR "ninja-1.8.2") set(PATHS ${DOWNLOADS}/tools/ninja/${SUBDIR}) + set(BREW_PACKAGE_NAME "ninja") + set(APT_PACKAGE_NAME "ninja-build") set(URL "https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip") set(ARCHIVE "ninja-1.8.2-win.zip") set(HASH 9b9ce248240665fcd6404b989f3b3c27ed9682838225e6dc9b67b551774f251e4ff8a207504f941e7c811e7a8be1945e7bcb94472a335ef15e23a0200a32e6d5) @@ -181,6 +183,16 @@ function(vcpkg_find_acquire_program VAR) do_find() if("${${VAR}}" MATCHES "-NOTFOUND") + if(NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") + 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() + vcpkg_download_distfile(ARCHIVE_PATH URLS ${URL} SHA512 ${HASH} -- cgit v1.2.3 From 94360c2c65c6b38844ee75890d2be4632cdb4514 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 13 Mar 2018 11:35:19 -0700 Subject: [vcpkg-find-acquire-program] Handle PERL and NASM on non-windows --- scripts/cmake/vcpkg_find_acquire_program.cmake | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'scripts/cmake/vcpkg_find_acquire_program.cmake') diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 21d7ecd8f..083b86fc2 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -49,12 +49,16 @@ function(vcpkg_find_acquire_program VAR) if(VAR MATCHES "PERL") set(PROGNAME perl) set(PATHS ${DOWNLOADS}/tools/perl/perl/bin) + set(BREW_PACKAGE_NAME "perl") + set(APT_PACKAGE_NAME "perl") set(URL "http://strawberryperl.com/download/5.24.1.1/strawberry-perl-5.24.1.1-32bit-portable.zip") set(ARCHIVE "strawberry-perl-5.24.1.1-32bit-portable.zip") set(HASH a6e685ea24376f50db5f06c5b46075f1d3be25168fa1f27fa9b02e2ac017826cee62a2b43562f9b6c989337a231ba914416c110075457764de2d11f99d5e0f26) elseif(VAR MATCHES "NASM") set(PROGNAME nasm) set(PATHS ${DOWNLOADS}/tools/nasm/nasm-2.12.02) + set(BREW_PACKAGE_NAME "nasm") + set(APT_PACKAGE_NAME "nasm") set(URL "http://www.nasm.us/pub/nasm/releasebuilds/2.12.02/win32/nasm-2.12.02-win32.zip" "http://mirrors.kodi.tv/build-deps/win32/nasm-2.12.02-win32.zip" -- cgit v1.2.3