Skip to content

Commit

Permalink
build(conan): update version
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerixyz committed Dec 24, 2024
1 parent fae3e7a commit 317c37e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ env:
C2_ENABLE_LTO: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/bugfix-release/') || startsWith(github.ref, 'refs/heads/release/') }}
CHATTERINO_REQUIRE_CLEAN_GIT: On
C2_BUILD_WITH_QT6: Off
# Last known good conan version
# 2.0.3 has a bug on Windows (conan-io/conan#13606)
CONAN_VERSION: 2.0.2
CONAN_VERSION: 2.11.0

jobs:
build-ubuntu-docker:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ env:
TWITCH_PUBSUB_SERVER_TAG: v1.0.7
HTTPBOX_TAG: v0.2.1
QT_QPA_PLATFORM: minimal
# Last known good conan version
# 2.0.3 has a bug on Windows (conan-io/conan#13606)
CONAN_VERSION: 2.0.2
CONAN_VERSION: 2.11.0

concurrency:
group: test-windows-${{ github.ref }}
Expand Down
20 changes: 16 additions & 4 deletions conanfile.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
from conan import ConanFile
from conan.tools.files import copy
from conan.tools.cmake import CMakeToolchain
from os import path


class Chatterino(ConanFile):
name = "Chatterino"
requires = "boost/1.83.0"
requires = "boost/1.86.0"
settings = "os", "compiler", "build_type", "arch"
default_options = {
"with_benchmark": False,
Expand All @@ -18,18 +19,29 @@ class Chatterino(ConanFile):
# Qt is built with OpenSSL 3 from version 6.5.0 onwards
"with_openssl3": [True, False],
}
generators = "CMakeDeps", "CMakeToolchain"
generators = "CMakeDeps"

def requirements(self):
if self.options.get_safe("with_benchmark", False):
self.requires("benchmark/1.7.1")
self.requires("benchmark/1.9.0")

if self.options.get_safe("with_openssl3", False):
self.requires("openssl/3.2.0")
self.requires("openssl/3.3.2")
else:
self.requires("openssl/1.1.1t")

def generate(self):
tc = CMakeToolchain(self)
tc.blocks.remove("compilers")
tc.blocks.remove("cmake_flags_init")
tc.blocks.remove("cppstd")
tc.blocks.remove("libcxx")
tc.blocks.remove("generic_system")
tc.blocks.remove("user_toolchain")
tc.blocks.remove("output_dirs")
tc.blocks.remove("apple_system")
tc.generate()

def copy_bin(dep, selector, subdir):
src = path.realpath(dep.cpp_info.bindirs[0])
dst = path.realpath(path.join(self.build_folder, subdir))
Expand Down

0 comments on commit 317c37e

Please sign in to comment.