Define custom conan profile.
This commit is contained in:
parent
ce0abdeb21
commit
03603ff7f5
51
appveyor.yml
51
appveyor.yml
|
@ -346,39 +346,53 @@ for:
|
||||||
- dir "C:\Qt\Tools"
|
- dir "C:\Qt\Tools"
|
||||||
- conan config home
|
- conan config home
|
||||||
- type %HOMEPATH%\.conan2\settings.yml
|
- type %HOMEPATH%\.conan2\settings.yml
|
||||||
- conan profile new valentina
|
- conan profile detect --name valentina
|
||||||
- ps: |
|
- ps: |
|
||||||
|
if ($env:ARCH -eq "x64") {
|
||||||
|
$arch="arch=x86_64"
|
||||||
|
} else {
|
||||||
|
$arch="arch=x86"
|
||||||
|
}
|
||||||
|
|
||||||
if ($env:COMPILER -eq "msvc")
|
if ($env:COMPILER -eq "msvc")
|
||||||
{
|
{
|
||||||
& qbs-setup-toolchains.exe --type msvc $env:MSVC_PATH\cl.exe $env:COMPILER
|
& qbs-setup-toolchains.exe --type msvc $env:MSVC_PATH\cl.exe $env:COMPILER
|
||||||
& qbs-config.exe profiles.qt6.baseProfile $env:COMPILER
|
& qbs-config.exe profiles.qt6.baseProfile $env:COMPILER
|
||||||
& conan profile update settings.compiler=msvc valentina
|
|
||||||
& conan profile update settings.compiler.cppstd=17 valentina
|
$profile = @"
|
||||||
& conan profile update settings.compiler.version=192 valentina
|
[settings]
|
||||||
& conan profile update settings.compiler.runtime=static valentina
|
build_type=Release
|
||||||
& conan profile update settings.compiler.runtime_type=Release valentina
|
compiler=msvc
|
||||||
|
compiler.runtime_type=Release
|
||||||
|
compiler.version=192
|
||||||
|
os=Windows
|
||||||
|
$arch
|
||||||
|
"@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
& qbs-setup-toolchains.exe --type mingw $env:MINGW_PATH\g++.exe $env:COMPILER
|
& qbs-setup-toolchains.exe --type mingw $env:MINGW_PATH\g++.exe $env:COMPILER
|
||||||
& qbs-config.exe profiles.qt6.baseProfile $env:COMPILER
|
& qbs-config.exe profiles.qt6.baseProfile $env:COMPILER
|
||||||
& conan profile update settings.compiler=gcc valentina
|
|
||||||
& conan profile update settings.compiler.cppstd=gnu17 valentina
|
$profile = @"
|
||||||
& conan profile update settings.compiler.libcxx=libstdc++11 valentina
|
[settings]
|
||||||
& conan profile update settings.compiler.version=$env:GCC_VERSION valentina
|
build_type=Release
|
||||||
|
compiler=gcc
|
||||||
|
compiler.cppstd=gnu17
|
||||||
|
compiler.libcxx=libstdc++11
|
||||||
|
compiler.version=$env:GCC_VERSION
|
||||||
|
os=Windows
|
||||||
|
$arch
|
||||||
|
"@
|
||||||
}
|
}
|
||||||
if ($env:ARCH -eq "x64") {
|
|
||||||
& conan profile update settings.arch=x86_64 valentina
|
$profile | Out-File -FilePath "$env:HOMEPATH\.conan2\profiles\valentina"
|
||||||
} else {
|
|
||||||
& conan profile update settings.arch=x86 valentina
|
|
||||||
}
|
|
||||||
- conan profile update settings.os=Windows valentina
|
|
||||||
- conan profile update settings.build_type=Release valentina
|
|
||||||
- qbs-config --list profiles
|
- qbs-config --list profiles
|
||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- conan install . -s os=Windows --build=xerces-c/3.2.4
|
- conan install . -s os=Windows --build=xerces-c/3.2.4
|
||||||
- qbs build -f valentina.qbs -d %APPVEYOR_BUILD_FOLDER%\build --command-echo-mode command-line config:release qbs.installRoot:%APPVEYOR_BUILD_FOLDER%\build\install-root\valentina profile:qt6 project.enableConan:true modules.buildconfig.enableCcache:false
|
- qbs build -f valentina.qbs -d %APPVEYOR_BUILD_FOLDER%\build --command-echo-mode command-line config:release qbs.installRoot:%APPVEYOR_BUILD_FOLDER%\build\install-root\valentina profile:qt6 project.enableConan:true modules.buildconfig.enableCcache:false project.conanProfiles:[valentina]
|
||||||
|
|
||||||
test_script:
|
test_script:
|
||||||
- qbs -p autotest-runner -d %APPVEYOR_BUILD_FOLDER%\build profile:qt6 config:release
|
- qbs -p autotest-runner -d %APPVEYOR_BUILD_FOLDER%\build profile:qt6 config:release
|
||||||
|
@ -497,6 +511,7 @@ for:
|
||||||
- sudo xcode-select -p
|
- sudo xcode-select -p
|
||||||
- brew update > /dev/null
|
- brew update > /dev/null
|
||||||
- rm '/usr/local/bin/ccmake'
|
- rm '/usr/local/bin/ccmake'
|
||||||
|
- rm '/usr/local/bin/cmake'
|
||||||
- brew install --force coreutils qbs cmake
|
- brew install --force coreutils qbs cmake
|
||||||
- |
|
- |
|
||||||
if [[ "$ENABLE_CONAN" == "true" ]]; then
|
if [[ "$ENABLE_CONAN" == "true" ]]; then
|
||||||
|
|
|
@ -45,6 +45,7 @@ Probe {
|
||||||
property var options
|
property var options
|
||||||
property var settings
|
property var settings
|
||||||
property bool verbose: false
|
property bool verbose: false
|
||||||
|
property stringList profiles: []
|
||||||
|
|
||||||
// Output
|
// Output
|
||||||
property var dependencies
|
property var dependencies
|
||||||
|
@ -105,6 +106,10 @@ Probe {
|
||||||
for (var i = 0; i < additionalArguments.length; i++)
|
for (var i = 0; i < additionalArguments.length; i++)
|
||||||
args.push(additionalArguments[i]);
|
args.push(additionalArguments[i]);
|
||||||
|
|
||||||
|
for (var i = 0; i < profiles.length; i++) {
|
||||||
|
args = args.concat(["-pr", profiles[i]]);
|
||||||
|
}
|
||||||
|
|
||||||
generatedFilesPath = FileInfo.cleanPath(_projectBuildDirectory +
|
generatedFilesPath = FileInfo.cleanPath(_projectBuildDirectory +
|
||||||
"/genconan/" +
|
"/genconan/" +
|
||||||
Utilities.getHash(args.join()));
|
Utilities.getHash(args.join()));
|
||||||
|
|
|
@ -6,6 +6,7 @@ Project {
|
||||||
|
|
||||||
property bool enableConan: false
|
property bool enableConan: false
|
||||||
property string minimumMacosVersion: undefined
|
property string minimumMacosVersion: undefined
|
||||||
|
property stringList conanProfiles: []
|
||||||
|
|
||||||
// Temporary probe until qbs doesn't support conan 2.0
|
// Temporary probe until qbs doesn't support conan 2.0
|
||||||
ConanfileProbe {
|
ConanfileProbe {
|
||||||
|
@ -13,6 +14,7 @@ Project {
|
||||||
condition: enableConan
|
condition: enableConan
|
||||||
conanfilePath: project.sourceDirectory + "/conanfile.py"
|
conanfilePath: project.sourceDirectory + "/conanfile.py"
|
||||||
verbose: true
|
verbose: true
|
||||||
|
profiles: conanProfiles
|
||||||
}
|
}
|
||||||
|
|
||||||
references: [
|
references: [
|
||||||
|
|
Loading…
Reference in New Issue
Block a user