forked from kolrabi/steamcontroller
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathconanfile.py
More file actions
48 lines (39 loc) · 1.56 KB
/
conanfile.py
File metadata and controls
48 lines (39 loc) · 1.56 KB
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
36
37
38
39
40
41
42
43
44
45
46
from conan import ConanFile
from conan.tools.cmake import CMake, cmake_layout
class SteamControllerConan(ConanFile):
name = "steam_controller"
version = "1.1"
license = "MIT"
author = "Marius Elvert marius.elvert@googlemail.com"
url = "https://github.com/ltjax/steam_controller"
description = "Access the Steam Controller without Steam"
topics = ("hardware", "gamepad")
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False], "fPIC": [True, False]}
default_options = {"shared": False, "fPIC": True}
generators = "CMakeDeps", "CMakeToolchain"
exports_sources = "source/*", "externals/*",\
"!externals/hidapi/LICENSE-*.txt",\
"include/*", "CMakeLists.txt",\
"demo/*"
def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
def package(self):
cmake = CMake(self)
cmake.install()
def layout(self):
cmake_layout(self)
def package_info(self):
self.cpp_info.libs = ["steam_controller"]
if self.settings.os == "Windows":
self.cpp_info.system_libs.append("Setupapi")
if self.settings.os == "Linux":
self.cpp_info.system_libs.append("udev")
if self.settings.os == "Macos":
self.cpp_info.exelinkflags.append("-framework CoreFoundation")
self.cpp_info.exelinkflags.append("-framework IOKit")