Skip to content

Commit

Permalink
add vcpkg-tool
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv committed Jul 9, 2021
1 parent 1e7e706 commit b3ac6e7
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 0 deletions.
22 changes: 22 additions & 0 deletions recipes/vcpkg-tool/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
setlocal EnableDelayedExpansion
setlocal enableextensions

MKDIR build
CD build

cmake .. ^
-G "Ninja" ^
-DCMAKE_BUILD_TYPE=Release ^
-DVCPKG_DEVELOPMENT_WARNINGS=OFF ^
%CMAKE_ARGS%

if errorlevel 1 exit 1

ninja
@rem ninja test

if errorlevel 1 exit 1

IF NOT EXIST %LIBRARY_PREFIX%\bin MKDIR %LIBRARY_PREFIX%\bin
COPY vcpkg.exe %LIBRARY_PREFIX%\bin\
if errorlevel 1 exit 1
16 changes: 16 additions & 0 deletions recipes/vcpkg-tool/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
mkdir build
cd build

export CXXFLAGS="${CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY"

cmake .. \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=Release \
-DVCPKG_DEVELOPMENT_WARNINGS=OFF \
${CMAKE_ARGS}

ninja
# ninja test

mkdir -p $PREFIX/bin/
mv vcpkg $PREFIX/bin/
43 changes: 43 additions & 0 deletions recipes/vcpkg-tool/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{% set name = "vcpkg-tool" %}
{% set version = "2021.06.29" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://github.com/microsoft/vcpkg-tool/archive/refs/tags/{{ version.replace('.', '-') }}.tar.gz
sha256: 5d86c81f07cd1f577f2c29808f1d2c9245ca28c746313dc5f33fac147a8372bd

build:
number: 0

requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- ninja
- cmake
run:
- ninja
- cmake
- curl
- git
- unzip # [unix]
- tar # [unix]
- 7zip # [win]

test:
commands:
- vcpkg --help || true # [unix]
- vcpkg.exe --help & exit 0 # [win]

about:
home: https://github.com/microsoft/vcpkg
license: MIT
license_file: LICENSE.txt
summary: C++ Library Manager for Windows, Linux, and MacOS

extra:
recipe-maintainers:
- wolfv
46 changes: 46 additions & 0 deletions recipes/vcpkg-tool/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
context:
name: vcpkg-tool
version: '2021.06.29'

package:
name: '{{ name|lower }}'
version: '{{ version }}'

source:
url: https://github.com/microsoft/vcpkg-tool/archive/refs/tags/{{ version.replace('.', '-') }}.tar.gz
sha256: 5d86c81f07cd1f577f2c29808f1d2c9245ca28c746313dc5f33fac147a8372bd

build:
number: 0

requirements:
build:
- '{{ compiler("c") }}'
- '{{ compiler("cxx") }}'
- ninja
- cmake
run:
- ninja
- cmake
- curl
- git
- sel(unix): unzip
- sel(unix): tar
- sel(win): 7zip

test:
commands:
- sel(unix): vcpkg --help || true
- sel(win): vcpkg.exe --help & exit 0
- sel(win): vcpkg.exe install nlohmann-json

about:
home: https://github.com/microsoft/vcpkg
license: MIT
license_file: LICENSE.txt
summary: https://github.com/microsoft/vcpkg

extra:
recipe-maintainers:
- wolfv

0 comments on commit b3ac6e7

Please sign in to comment.