summaryrefslogtreecommitdiff
path: root/conanfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'conanfile.py')
-rw-r--r--conanfile.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/conanfile.py b/conanfile.py
new file mode 100644
index 00000000..2beee180
--- /dev/null
+++ b/conanfile.py
@@ -0,0 +1,33 @@
1# pylint: disable=not-callable
2from conans import CMake
3from conans import ConanFile
4
5
6class ToxConan(ConanFile):
7 settings = "os", "compiler", "build_type", "arch"
8 requires = "libsodium/1.0.18", "opus/1.3.1", "libvpx/1.8.0@bincrafters/stable"
9 generators = "cmake_find_package"
10
11 def requirements(self):
12 if self.settings.os == "Windows":
13 self.requires("pthreads4w/3.0.0")
14
15 def source(self):
16 self.run("git clone https://github.com/toktok/c-toxcore.git")
17
18 def build(self):
19 cmake = CMake(self)
20 cmake.definitions["AUTOTEST"] = True
21 cmake.definitions["BUILD_MISC_TESTS"] = True
22 cmake.definitions["MUST_BUILD_TOXAV"] = True
23 if self.settings.compiler == "Visual Studio":
24 cmake.definitions["MSVC_STATIC_SODIUM"] = True
25
26 if self.should_configure:
27 cmake.configure()
28
29 if self.should_build:
30 cmake.build()
31
32 if self.should_test:
33 cmake.test()