File: windows_build_debug.ps1

package info (click to toggle)
meshlab 2020.09%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 45,132 kB
  • sloc: cpp: 400,238; ansic: 31,952; javascript: 1,578; sh: 387; yacc: 238; lex: 139; python: 86; makefile: 30
file content (35 lines) | stat: -rw-r--r-- 978 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# This is a powershell script compiling meshlab in a Windows environment.
# Requires: 
# - MSVC installed;
# - Qt installed, and qmake and jom binaries directly accessible
#
# # Without given arguments, MeshLab will be built in the meshlab/src
# directory, and binaries will be placed in meshlab/distrib.
# 
# You can give as argument the BUILD_PATH, and meshlab binaries will be
# then placed inside BUILD_PATH/distrib.

#saving location where script has been run

write-host "N of arguments: $($args.count)"

$DIR = Get-Location
$INSTALL_PATH = $PSScriptRoot
$SOURCE_PATH = Join-Path $PSScriptRoot ..\..\src

if ($args.Count -gt 0){
    $BUILD_PATH = Resolve-Path -Path $args[0]
} else {
    $BUILD_PATH = $SOURCE_PATH #default build
} 

New-Item -ItemType Directory -Force -Path $BUILD_PATH
cd $BUILD_PATH

write-host "Build path is: $($BUILD_PATH)"

qmake $SOURCE_PATH\meshlab.pro CONFIG+=debug
jom -j4 #Qt nmake for parallel build

#going back to original location
cd $DIR