🎉 Added settings conan pkg

This commit is contained in:
Edgar 2021-02-12 14:15:23 +01:00 committed by Rasmus Karlsson
parent 2df55138f8
commit 6697ae78a6
7 changed files with 45 additions and 7 deletions

View file

@ -1,7 +1,7 @@
from conans import ConanFile, CMake, tools from conans import ConanFile, CMake, tools
class LibCommuniConan(ConanFile): class QtKeychainConan(ConanFile):
name = "QtKeychain" name = "QtKeychain"
version = "0.12.90" version = "0.12.90"
license = "MIT" license = "MIT"

View file

@ -1,7 +1,7 @@
from conans import ConanFile, CMake, tools from conans import ConanFile, CMake, tools
class LibCommuniConan(ConanFile): class SerializeConan(ConanFile):
name = "serialize" name = "serialize"
version = "0.1" version = "0.1"
license = "MIT" license = "MIT"
@ -18,7 +18,7 @@ class LibCommuniConan(ConanFile):
git.checkout("130ffc3ec722284ca454a1e70c5478a75f380144") git.checkout("130ffc3ec722284ca454a1e70c5478a75f380144")
def package(self): def package(self):
self.copy("include/*.hpp") self.copy("*.hpp", "include", "include")
def package_id(self): def package_id(self):
self.info.header_only() self.info.header_only()

View file

@ -0,0 +1,35 @@
from conans import ConanFile, CMake, tools
class SettingsConan(ConanFile):
name = "settings"
version = "0.1"
license = "MIT"
author = "Edgar Edgar@AnotherFoxGuy.com"
url = "https://github.com/Chatterino/chatterino2"
description = "pajlada's C++ Settings library"
settings = "os", "compiler", "build_type", "arch"
generators = "cmake"
def requirements(self):
self.requires.add('rapidjson/cci.20200410')
self.requires.add('boost/[1.x.x]')
def source(self):
git = tools.Git()
git.clone("https://github.com/AnotherFoxGuy/settings.git")
git.checkout("cmake-fix", "recursive")
def build(self):
cmake = CMake(self)
cmake.definitions['CONAN_EXPORTED'] = 'ON'
cmake.definitions['BUILD_TESTS'] = 'OFF'
cmake.configure()
cmake.build()
def package(self):
cmake = CMake(self)
cmake.install()
def package_info(self):
self.cpp_info.libs = tools.collect_libs(self)

View file

@ -1,7 +1,7 @@
from conans import ConanFile, CMake, tools from conans import ConanFile, CMake, tools
class LibCommuniConan(ConanFile): class SignalsConan(ConanFile):
name = "signals" name = "signals"
version = "0.1" version = "0.1"
license = "MIT" license = "MIT"
@ -17,7 +17,7 @@ class LibCommuniConan(ConanFile):
git.checkout("baf5bb04bd13b090e405e0447c89a811f7e23ddc") git.checkout("baf5bb04bd13b090e405e0447c89a811f7e23ddc")
def package(self): def package(self):
self.copy("include/*.hpp") self.copy("*.hpp", "include", "include")
def package_id(self): def package_id(self):
self.info.header_only() self.info.header_only()

View file

@ -1,7 +1,7 @@
from conans import ConanFile, CMake, tools from conans import ConanFile, CMake, tools
class LibCommuniConan(ConanFile): class WebSocketppConan(ConanFile):
name = "WebSocketpp" name = "WebSocketpp"
version = "0.8.1" version = "0.8.1"
license = "MIT" license = "MIT"

View file

@ -6,6 +6,8 @@ serialize/0.1@test/test
QtKeychain/0.12.90@test/test QtKeychain/0.12.90@test/test
signals/0.1@test/test signals/0.1@test/test
WebSocketpp/0.8.1@test/test WebSocketpp/0.8.1@test/test
rapidjson/cci.20200410
settings/0.1@test/test
[generators] [generators]
cmake cmake

View file

@ -26,6 +26,7 @@ target_link_libraries(${PROJECT_NAME}
Qt5::Concurrent Qt5::Concurrent
CONAN_PKG::boost CONAN_PKG::boost
CONAN_PKG::QtKeychain CONAN_PKG::QtKeychain
CONAN_PKG::rapidjson
CONAN_PKG::openssl CONAN_PKG::openssl
CONAN_PKG::communi CONAN_PKG::communi
CONAN_PKG::serialize CONAN_PKG::serialize