🔧 Added support for building discord-rpc with conan v2
This commit is contained in:
parent
bc5a94aa3d
commit
c33b6099f1
@ -1,4 +1,6 @@
|
|||||||
from conans import ConanFile, CMake, tools
|
from conan import ConanFile
|
||||||
|
from conan.tools.files import get, collect_libs
|
||||||
|
from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout
|
||||||
|
|
||||||
|
|
||||||
class DiscordrpcConan(ConanFile):
|
class DiscordrpcConan(ConanFile):
|
||||||
@ -9,12 +11,19 @@ class DiscordrpcConan(ConanFile):
|
|||||||
description = "This is a library for interfacing your game with a locally running Discord desktop client. It's known to work on Windows, macOS, and Linux."
|
description = "This is a library for interfacing your game with a locally running Discord desktop client. It's known to work on Windows, macOS, and Linux."
|
||||||
settings = "os", "compiler", "build_type", "arch"
|
settings = "os", "compiler", "build_type", "arch"
|
||||||
|
|
||||||
|
def layout(self):
|
||||||
|
cmake_layout(self)
|
||||||
|
|
||||||
def source(self):
|
def source(self):
|
||||||
tools.get(**self.conan_data["sources"][self.version], strip_root=True)
|
get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
||||||
|
|
||||||
|
def generate(self):
|
||||||
|
tc = CMakeToolchain(self)
|
||||||
|
tc.variables["BUILD_EXAMPLES"] = "OFF"
|
||||||
|
tc.generate()
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
cmake = CMake(self)
|
cmake = CMake(self)
|
||||||
cmake.definitions['BUILD_EXAMPLES'] = 'OFF'
|
|
||||||
cmake.configure()
|
cmake.configure()
|
||||||
cmake.build()
|
cmake.build()
|
||||||
|
|
||||||
@ -23,4 +32,4 @@ class DiscordrpcConan(ConanFile):
|
|||||||
cmake.install()
|
cmake.install()
|
||||||
|
|
||||||
def package_info(self):
|
def package_info(self):
|
||||||
self.cpp_info.libs = tools.collect_libs(self)
|
self.cpp_info.libs = collect_libs(self)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user