Add npm, maven, conan configs (excluding cache)
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
#conan create . novoline/stable -pr release_120
|
||||
#conan create . novoline/stable -pr release_120 -o pkg-name:header_only=False
|
||||
|
||||
from conans import ConanFile, CMake, tools, MSBuild
|
||||
import yaml
|
||||
import os
|
||||
import glob
|
||||
|
||||
class {{package_name}}Conan(ConanFile):
|
||||
license = "© Copyright 2020 | Inspired Entertainment, Inc."
|
||||
url = f"https://bitbucket.ingg.com/projects/NOV/repos/{{name}}/browse"
|
||||
#description = "<Description of {{package_name}} here>"
|
||||
topics = ("plugin", "novoline")
|
||||
settings = "os", "compiler", "build_type", "arch"
|
||||
options = {"shared": [True],
|
||||
"header_only": [True, False]}
|
||||
default_options = {"shared": True,
|
||||
"header_only": True}
|
||||
generators = "visual_studio"
|
||||
scm = {
|
||||
"type": "git",
|
||||
"url": "auto",
|
||||
"revision": "auto",
|
||||
}
|
||||
|
||||
def requirements(self):
|
||||
self.requires("nl_sdk/1.0.0@novoline/stable")
|
||||
|
||||
def imports(self):
|
||||
self.copy("*")
|
||||
|
||||
def build(self):
|
||||
msbuild = MSBuild(self)
|
||||
msbuild.build(glob.glob("*.sln")[0])
|
||||
|
||||
def package_id(self):
|
||||
if self.options.header_only:
|
||||
print(f'{self.name}/{self.version} headeronly package')
|
||||
self.info.header_only()
|
||||
|
||||
def package(self):
|
||||
self.copy("*.dll", src=f"Out/{self.settings.build_type}", keep_path=False)
|
||||
|
||||
def set_version(self):
|
||||
self.version = "1.0.0"
|
||||
|
||||
def set_name(self):
|
||||
git = tools.Git(folder=self.recipe_folder)
|
||||
_remote_url = git.get_remote_url()
|
||||
self.name = os.path.splitext(os.path.basename(_remote_url))[0]
|
||||
|
||||
Reference in New Issue
Block a user