Skip to content

Instantly share code, notes, and snippets.

@polaco1782
Last active September 13, 2024 17:45
Show Gist options
  • Save polaco1782/607db84abc8cae9db52633ad1f890e60 to your computer and use it in GitHub Desktop.
Save polaco1782/607db84abc8cae9db52633ad1f890e60 to your computer and use it in GitHub Desktop.
Aravis library win64 building
# run commands using windows powershell, administrator
### install python, ninja, meson and pkg-config tool using chocolatey package manager
###
### ! MUST HAVE POWERSHELL ADMINISTRATOR PRIVILEGES TO WORK !
###
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install python311
choco install meson
choco install ninja
choco install pkgconfiglite
###
#
# From now on, using a normal user PowerShell.
#
# clone and install vcpkg in c:\vcpkg
# then compile dependencies using vcpkg
#
cd c:\
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg && .\bootstrap-vcpkg.bat
.\vcpkg install glib:x64-windows-release
.\vcpkg install libusb:x64-windows-release
# set vcpkg and pkg-config paths
#
$env:VCPKG_ROOT = "C:\vcpkg"
$env:PATH += ";$env:VCPKG_ROOT;$env:VCPKG_ROOT\installed\x64-windows-release\bin"
$env:PKG_CONFIG_PATH = "$env:VCPKG_ROOT\installed\x64-windows-release\lib\pkgconfig"
# compile and install aravis libraries, output files will be placed on 'dist' folder
#
meson setup builddir `-Dprefix="$(Join-Path $PWD 'dist')" --buildtype=release --backend=ninja -Ddocumentation=disabled -Dintrospection=disabled -Dgst-plugin=disabled -Dviewer=disabled -Dtests=false --vsenv
meson compile -C builddir
meson install -C builddir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment