Compare commits
No commits in common. "f1c3a2dc1555240ec59e2d7dfd983dc0467d9a9c" and "ab4b1a82025ed85d2c26428ae51116968a097a41" have entirely different histories.
f1c3a2dc15
...
ab4b1a8202
2
.gitignore
vendored
2
.gitignore
vendored
@ -3,5 +3,3 @@ tmp/
|
|||||||
upload.*
|
upload.*
|
||||||
.idea/
|
.idea/
|
||||||
build_tmp.py
|
build_tmp.py
|
||||||
__pycache__
|
|
||||||
conanfile-old.py
|
|
@ -1,6 +1,6 @@
|
|||||||
from conan import ConanFile
|
from conans import ConanFile, tools
|
||||||
from conan.tools.files import get, collect_libs, copy
|
from conans.tools import os_info
|
||||||
import os
|
|
||||||
|
|
||||||
class GcConan(ConanFile):
|
class GcConan(ConanFile):
|
||||||
name = "cg-toolkit"
|
name = "cg-toolkit"
|
||||||
@ -9,26 +9,23 @@ class GcConan(ConanFile):
|
|||||||
settings = "os", "arch"
|
settings = "os", "arch"
|
||||||
|
|
||||||
def source(self):
|
def source(self):
|
||||||
get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
tools.get(**self.conan_data["sources"][self.version], strip_root=True)
|
||||||
|
|
||||||
def package(self):
|
def package(self):
|
||||||
copy(self, "*.h", os.path.join(self.source_folder, "include"), os.path.join(self.package_folder,"include"))
|
self.copy("*.h", src="include", dst="include")
|
||||||
if self.settings.os == "Windows":
|
if os_info.is_linux:
|
||||||
if '64' in self.settings.arch:
|
if self.settings.arch.__contains__('64'):
|
||||||
#copy(self, "*.h", self.source_folder, os.path.join(self.package_folder, "include"))
|
self.copy("*.so", src="lib64", dst="lib", keep_path=False)
|
||||||
copy(self, "*.lib", os.path.join(self.source_folder, "lib64"), os.path.join(self.package_folder,"lib"))
|
|
||||||
copy(self, "*.dll", os.path.join(self.source_folder, "bin64"), os.path.join(self.package_folder,"bin"))
|
|
||||||
else:
|
else:
|
||||||
copy(self, "*.lib", os.path.join(self.source_folder, "lib"), os.path.join(self.package_folder,"lib"))
|
self.copy("*.so", src="lib", dst="lib", keep_path=False)
|
||||||
copy(self, "*.dll", os.path.join(self.source_folder, "bin"), os.path.join(self.package_folder,"bin"))
|
|
||||||
else:
|
else:
|
||||||
if '64' in self.settings.arch:
|
if self.settings.arch.__contains__('64'):
|
||||||
copy(self, "*.so", os.path.join(self.source_folder, "lib64"), os.path.join(self.package_folder,"lib"))
|
self.copy("*.lib", src="lib64", dst="lib", keep_path=False)
|
||||||
|
self.copy("*.dll", src="bin64", dst="bin", keep_path=False)
|
||||||
else:
|
else:
|
||||||
copy(self, "*.so", os.path.join(self.source_folder, "lib"), os.path.join(self.package_folder,"lib"))
|
self.copy("*.lib", src="lib", dst="lib", keep_path=False)
|
||||||
|
self.copy("*.dll", src="bin", dst="bin", keep_path=False)
|
||||||
|
|
||||||
def package_info(self):
|
def package_info(self):
|
||||||
self.cpp_info.set_property("cmake_module_file_name", "Cg")
|
self.cpp_info.name = "Cg"
|
||||||
self.cpp_info.set_property("cmake_module_target_name", "Cg::Cg")
|
self.cpp_info.libs = tools.collect_libs(self)
|
||||||
self.cpp_info.set_property("cmake_file_name", "Cg")
|
|
||||||
self.cpp_info.set_property("cmake_target_name", "Cg::Cg")
|
|
||||||
self.cpp_info.libs = collect_libs(self)
|
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
sources:
|
|
||||||
"9.0":
|
|
||||||
url: "https://cdn.anotherfoxguy.com/DirectX-SDK.zip"
|
|
||||||
sha256: "f73f10c4519f445e1ecc71bcc315c3c9da90f08bacf354e1b3fabba1bacef77d"
|
|
@ -1,23 +0,0 @@
|
|||||||
from conan import ConanFile
|
|
||||||
from conan.tools.files import get, copy
|
|
||||||
import os
|
|
||||||
|
|
||||||
class DxConan(ConanFile):
|
|
||||||
name = "directx-sdk"
|
|
||||||
version = "9.0"
|
|
||||||
author = "Edgar Edgar@AnotherFoxGuy.com"
|
|
||||||
settings = "os", "arch"
|
|
||||||
|
|
||||||
def source(self):
|
|
||||||
get(self, **self.conan_data["sources"][self.version])
|
|
||||||
|
|
||||||
def package(self):
|
|
||||||
copy(self, "*", os.path.join(self.source_folder, "Include"), os.path.join(self.package_folder, "include"))
|
|
||||||
if '64' in self.settings.arch:
|
|
||||||
copy(self, "*", os.path.join(self.source_folder, "Lib/x64"), os.path.join(self.package_folder, "lib"), keep_path=False)
|
|
||||||
else:
|
|
||||||
copy(self, "*", os.path.join(self.source_folder, "lib/x86"), os.path.join(self.package_folder, "lib"), keep_path=False)
|
|
||||||
|
|
||||||
def package_info(self):
|
|
||||||
self.cpp_info.set_property("cmake_file_name", "DirectX9")
|
|
||||||
self.cpp_info.libs = ["d3d9", "d3dx9", "dxguid"]
|
|
@ -1,3 +0,0 @@
|
|||||||
versions:
|
|
||||||
"9.0":
|
|
||||||
folder: all
|
|
@ -1,6 +1,4 @@
|
|||||||
from conan import ConanFile
|
from conans import ConanFile, CMake, tools
|
||||||
from conan.tools.files import get, collect_libs
|
|
||||||
from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout
|
|
||||||
|
|
||||||
|
|
||||||
class DiscordrpcConan(ConanFile):
|
class DiscordrpcConan(ConanFile):
|
||||||
@ -11,19 +9,12 @@ 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):
|
||||||
get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
tools.get(**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()
|
||||||
|
|
||||||
@ -32,4 +23,4 @@ class DiscordrpcConan(ConanFile):
|
|||||||
cmake.install()
|
cmake.install()
|
||||||
|
|
||||||
def package_info(self):
|
def package_info(self):
|
||||||
self.cpp_info.libs = collect_libs(self)
|
self.cpp_info.libs = tools.collect_libs(self)
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
versions:
|
|
||||||
"3.4.0":
|
|
||||||
folder: all
|
|
@ -1,28 +0,0 @@
|
|||||||
|
|
||||||
from pylint.checkers import BaseChecker
|
|
||||||
from pylint.interfaces import IAstroidChecker
|
|
||||||
from astroid import nodes, Const, AssignName
|
|
||||||
|
|
||||||
|
|
||||||
class ImportConanFile(BaseChecker):
|
|
||||||
"""
|
|
||||||
Import ConanFile from new 'conan' module
|
|
||||||
"""
|
|
||||||
|
|
||||||
__implements__ = IAstroidChecker
|
|
||||||
|
|
||||||
name = "conan-import-conanfile"
|
|
||||||
msgs = {
|
|
||||||
"E9006": (
|
|
||||||
"Import ConanFile from new module: `from conan import ConanFile`. Old import is deprecated in Conan v2.",
|
|
||||||
"conan-import-conanfile",
|
|
||||||
"Import ConanFile from new module: `from conan import ConanFile`. Old import is deprecated in Conan v2.",
|
|
||||||
),
|
|
||||||
}
|
|
||||||
|
|
||||||
def visit_importfrom(self, node: nodes.ImportFrom) -> None:
|
|
||||||
basename = node.modname
|
|
||||||
if basename == 'conans':
|
|
||||||
names = [name for name, _ in node.names]
|
|
||||||
if 'ConanFile' in names:
|
|
||||||
self.add_message("conan-import-conanfile", node=node)
|
|
@ -1,77 +0,0 @@
|
|||||||
|
|
||||||
from pylint.checkers import BaseChecker
|
|
||||||
from pylint.interfaces import IAstroidChecker
|
|
||||||
from astroid import nodes, Const, AssignName
|
|
||||||
|
|
||||||
|
|
||||||
class ImportErrors(BaseChecker):
|
|
||||||
"""
|
|
||||||
Import errors from new 'conan' module
|
|
||||||
"""
|
|
||||||
|
|
||||||
__implements__ = IAstroidChecker
|
|
||||||
|
|
||||||
name = "conan-import-errors"
|
|
||||||
msgs = {
|
|
||||||
"E9008": (
|
|
||||||
"Import errors from new module: `from conan import errors`. Old import is deprecated in Conan v2.",
|
|
||||||
"conan-import-errors",
|
|
||||||
"Import errors from new module: `from conan import errors`. Old import is deprecated in Conan v2.",
|
|
||||||
),
|
|
||||||
}
|
|
||||||
|
|
||||||
def visit_importfrom(self, node: nodes.ImportFrom) -> None:
|
|
||||||
basename = node.modname
|
|
||||||
if basename == 'conans':
|
|
||||||
names = [name for name, _ in node.names]
|
|
||||||
if 'errors' in names:
|
|
||||||
self.add_message("conan-import-errors", node=node)
|
|
||||||
|
|
||||||
|
|
||||||
class ImportErrorsConanException(BaseChecker):
|
|
||||||
"""
|
|
||||||
Import errors from new 'conan' module
|
|
||||||
"""
|
|
||||||
|
|
||||||
__implements__ = IAstroidChecker
|
|
||||||
|
|
||||||
name = "conan-import-error-conanexception"
|
|
||||||
msgs = {
|
|
||||||
"E9009": (
|
|
||||||
"Import ConanException from new module: `from conan.errors import ConanException`. Old import is deprecated in Conan v2.",
|
|
||||||
"conan-import-error-conanexception",
|
|
||||||
"Import ConanException from new module: `from conan.errors import ConanException`. Old import is deprecated in Conan v2.",
|
|
||||||
),
|
|
||||||
}
|
|
||||||
|
|
||||||
def visit_importfrom(self, node: nodes.ImportFrom) -> None:
|
|
||||||
basename = node.modname
|
|
||||||
if basename == 'conans.errors':
|
|
||||||
names = [name for name, _ in node.names]
|
|
||||||
if 'ConanException' in names:
|
|
||||||
self.add_message("conan-import-error-conanexception", node=node)
|
|
||||||
|
|
||||||
|
|
||||||
class ImportErrorsConanInvalidConfiguration(BaseChecker):
|
|
||||||
"""
|
|
||||||
Import errors from new 'conan' module
|
|
||||||
"""
|
|
||||||
|
|
||||||
__implements__ = IAstroidChecker
|
|
||||||
|
|
||||||
name = "conan-import-error-conaninvalidconfiguration"
|
|
||||||
msgs = {
|
|
||||||
"E9010": (
|
|
||||||
"Import ConanInvalidConfiguration from new module: `from conan.errors import ConanInvalidConfiguration`. Old import is deprecated in Conan v2.",
|
|
||||||
"conan-import-error-conaninvalidconfiguration",
|
|
||||||
"Import ConanInvalidConfiguration from new module: `from conan.errors import ConanInvalidConfiguration`. Old import is deprecated in Conan v2.",
|
|
||||||
),
|
|
||||||
}
|
|
||||||
|
|
||||||
def visit_importfrom(self, node: nodes.ImportFrom) -> None:
|
|
||||||
basename = node.modname
|
|
||||||
if basename == 'conans.errors':
|
|
||||||
names = [name for name, _ in node.names]
|
|
||||||
if 'ConanInvalidConfiguration' in names:
|
|
||||||
self.add_message("conan-import-error-conaninvalidconfiguration", node=node)
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
|||||||
import re
|
|
||||||
from email.mime import base
|
|
||||||
from pylint.checkers import BaseChecker
|
|
||||||
from pylint.interfaces import IAstroidChecker
|
|
||||||
from astroid import nodes, Const, AssignName
|
|
||||||
|
|
||||||
|
|
||||||
class ImportTools(BaseChecker):
|
|
||||||
"""
|
|
||||||
Import tools following pattern 'from conan.tools.xxxx import yyyyy'
|
|
||||||
"""
|
|
||||||
|
|
||||||
__implements__ = IAstroidChecker
|
|
||||||
|
|
||||||
name = "conan-import-tools"
|
|
||||||
msgs = {
|
|
||||||
"E9011": (
|
|
||||||
"Import tools following pattern 'from conan.tools.xxxx import yyyyy' (https://docs.conan.io/en/latest/reference/conanfile/tools.html).",
|
|
||||||
"conan-import-tools",
|
|
||||||
"Import tools following pattern 'from conan.tools.xxxx import yyyyy' (https://docs.conan.io/en/latest/reference/conanfile/tools.html).",
|
|
||||||
),
|
|
||||||
}
|
|
||||||
|
|
||||||
def visit_importfrom(self, node: nodes.ImportFrom) -> None:
|
|
||||||
basename = node.modname
|
|
||||||
names = [name for name, _ in node.names]
|
|
||||||
if basename == 'conan' and 'tools' in names:
|
|
||||||
self.add_message("conan-import-tools", node=node)
|
|
||||||
elif re.match(r'conan\.tools\.[^.]+\..+', basename):
|
|
||||||
self.add_message("conan-import-tools", node=node)
|
|
@ -1,30 +0,0 @@
|
|||||||
from pylint.checkers import BaseChecker
|
|
||||||
from pylint.interfaces import IAstroidChecker
|
|
||||||
from astroid import nodes, Const, AssignName
|
|
||||||
|
|
||||||
|
|
||||||
class NoPackageName(BaseChecker):
|
|
||||||
"""
|
|
||||||
Conanfile used for testing a package should NOT provide a name
|
|
||||||
"""
|
|
||||||
|
|
||||||
__implements__ = IAstroidChecker
|
|
||||||
|
|
||||||
name = "conan-test-package-name"
|
|
||||||
msgs = {
|
|
||||||
"E9007": (
|
|
||||||
"No 'name' attribute in test_package conanfile",
|
|
||||||
"conan-test-no-name",
|
|
||||||
"No 'name' attribute in test_package conanfile."
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
def visit_classdef(self, node: nodes) -> None:
|
|
||||||
if node.basenames == ['ConanFile']:
|
|
||||||
for attr in node.body:
|
|
||||||
children = list(attr.get_children())
|
|
||||||
if len(children) == 2 and \
|
|
||||||
isinstance(children[0], AssignName) and \
|
|
||||||
children[0].name == "name" and \
|
|
||||||
isinstance(children[1], Const):
|
|
||||||
self.add_message("conan-test-no-name", node=attr, line=attr.lineno)
|
|
@ -1,39 +0,0 @@
|
|||||||
from pylint.checkers import BaseChecker
|
|
||||||
from pylint.interfaces import IAstroidChecker
|
|
||||||
from astroid import nodes, Const, AssignName
|
|
||||||
|
|
||||||
|
|
||||||
class PackageName(BaseChecker):
|
|
||||||
"""
|
|
||||||
All packages must have a lower-case name
|
|
||||||
"""
|
|
||||||
|
|
||||||
__implements__ = IAstroidChecker
|
|
||||||
|
|
||||||
name = "conan-package-name"
|
|
||||||
msgs = {
|
|
||||||
"E9004": (
|
|
||||||
"Reference name should be all lowercase",
|
|
||||||
"conan-bad-name",
|
|
||||||
"Use only lower-case on the package name: `name = 'foobar'`."
|
|
||||||
),
|
|
||||||
"E9005": (
|
|
||||||
"Missing name attribute",
|
|
||||||
"conan-missing-name",
|
|
||||||
"The member attribute `name` must be declared: `name = 'foobar'`."
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
def visit_classdef(self, node: nodes) -> None:
|
|
||||||
if node.basenames == ['ConanFile']:
|
|
||||||
for attr in node.body:
|
|
||||||
children = list(attr.get_children())
|
|
||||||
if len(children) == 2 and \
|
|
||||||
isinstance(children[0], AssignName) and \
|
|
||||||
children[0].name == "name" and \
|
|
||||||
isinstance(children[1], Const):
|
|
||||||
value = children[1].as_string()
|
|
||||||
if value.lower() != value:
|
|
||||||
self.add_message("conan-bad-name", node=attr, line=attr.lineno)
|
|
||||||
return
|
|
||||||
self.add_message("conan-missing-name", node=node)
|
|
@ -1,20 +0,0 @@
|
|||||||
"""
|
|
||||||
|
|
||||||
Pylint plugin/rules for test_package folder in Conan Center Index
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
from pylint.lint import PyLinter
|
|
||||||
from linter.check_import_conanfile import ImportConanFile
|
|
||||||
from linter.check_no_test_package_name import NoPackageName
|
|
||||||
from linter.check_import_errors import ImportErrorsConanException, ImportErrorsConanInvalidConfiguration, ImportErrors
|
|
||||||
from linter.check_import_tools import ImportTools
|
|
||||||
|
|
||||||
|
|
||||||
def register(linter: PyLinter) -> None:
|
|
||||||
linter.register_checker(NoPackageName(linter))
|
|
||||||
linter.register_checker(ImportConanFile(linter))
|
|
||||||
linter.register_checker(ImportErrors(linter))
|
|
||||||
linter.register_checker(ImportErrorsConanException(linter))
|
|
||||||
linter.register_checker(ImportErrorsConanInvalidConfiguration(linter))
|
|
||||||
linter.register_checker(ImportTools(linter))
|
|
@ -1,20 +0,0 @@
|
|||||||
"""
|
|
||||||
|
|
||||||
Pylint plugin/rules for conanfiles in Conan Center Index
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
from pylint.lint import PyLinter
|
|
||||||
from linter.check_package_name import PackageName
|
|
||||||
from linter.check_import_conanfile import ImportConanFile
|
|
||||||
from linter.check_import_errors import ImportErrorsConanException, ImportErrorsConanInvalidConfiguration, ImportErrors
|
|
||||||
from linter.check_import_tools import ImportTools
|
|
||||||
|
|
||||||
|
|
||||||
def register(linter: PyLinter) -> None:
|
|
||||||
linter.register_checker(PackageName(linter))
|
|
||||||
linter.register_checker(ImportConanFile(linter))
|
|
||||||
linter.register_checker(ImportErrors(linter))
|
|
||||||
linter.register_checker(ImportErrorsConanException(linter))
|
|
||||||
linter.register_checker(ImportErrorsConanInvalidConfiguration(linter))
|
|
||||||
linter.register_checker(ImportTools(linter))
|
|
@ -1,30 +0,0 @@
|
|||||||
[MASTER]
|
|
||||||
load-plugins=linter.conanv2_transition,
|
|
||||||
linter.transform_conanfile,
|
|
||||||
linter.transform_imports
|
|
||||||
|
|
||||||
py-version=3.6
|
|
||||||
recursive=no
|
|
||||||
suggestion-mode=yes
|
|
||||||
unsafe-load-any-extension=no
|
|
||||||
|
|
||||||
[MESSAGES CONTROL]
|
|
||||||
disable=fixme,
|
|
||||||
line-too-long,
|
|
||||||
missing-module-docstring,
|
|
||||||
missing-function-docstring,
|
|
||||||
missing-class-docstring,
|
|
||||||
invalid-name,
|
|
||||||
wrong-import-order, # TODO: Remove
|
|
||||||
import-outside-toplevel # TODO: Remove
|
|
||||||
|
|
||||||
enable=conan-bad-name,
|
|
||||||
conan-missing-name,
|
|
||||||
conan-import-conanfile
|
|
||||||
|
|
||||||
[REPORTS]
|
|
||||||
evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error) / statement) * 10))
|
|
||||||
output-format=text
|
|
||||||
reports=no
|
|
||||||
score=no
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
|||||||
[MASTER]
|
|
||||||
load-plugins=linter.conanv2_test_transition,
|
|
||||||
linter.transform_conanfile,
|
|
||||||
linter.transform_imports
|
|
||||||
py-version=3.6
|
|
||||||
recursive=no
|
|
||||||
suggestion-mode=yes
|
|
||||||
unsafe-load-any-extension=no
|
|
||||||
|
|
||||||
[MESSAGES CONTROL]
|
|
||||||
disable=fixme,
|
|
||||||
line-too-long,
|
|
||||||
missing-module-docstring,
|
|
||||||
missing-function-docstring,
|
|
||||||
missing-class-docstring,
|
|
||||||
invalid-name,
|
|
||||||
wrong-import-order, # TODO: Remove
|
|
||||||
import-outside-toplevel # TODO: Remove
|
|
||||||
|
|
||||||
enable=conan-test-no-name,
|
|
||||||
conan-import-conanfile
|
|
||||||
|
|
||||||
[REPORTS]
|
|
||||||
evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error) / statement) * 10))
|
|
||||||
output-format=text
|
|
||||||
reports=no
|
|
||||||
score=no
|
|
@ -1,43 +0,0 @@
|
|||||||
{
|
|
||||||
"problemMatcher": [
|
|
||||||
{
|
|
||||||
"owner": "recipe_linter_fatals",
|
|
||||||
"severity": "error",
|
|
||||||
"pattern": [
|
|
||||||
{
|
|
||||||
"regexp": "(\\S+):(\\d+): \\[(F\\d+\\(\\S+\\)),\\s(.+?)?\\](.+)",
|
|
||||||
"file": 1,
|
|
||||||
"line": 2,
|
|
||||||
"message": 5,
|
|
||||||
"code": 3
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"owner": "recipe_linter_errors",
|
|
||||||
"severity": "error",
|
|
||||||
"pattern": [
|
|
||||||
{
|
|
||||||
"regexp": "(\\S+):(\\d+): \\[(E\\d+\\(\\S+\\)),\\s(.+?)?\\](.+)",
|
|
||||||
"file": 1,
|
|
||||||
"line": 2,
|
|
||||||
"message": 5,
|
|
||||||
"code": 3
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"owner": "recipe_linter_warnings",
|
|
||||||
"severity": "warning",
|
|
||||||
"pattern": [
|
|
||||||
{
|
|
||||||
"regexp": "(\\S+):(\\d+): \\[(W\\d+\\(\\S+\\)),\\s(.+?)?\\](.+)",
|
|
||||||
"file": 1,
|
|
||||||
"line": 2,
|
|
||||||
"message": 5,
|
|
||||||
"code": 3
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,74 +0,0 @@
|
|||||||
|
|
||||||
# Class ConanFile doesn't declare all the valid members and functions,
|
|
||||||
# some are injected by Conan dynamically to the class.
|
|
||||||
|
|
||||||
import textwrap
|
|
||||||
import astroid
|
|
||||||
from astroid.builder import AstroidBuilder
|
|
||||||
from astroid.manager import AstroidManager
|
|
||||||
|
|
||||||
|
|
||||||
def _settings_transform():
|
|
||||||
module = AstroidBuilder(AstroidManager()).string_build(
|
|
||||||
textwrap.dedent("""
|
|
||||||
class Settings(object):
|
|
||||||
os = None
|
|
||||||
arch = None
|
|
||||||
compiler = None
|
|
||||||
build_type = None
|
|
||||||
""")
|
|
||||||
)
|
|
||||||
return module['Settings']
|
|
||||||
|
|
||||||
def _user_info_build_transform():
|
|
||||||
module = AstroidBuilder(AstroidManager()).string_build(
|
|
||||||
textwrap.dedent("""
|
|
||||||
class UserInfoBuild(defaultdict):
|
|
||||||
pass
|
|
||||||
""")
|
|
||||||
)
|
|
||||||
return module['UserInfoBuild']
|
|
||||||
|
|
||||||
|
|
||||||
def register(_):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def transform_conanfile(node):
|
|
||||||
"""Transform definition of ConanFile class so dynamic fields are visible to pylint"""
|
|
||||||
|
|
||||||
str_class = astroid.builtin_lookup("str")
|
|
||||||
dict_class = astroid.builtin_lookup("dict")
|
|
||||||
info_class = astroid.MANAGER.ast_from_module_name("conans.model.info").lookup(
|
|
||||||
"ConanInfo")
|
|
||||||
build_requires_class = astroid.MANAGER.ast_from_module_name(
|
|
||||||
"conans.client.graph.graph_manager").lookup("_RecipeBuildRequires")
|
|
||||||
file_copier_class = astroid.MANAGER.ast_from_module_name(
|
|
||||||
"conans.client.file_copier").lookup("FileCopier")
|
|
||||||
file_importer_class = astroid.MANAGER.ast_from_module_name(
|
|
||||||
"conans.client.importer").lookup("_FileImporter")
|
|
||||||
python_requires_class = astroid.MANAGER.ast_from_module_name(
|
|
||||||
"conans.client.graph.python_requires").lookup("PyRequires")
|
|
||||||
|
|
||||||
dynamic_fields = {
|
|
||||||
"conan_data": str_class,
|
|
||||||
"build_requires": build_requires_class,
|
|
||||||
"tool_requires": build_requires_class,
|
|
||||||
"info_build": info_class,
|
|
||||||
"user_info_build": [_user_info_build_transform()],
|
|
||||||
"info": info_class,
|
|
||||||
"copy": file_copier_class,
|
|
||||||
"copy_deps": file_importer_class,
|
|
||||||
"python_requires": [str_class, python_requires_class],
|
|
||||||
"recipe_folder": str_class,
|
|
||||||
"settings_build": [_settings_transform()],
|
|
||||||
"settings_target": [_settings_transform()],
|
|
||||||
"conf": dict_class,
|
|
||||||
}
|
|
||||||
|
|
||||||
for f, t in dynamic_fields.items():
|
|
||||||
node.locals[f] = [i for i in t]
|
|
||||||
|
|
||||||
|
|
||||||
astroid.MANAGER.register_transform(
|
|
||||||
astroid.ClassDef, transform_conanfile,
|
|
||||||
lambda node: node.qname() == "conans.model.conan_file.ConanFile")
|
|
@ -1,46 +0,0 @@
|
|||||||
|
|
||||||
import astroid
|
|
||||||
from pylint.lint import PyLinter
|
|
||||||
|
|
||||||
"""
|
|
||||||
Here we are transforming the imports to mimic future Conan v2 release. With
|
|
||||||
these changes, built-in checks in Pylint will raise with different errors, so
|
|
||||||
we are modifying the messages to point users in the right direction.
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
def register(linter: PyLinter):
|
|
||||||
msge1101 = linter.msgs_store._messages_definitions["E1101"]
|
|
||||||
msge1101.msg += ". Please, check https://github.com/conan-io/conan-center-index/blob/master/docs/v2_linter.md"
|
|
||||||
linter.msgs_store.register_message(msge1101)
|
|
||||||
|
|
||||||
msge0611 = linter.msgs_store._messages_definitions["E0611"]
|
|
||||||
msge0611.msg += ". Please, check https://github.com/conan-io/conan-center-index/blob/master/docs/v2_linter.md"
|
|
||||||
linter.msgs_store.register_message(msge0611)
|
|
||||||
|
|
||||||
def transform_tools(module):
|
|
||||||
""" Transform import module """
|
|
||||||
if 'get' in module.locals:
|
|
||||||
del module.locals['get']
|
|
||||||
if 'cross_building' in module.locals:
|
|
||||||
del module.locals['cross_building']
|
|
||||||
if 'rmdir' in module.locals:
|
|
||||||
del module.locals['rmdir']
|
|
||||||
if 'Version' in module.locals:
|
|
||||||
del module.locals['Version']
|
|
||||||
|
|
||||||
def transform_errors(module):
|
|
||||||
pass
|
|
||||||
#if 'ConanInvalidConfiguration' in module.locals:
|
|
||||||
# del module.locals['ConanInvalidConfiguration']
|
|
||||||
#if 'ConanException' in module.locals:
|
|
||||||
# del module.locals['ConanException']
|
|
||||||
|
|
||||||
|
|
||||||
astroid.MANAGER.register_transform(
|
|
||||||
astroid.Module, transform_tools,
|
|
||||||
lambda node: node.qname() == "conans.tools")
|
|
||||||
|
|
||||||
astroid.MANAGER.register_transform(
|
|
||||||
astroid.Module, transform_errors,
|
|
||||||
lambda node: node.qname() == "conans.errors")
|
|
@ -1,26 +0,0 @@
|
|||||||
extends: default
|
|
||||||
rules:
|
|
||||||
document-start:
|
|
||||||
level: error
|
|
||||||
present: false
|
|
||||||
document-end:
|
|
||||||
level: error
|
|
||||||
present: false
|
|
||||||
empty-values:
|
|
||||||
forbid-in-block-mappings: true
|
|
||||||
forbid-in-flow-mappings: true
|
|
||||||
line-length: disable
|
|
||||||
indentation:
|
|
||||||
level: error
|
|
||||||
new-line-at-end-of-file:
|
|
||||||
level: error
|
|
||||||
trailing-spaces:
|
|
||||||
level: error
|
|
||||||
comments:
|
|
||||||
level: error
|
|
||||||
comments-indentation:
|
|
||||||
level: error
|
|
||||||
new-lines:
|
|
||||||
type: unix
|
|
||||||
key-duplicates:
|
|
||||||
level: error
|
|
@ -5,3 +5,12 @@ sources:
|
|||||||
"3.4.1":
|
"3.4.1":
|
||||||
url: "https://github.com/MyGUI/mygui/archive/refs/tags/MyGUI3.4.1.tar.gz"
|
url: "https://github.com/MyGUI/mygui/archive/refs/tags/MyGUI3.4.1.tar.gz"
|
||||||
sha256: "bdf730bdeb4ad89e6b8223967db01aa5274d2b93adc2c0d6aa4842faeed4de1a"
|
sha256: "bdf730bdeb4ad89e6b8223967db01aa5274d2b93adc2c0d6aa4842faeed4de1a"
|
||||||
|
patches:
|
||||||
|
"3.4.0":
|
||||||
|
- patch_file: "patches/3.4.0/CMakeLists.txt.patch"
|
||||||
|
"3.4.1":
|
||||||
|
- patch_file: "patches/3.4.1/CMakeLists.txt.patch"
|
||||||
|
requirements:
|
||||||
|
- "ogre3d/[1.x]@anotherfoxguy/stable"
|
||||||
|
- "freetype/[2.x]"
|
||||||
|
- "zlib/[1.x]"
|
@ -1,7 +1,5 @@
|
|||||||
from conan import ConanFile
|
from conans import ConanFile, CMake, tools
|
||||||
from conan.tools.files import get, collect_libs, replace_in_file
|
from conans.tools import os_info, SystemPackageTool
|
||||||
from conan.tools.cmake import CMakeToolchain, CMake, CMakeDeps, cmake_layout
|
|
||||||
import os
|
|
||||||
|
|
||||||
|
|
||||||
class MyGUIConan(ConanFile):
|
class MyGUIConan(ConanFile):
|
||||||
@ -10,49 +8,30 @@ class MyGUIConan(ConanFile):
|
|||||||
url = "https://github.com/AnotherFoxGuy/conan-MyGUI"
|
url = "https://github.com/AnotherFoxGuy/conan-MyGUI"
|
||||||
description = "Fast, flexible and simple GUI."
|
description = "Fast, flexible and simple GUI."
|
||||||
settings = "os", "compiler", "build_type", "arch"
|
settings = "os", "compiler", "build_type", "arch"
|
||||||
|
generators = "cmake_paths", "cmake_find_package"
|
||||||
|
exports_sources = "patches/**"
|
||||||
options = {"system_ogre": [True, False]}
|
options = {"system_ogre": [True, False]}
|
||||||
default_options = {"system_ogre": False}
|
default_options = {"system_ogre": False}
|
||||||
|
|
||||||
def layout(self):
|
|
||||||
cmake_layout(self)
|
|
||||||
|
|
||||||
def requirements(self):
|
def requirements(self):
|
||||||
if not self.options.system_ogre:
|
if not self.options.system_ogre:
|
||||||
self.requires("ogre3d/[>=1 <14]@anotherfoxguy/stable")
|
for req in self.conan_data["requirements"]:
|
||||||
|
self.requires(req)
|
||||||
|
|
||||||
def source(self):
|
def source(self):
|
||||||
get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
tools.get(**self.conan_data["sources"][self.version], strip_root=True)
|
||||||
|
if not self.options.system_ogre:
|
||||||
def generate(self):
|
for patch in self.conan_data["patches"][self.version]:
|
||||||
tc = CMakeToolchain(self)
|
tools.patch(**patch)
|
||||||
tc.variables["MYGUI_BUILD_DEMOS"] = "OFF"
|
|
||||||
tc.variables["MYGUI_BUILD_DOCS"] = "OFF"
|
|
||||||
tc.variables["MYGUI_BUILD_TEST_APP"] = "OFF"
|
|
||||||
tc.variables["MYGUI_BUILD_PLUGINS"] = "OFF"
|
|
||||||
tc.variables["MYGUI_BUILD_TOOLS"] = "OFF"
|
|
||||||
tc.variables["MYGUI_RENDERSYSTEM"] = "3"
|
|
||||||
tc.variables["OIS_BUILD_DEMOS"] = "OFF"
|
|
||||||
tc.variables["OIS_BUILD_DEMOS"] = "OFF"
|
|
||||||
tc.variables["OIS_BUILD_DEMOS"] = "OFF"
|
|
||||||
tc.generate()
|
|
||||||
deps = CMakeDeps(self)
|
|
||||||
deps.generate()
|
|
||||||
|
|
||||||
def _patch_sources(self):
|
|
||||||
replace_in_file(self,
|
|
||||||
os.path.join(self.source_folder, "MyGUIEngine/CMakeLists.txt"),
|
|
||||||
"${FREETYPE_LIBRARIES}",
|
|
||||||
"freetype",
|
|
||||||
)
|
|
||||||
replace_in_file(self,
|
|
||||||
os.path.join(self.source_folder, "Platforms/Ogre/OgrePlatform/CMakeLists.txt"),
|
|
||||||
"${OGRE_LIBRARIES}",
|
|
||||||
"OGRE::OGRE",
|
|
||||||
)
|
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
self._patch_sources()
|
|
||||||
cmake = CMake(self)
|
cmake = CMake(self)
|
||||||
|
cmake.definitions['MYGUI_BUILD_DEMOS'] = 'OFF'
|
||||||
|
cmake.definitions['MYGUI_BUILD_DOCS'] = 'OFF'
|
||||||
|
cmake.definitions['MYGUI_BUILD_TEST_APP'] = 'OFF'
|
||||||
|
cmake.definitions['MYGUI_BUILD_PLUGINS'] = 'OFF'
|
||||||
|
cmake.definitions['MYGUI_BUILD_TOOLS'] = 'OFF'
|
||||||
|
cmake.definitions['MYGUI_RENDERSYSTEM'] = '3'
|
||||||
cmake.configure()
|
cmake.configure()
|
||||||
cmake.build()
|
cmake.build()
|
||||||
|
|
||||||
@ -61,14 +40,10 @@ class MyGUIConan(ConanFile):
|
|||||||
cmake.install()
|
cmake.install()
|
||||||
|
|
||||||
def package_info(self):
|
def package_info(self):
|
||||||
self.cpp_info.set_property("cmake_module_file_name", "MyGUI")
|
|
||||||
self.cpp_info.set_property("cmake_module_target_name", "MyGUI::MyGUI")
|
|
||||||
self.cpp_info.set_property("cmake_file_name", "MyGUI")
|
|
||||||
self.cpp_info.set_property("cmake_target_name", "MyGUI::MyGUI")
|
|
||||||
self.cpp_info.includedirs = ['include/MYGUI']
|
self.cpp_info.includedirs = ['include/MYGUI']
|
||||||
# Directories where libraries can be found
|
# Directories where libraries can be found
|
||||||
self.cpp_info.libdirs = ['lib', f'lib/{self.settings.build_type}']
|
self.cpp_info.libdirs = ['lib', f'lib/{self.settings.build_type}']
|
||||||
self.cpp_info.libs = collect_libs(self)
|
self.cpp_info.libs = tools.collect_libs(self)
|
||||||
|
|
||||||
def package_id(self):
|
def package_id(self):
|
||||||
if not self.options.system_ogre:
|
if not self.options.system_ogre:
|
||||||
|
14
mygui/all/patches/3.4.0/CMakeLists.txt.patch
Normal file
14
mygui/all/patches/3.4.0/CMakeLists.txt.patch
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
--- CMakeLists.txt
|
||||||
|
+++ CMakeLists.txt
|
||||||
|
@@ -11,8 +11,11 @@
|
||||||
|
|
||||||
|
project(MYGUI)
|
||||||
|
|
||||||
|
+include(${CMAKE_BINARY_DIR}/conan_paths.cmake)
|
||||||
|
+
|
||||||
|
# Include necessary submodules
|
||||||
|
set(CMAKE_MODULE_PATH
|
||||||
|
+ "${CMAKE_BINARY_DIR}"
|
||||||
|
"${MYGUI_SOURCE_DIR}/CMake"
|
||||||
|
"${MYGUI_SOURCE_DIR}/CMake/Utils"
|
||||||
|
"${MYGUI_SOURCE_DIR}/CMake/Packages"
|
14
mygui/all/patches/3.4.1/CMakeLists.txt.patch
Normal file
14
mygui/all/patches/3.4.1/CMakeLists.txt.patch
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
--- CMakeLists.txt
|
||||||
|
+++ CMakeLists.txt
|
||||||
|
@@ -22,8 +22,11 @@
|
||||||
|
|
||||||
|
project(MYGUI)
|
||||||
|
|
||||||
|
+include(${CMAKE_BINARY_DIR}/conan_paths.cmake)
|
||||||
|
+
|
||||||
|
# Include necessary submodules
|
||||||
|
set(CMAKE_MODULE_PATH
|
||||||
|
+ "${CMAKE_BINARY_DIR}"
|
||||||
|
"${MYGUI_SOURCE_DIR}/CMake"
|
||||||
|
"${MYGUI_SOURCE_DIR}/CMake/Utils"
|
||||||
|
"${MYGUI_SOURCE_DIR}/CMake/Packages"
|
@ -1,4 +0,0 @@
|
|||||||
sources:
|
|
||||||
"2022.10":
|
|
||||||
url: "https://github.com/cryham/mygui-next/archive/3f1194e5075078f0a9428b052f97749486b6fd72.tar.gz"
|
|
||||||
sha256: "13f084a95e9e22bbb1f1d216b55527fd03f4a4e525484e45b97f98ba307732a4"
|
|
@ -1,83 +0,0 @@
|
|||||||
from conan import ConanFile
|
|
||||||
from conan.tools.files import get, collect_libs, replace_in_file
|
|
||||||
from conan.tools.cmake import CMakeToolchain, CMake, CMakeDeps, cmake_layout
|
|
||||||
import os
|
|
||||||
|
|
||||||
|
|
||||||
class MyGUIConan(ConanFile):
|
|
||||||
name = "mygui-next"
|
|
||||||
license = "MIT"
|
|
||||||
url = "https://github.com/AnotherFoxGuy/conan-MyGUI"
|
|
||||||
description = "Fast, flexible and simple GUI."
|
|
||||||
settings = "os", "compiler", "build_type", "arch"
|
|
||||||
options = {"system_ogre": [True, False]}
|
|
||||||
default_options = {"system_ogre": False}
|
|
||||||
|
|
||||||
def layout(self):
|
|
||||||
cmake_layout(self)
|
|
||||||
|
|
||||||
def requirements(self):
|
|
||||||
if not self.options.system_ogre:
|
|
||||||
# self.requires("ogre3d-next/[2.x]@anotherfoxguy/stable")
|
|
||||||
self.requires("ogre3d-next/2023.01@anotherfoxguy/testing")
|
|
||||||
|
|
||||||
def source(self):
|
|
||||||
get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
|
||||||
|
|
||||||
def generate(self):
|
|
||||||
tc = CMakeToolchain(self)
|
|
||||||
tc.variables["MYGUI_BUILD_DEMOS"] = "OFF"
|
|
||||||
tc.variables["MYGUI_BUILD_DOCS"] = "OFF"
|
|
||||||
tc.variables["MYGUI_BUILD_TEST_APP"] = "OFF"
|
|
||||||
tc.variables["MYGUI_BUILD_PLUGINS"] = "OFF"
|
|
||||||
tc.variables["MYGUI_BUILD_TOOLS"] = "OFF"
|
|
||||||
tc.variables["MYGUI_DONT_USE_OBSOLETE"] = "OFF"
|
|
||||||
tc.variables["MYGUI_USE_FREETYPE"] = "ON"
|
|
||||||
tc.variables["MYGUI_RENDERSYSTEM"] = "8"
|
|
||||||
tc.variables["OIS_BUILD_DEMOS"] = "OFF"
|
|
||||||
tc.variables["OIS_BUILD_DEMOS"] = "OFF"
|
|
||||||
tc.variables["OIS_BUILD_DEMOS"] = "OFF"
|
|
||||||
tc.generate()
|
|
||||||
deps = CMakeDeps(self)
|
|
||||||
deps.generate()
|
|
||||||
|
|
||||||
def _patch_sources(self):
|
|
||||||
replace_in_file(self,
|
|
||||||
os.path.join(self.source_folder, "MyGUIEngine/CMakeLists.txt"),
|
|
||||||
"${FREETYPE_LIBRARIES}",
|
|
||||||
"freetype",
|
|
||||||
)
|
|
||||||
replace_in_file(self,
|
|
||||||
os.path.join(self.source_folder, "CMakeLists.txt"),
|
|
||||||
"# Find dependencies",
|
|
||||||
"find_package(OGRE REQUIRED)",
|
|
||||||
)
|
|
||||||
replace_in_file(self,
|
|
||||||
os.path.join(self.source_folder, "Platforms/Ogre2/Ogre2Platform/CMakeLists.txt"),
|
|
||||||
"${OGRE_LIBRARIES}",
|
|
||||||
"OGRE::OGRE",
|
|
||||||
)
|
|
||||||
|
|
||||||
def build(self):
|
|
||||||
self._patch_sources()
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.configure()
|
|
||||||
cmake.build()
|
|
||||||
|
|
||||||
def package(self):
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.install()
|
|
||||||
|
|
||||||
def package_info(self):
|
|
||||||
self.cpp_info.set_property("cmake_module_file_name", "MyGUI")
|
|
||||||
self.cpp_info.set_property("cmake_module_target_name", "MyGUI::MyGUI")
|
|
||||||
self.cpp_info.set_property("cmake_file_name", "MyGUI")
|
|
||||||
self.cpp_info.set_property("cmake_target_name", "MyGUI::MyGUI")
|
|
||||||
self.cpp_info.includedirs = ['include/MYGUI']
|
|
||||||
# Directories where libraries can be found
|
|
||||||
self.cpp_info.libdirs = ['lib', f'lib/{self.settings.build_type}']
|
|
||||||
self.cpp_info.libs = collect_libs(self)
|
|
||||||
|
|
||||||
def package_id(self):
|
|
||||||
if not self.options.system_ogre:
|
|
||||||
self.info.requires["ogre3d-next"].full_recipe_mode()
|
|
@ -2,15 +2,16 @@ sources:
|
|||||||
"0.6.3":
|
"0.6.3":
|
||||||
url: "https://github.com/OGRECave/ogre-caelum/archive/94913d2040a41148c14001c33a0bdc0f100842f8.zip"
|
url: "https://github.com/OGRECave/ogre-caelum/archive/94913d2040a41148c14001c33a0bdc0f100842f8.zip"
|
||||||
sha256: "9de4159ae8050fd0858b3c1c09005aa50b36079a3a06accfb67203669be9a09e"
|
sha256: "9de4159ae8050fd0858b3c1c09005aa50b36079a3a06accfb67203669be9a09e"
|
||||||
"0.6.3.1":
|
|
||||||
url: "https://github.com/RigsOfRods/ogre-caelum/archive/70fcf62f306288c9472cc03a42367c9625c839ea.zip"
|
|
||||||
sha256: "b4b4b6fe2997c3da4537ada2ab69032647e65773886e57c9803fc90aac2dd158"
|
|
||||||
"0.6.4":
|
"0.6.4":
|
||||||
url: "https://github.com/OGRECave/ogre-caelum/archive/4bd1b0581d55896d37922483981582661ca557de.zip"
|
url: "https://github.com/OGRECave/ogre-caelum/archive/7763bff99f758bbfcc5e7f9d751b2551e975545b.zip"
|
||||||
sha256: "deffe26ba169d89954f62ade50e856fdae293078c73836378d7bf3051eff0a8d"
|
sha256: "069050b1039194324b0d1dddef887e83442b04d5843b4572ae5035da3e2d1ef6"
|
||||||
"2022.08":
|
|
||||||
url: "https://github.com/OGRECave/ogre-caelum/archive/4bd1b0581d55896d37922483981582661ca557de.zip"
|
|
||||||
sha256: "deffe26ba169d89954f62ade50e856fdae293078c73836378d7bf3051eff0a8d"
|
|
||||||
patches:
|
patches:
|
||||||
"2022.08":
|
"0.6.3":
|
||||||
- patch_file: "patches/2022.08/CMakeLists.txt.patch"
|
- patch_file: "patches/0.6.3/CMakeLists.txt.patch"
|
||||||
|
"0.6.4":
|
||||||
|
- patch_file: "patches/0.6.4/CMakeLists.txt.patch"
|
||||||
|
requirements:
|
||||||
|
"0.6.3":
|
||||||
|
- "ogre3d/[1.x]@anotherfoxguy/stable"
|
||||||
|
"0.6.4":
|
||||||
|
- "ogre3d/[13.x]@anotherfoxguy/stable"
|
@ -1,45 +1,25 @@
|
|||||||
from conan import ConanFile
|
from conans import ConanFile, CMake, tools
|
||||||
from conan.tools.files import (
|
|
||||||
get,
|
|
||||||
collect_libs,
|
|
||||||
apply_conandata_patches,
|
|
||||||
export_conandata_patches,
|
|
||||||
)
|
|
||||||
from conan.tools.cmake import CMakeToolchain, CMake, CMakeDeps, cmake_layout
|
|
||||||
import os
|
|
||||||
|
|
||||||
|
|
||||||
class CaelumConan(ConanFile):
|
class CaelumConan(ConanFile):
|
||||||
name = "ogre3d-caelum"
|
name = "ogre3d-caelum"
|
||||||
license = "GNU Lesser General Public License v2.1"
|
license = "GNU Lesser General Public License v2.1"
|
||||||
url = "https://github.com/RigsOfRods/Caelum/issues"
|
url = "https://github.com/RigsOfRods/Caelum/issues"
|
||||||
description = "Library for rendering of dynamic and realistic skies"
|
description = "Caelum is a library which provides cross-platform socket abstraction"
|
||||||
settings = "os", "compiler", "build_type", "arch"
|
settings = "os", "compiler", "build_type", "arch"
|
||||||
|
generators = "cmake_find_package"
|
||||||
def export_sources(self):
|
exports_sources = "patches/**"
|
||||||
export_conandata_patches(self)
|
|
||||||
|
|
||||||
def layout(self):
|
|
||||||
cmake_layout(self)
|
|
||||||
|
|
||||||
def requirements(self):
|
def requirements(self):
|
||||||
self.requires("ogre3d/[13.x]@anotherfoxguy/stable")
|
for req in self.conan_data["requirements"][self.version]:
|
||||||
self.requires("libpng/1.6.38")
|
self.requires(req)
|
||||||
|
|
||||||
def source(self):
|
def source(self):
|
||||||
get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
tools.get(**self.conan_data["sources"][self.version], strip_root=True)
|
||||||
|
for patch in self.conan_data["patches"][self.version]:
|
||||||
def generate(self):
|
tools.patch(**patch)
|
||||||
tc = CMakeToolchain(self)
|
|
||||||
tc.generate()
|
|
||||||
deps = CMakeDeps(self)
|
|
||||||
deps.generate()
|
|
||||||
|
|
||||||
def _patch_sources(self):
|
|
||||||
apply_conandata_patches(self)
|
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
self._patch_sources()
|
|
||||||
cmake = CMake(self)
|
cmake = CMake(self)
|
||||||
cmake.configure()
|
cmake.configure()
|
||||||
cmake.build()
|
cmake.build()
|
||||||
@ -49,12 +29,12 @@ class CaelumConan(ConanFile):
|
|||||||
cmake.install()
|
cmake.install()
|
||||||
|
|
||||||
def package_info(self):
|
def package_info(self):
|
||||||
self.cpp_info.set_property("cmake_module_file_name", "Caelum")
|
self.cpp_info.name = "Caelum"
|
||||||
self.cpp_info.set_property("cmake_module_target_name", "Caelum::Caelum")
|
self.cpp_info.includedirs = [
|
||||||
self.cpp_info.set_property("cmake_file_name", "Caelum")
|
'include',
|
||||||
self.cpp_info.set_property("cmake_target_name", "Caelum::Caelum")
|
'include/Caelum'
|
||||||
self.cpp_info.includedirs = ["include", "include/Caelum"]
|
]
|
||||||
self.cpp_info.libs = collect_libs(self)
|
self.cpp_info.libs = tools.collect_libs(self)
|
||||||
|
|
||||||
def package_id(self):
|
def package_id(self):
|
||||||
self.info.requires["ogre3d"].full_recipe_mode()
|
self.info.requires["ogre3d"].full_recipe_mode()
|
||||||
|
20
ogre-caelum/all/patches/0.6.3/CMakeLists.txt.patch
Normal file
20
ogre-caelum/all/patches/0.6.3/CMakeLists.txt.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
--- CMakeLists.txt
|
||||||
|
+++ CMakeLists.txt
|
||||||
|
@@ -7,7 +7,7 @@
|
||||||
|
# cmake system for Caelum updated on 6-10-2017 by Edgar{at}AnotherFoxGuy{DOT}com
|
||||||
|
|
||||||
|
cmake_minimum_required(VERSION 3.0.2)
|
||||||
|
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
|
||||||
|
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake)
|
||||||
|
|
||||||
|
|
||||||
|
# add some functions we use that are shipped with cmake
|
||||||
|
@@ -34,7 +34,7 @@
|
||||||
|
|
||||||
|
SET(CMAKE_USE_RELATIVE_PATHS OFF)
|
||||||
|
|
||||||
|
-find_package(OGRE REQUIRED CONFIG)
|
||||||
|
+find_package(OGRE REQUIRED)
|
||||||
|
link_directories(${OGRE_LIBRARY_DIRS})
|
||||||
|
|
||||||
|
# setup paths
|
25
ogre-caelum/all/patches/0.6.4/CMakeLists.txt.patch
Normal file
25
ogre-caelum/all/patches/0.6.4/CMakeLists.txt.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
--- CMakeLists.txt
|
||||||
|
+++ CMakeLists.txt
|
||||||
|
@@ -8,6 +8,8 @@
|
||||||
|
|
||||||
|
cmake_minimum_required(VERSION 3.0.2)
|
||||||
|
|
||||||
|
+set(CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR} ${CMAKE_MODULE_PATH})
|
||||||
|
+set(CMAKE_DEBUG_POSTFIX _d)
|
||||||
|
# define the project
|
||||||
|
project(
|
||||||
|
Caelum
|
||||||
|
@@ -29,7 +31,12 @@
|
||||||
|
|
||||||
|
SET(CMAKE_USE_RELATIVE_PATHS OFF)
|
||||||
|
|
||||||
|
-find_package(OGRE REQUIRED CONFIG)
|
||||||
|
+find_package(OGRE REQUIRED)
|
||||||
|
+
|
||||||
|
+add_library(OgreMain INTERFACE IMPORTED GLOBAL)
|
||||||
|
+target_include_directories(OgreMain INTERFACE ${OGRE_INCLUDE_DIRS})
|
||||||
|
+target_link_libraries(OgreMain INTERFACE ${OGRE_LIBRARIES})
|
||||||
|
+
|
||||||
|
|
||||||
|
# setup paths
|
||||||
|
SET(RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/bin/")
|
@ -1,8 +0,0 @@
|
|||||||
--- a/main/CMakeLists.txt
|
|
||||||
+++ b/main/CMakeLists.txt
|
|
||||||
@@ -34,4 +34,4 @@ install(DIRECTORY ${CMAKE_SOURCE_DIR}/main/include/ DESTINATION ${CMAKE_INSTALL_
|
|
||||||
install(DIRECTORY ${CMAKE_BINARY_DIR}/main/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Caelum FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE)
|
|
||||||
|
|
||||||
# --- Ogre 3D graphics engine ---
|
|
||||||
-target_link_libraries(${CMAKE_PROJECT_NAME} PUBLIC OgreMain)
|
|
||||||
+target_link_libraries(${CMAKE_PROJECT_NAME} PUBLIC OGRE::OGRE)
|
|
@ -1,5 +1,5 @@
|
|||||||
versions:
|
versions:
|
||||||
"0.6.3":
|
"0.6.3":
|
||||||
folder: all
|
folder: all
|
||||||
"2022.08":
|
"0.6.4":
|
||||||
folder: all
|
folder: all
|
||||||
|
@ -5,6 +5,13 @@ sources:
|
|||||||
"1.3.0":
|
"1.3.0":
|
||||||
url: "https://github.com/OGRECave/ogre-pagedgeometry/archive/18ca8a0abd26cb5d52b99ad8e8fa0c8f7e6e7d79.zip"
|
url: "https://github.com/OGRECave/ogre-pagedgeometry/archive/18ca8a0abd26cb5d52b99ad8e8fa0c8f7e6e7d79.zip"
|
||||||
sha256: "4a3d97d75f7417208403bd0f5e8c3b010ae0dd9a36968f78ecc5cd0161b2ddb9"
|
sha256: "4a3d97d75f7417208403bd0f5e8c3b010ae0dd9a36968f78ecc5cd0161b2ddb9"
|
||||||
"2022.08":
|
patches:
|
||||||
url: "https://github.com/OGRECave/ogre-pagedgeometry/archive/8637c7f4b6238ced28e741bb6e4d4ddc8b60b477.zip"
|
"1.2.0":
|
||||||
sha256: "b83884652dc773e6c58e8efebfb950de714f6e34161a0fb388d2f546efea3a87"
|
- patch_file: "patches/1.2.0/CMakeLists.txt.patch"
|
||||||
|
"1.3.0":
|
||||||
|
- patch_file: "patches/1.3.0/CMakeLists.txt.patch"
|
||||||
|
requirements:
|
||||||
|
"1.2.0":
|
||||||
|
- "ogre3d/[1.x]@anotherfoxguy/stable"
|
||||||
|
"1.3.0":
|
||||||
|
- "ogre3d/[13.x]@anotherfoxguy/stable"
|
@ -1,6 +1,4 @@
|
|||||||
from conan import ConanFile
|
from conans import ConanFile, CMake, tools
|
||||||
from conan.tools.files import get, collect_libs
|
|
||||||
from conan.tools.cmake import CMakeToolchain, CMake, CMakeDeps, cmake_layout
|
|
||||||
|
|
||||||
|
|
||||||
class PagedGeometryConan(ConanFile):
|
class PagedGeometryConan(ConanFile):
|
||||||
@ -9,22 +7,17 @@ class PagedGeometryConan(ConanFile):
|
|||||||
url = "https://github.com/RigsOfRods/Caelum/issues"
|
url = "https://github.com/RigsOfRods/Caelum/issues"
|
||||||
description = "PagedGeometry is a plugin for OGRE for rendering of dense vegetation "
|
description = "PagedGeometry is a plugin for OGRE for rendering of dense vegetation "
|
||||||
settings = "os", "compiler", "build_type", "arch"
|
settings = "os", "compiler", "build_type", "arch"
|
||||||
|
generators = "cmake_find_package"
|
||||||
def layout(self):
|
exports_sources = "patches/**"
|
||||||
cmake_layout(self)
|
|
||||||
|
|
||||||
def requirements(self):
|
def requirements(self):
|
||||||
self.requires("ogre3d/[13.x]@anotherfoxguy/stable")
|
for req in self.conan_data["requirements"][self.version]:
|
||||||
self.requires("libpng/1.6.38")
|
self.requires(req)
|
||||||
|
|
||||||
def source(self):
|
def source(self):
|
||||||
get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
tools.get(**self.conan_data["sources"][self.version], strip_root=True)
|
||||||
|
for patch in self.conan_data["patches"][self.version]:
|
||||||
def generate(self):
|
tools.patch(**patch)
|
||||||
tc = CMakeToolchain(self)
|
|
||||||
tc.generate()
|
|
||||||
deps = CMakeDeps(self)
|
|
||||||
deps.generate()
|
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
cmake = CMake(self)
|
cmake = CMake(self)
|
||||||
@ -36,15 +29,12 @@ class PagedGeometryConan(ConanFile):
|
|||||||
cmake.install()
|
cmake.install()
|
||||||
|
|
||||||
def package_info(self):
|
def package_info(self):
|
||||||
self.cpp_info.set_property("cmake_module_file_name", "PagedGeometry")
|
self.cpp_info.name = "PagedGeometry"
|
||||||
self.cpp_info.set_property("cmake_module_target_name", "PagedGeometry::PagedGeometry")
|
|
||||||
self.cpp_info.set_property("cmake_file_name", "PagedGeometry")
|
|
||||||
self.cpp_info.set_property("cmake_target_name", "PagedGeometry::PagedGeometry")
|
|
||||||
self.cpp_info.includedirs = [
|
self.cpp_info.includedirs = [
|
||||||
'include',
|
'include',
|
||||||
'include/PagedGeometry'
|
'include/PagedGeometry'
|
||||||
]
|
]
|
||||||
self.cpp_info.libs = collect_libs(self)
|
self.cpp_info.libs = tools.collect_libs(self)
|
||||||
|
|
||||||
def package_id(self):
|
def package_id(self):
|
||||||
self.info.requires["ogre3d"].full_recipe_mode()
|
self.info.requires["ogre3d"].full_recipe_mode()
|
20
ogre-pagedgeometry/all/patches/1.3.0/CMakeLists.txt.patch
Normal file
20
ogre-pagedgeometry/all/patches/1.3.0/CMakeLists.txt.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
--- CMakeLists.txt
|
||||||
|
+++ CMakeLists.txt
|
||||||
|
@@ -7,7 +7,7 @@
|
||||||
|
# cmake system for PagedGeometry updated on 2-9-2021 by Edgar{at}AnotherFoxGuy{DOT}com
|
||||||
|
|
||||||
|
cmake_minimum_required(VERSION 3.0.2)
|
||||||
|
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
|
||||||
|
+set(CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR} ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
|
||||||
|
|
||||||
|
# define the project
|
||||||
|
project(
|
||||||
|
@@ -101,7 +101,7 @@
|
||||||
|
ENDIF ()
|
||||||
|
|
||||||
|
# --- Ogre 3D graphics engine ---
|
||||||
|
-find_package(OGRE REQUIRED CONFIG)
|
||||||
|
+find_package(OGRE REQUIRED)
|
||||||
|
|
||||||
|
# now add the directories
|
||||||
|
add_subdirectory(source)
|
@ -1,20 +0,0 @@
|
|||||||
--- CMakeLists.txt
|
|
||||||
+++ CMakeLists.txt
|
|
||||||
@@ -8,6 +8,8 @@
|
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.1)
|
|
||||||
|
|
||||||
+set(CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR} ${CMAKE_MODULE_PATH})
|
|
||||||
+
|
|
||||||
# define the project
|
|
||||||
project(
|
|
||||||
PagedGeometry
|
|
||||||
@@ -100,7 +102,7 @@
|
|
||||||
ENDIF ()
|
|
||||||
|
|
||||||
# --- Ogre 3D graphics engine ---
|
|
||||||
-find_package(OGRE REQUIRED CONFIG)
|
|
||||||
+find_package(OGRE REQUIRED)
|
|
||||||
|
|
||||||
# now add the directories
|
|
||||||
add_subdirectory(source)
|
|
@ -1,5 +1,5 @@
|
|||||||
versions:
|
versions:
|
||||||
"1.2.0":
|
"1.2.0":
|
||||||
folder: all
|
folder: all
|
||||||
"2022.08":
|
"1.3.0":
|
||||||
folder: all
|
folder: all
|
||||||
|
@ -4,7 +4,14 @@ sources:
|
|||||||
sha256: "31c84051ffe9a3710c553cfa27ebda7b176c9dfe3b4d2a113d4f02caf48ecd5b"
|
sha256: "31c84051ffe9a3710c553cfa27ebda7b176c9dfe3b4d2a113d4f02caf48ecd5b"
|
||||||
patches:
|
patches:
|
||||||
"1.11.6.1":
|
"1.11.6.1":
|
||||||
- patch_file: "patches/1.11.6.1/FixFreeImage.patch"
|
- patch_file: "patches/1.11.6.1/CMakeLists.txt.patch"
|
||||||
- patch_file: "patches/1.11.6.1/FixSamples.patch"
|
- patch_file: "patches/1.11.6.1/Samples-CMakeList.txt.patch"
|
||||||
- patch_file: "patches/1.11.6.1/FixOverlay.patch"
|
- patch_file: "patches/1.11.6.1/FixOverlayCMakeLists.txt.patch"
|
||||||
- patch_file: "patches/1.11.6.1/scriptlexer.patch"
|
- patch_file: "patches/1.11.6.1/scriptlexer.patch"
|
||||||
|
requirements:
|
||||||
|
- "zlib/[1.x]"
|
||||||
|
- "zziplib/[0.13.x]"
|
||||||
|
- "freetype/[2.x]"
|
||||||
|
- "freeimage/[3.x]"
|
||||||
|
- "cg-toolkit/3.1@anotherfoxguy/stable"
|
||||||
|
- "pugixml/[1.x]"
|
@ -1,8 +1,7 @@
|
|||||||
from conan import ConanFile
|
import shutil
|
||||||
from conan.tools.files import get, collect_libs, rmdir, replace_in_file, apply_conandata_patches, export_conandata_patches
|
from conans import ConanFile, CMake, tools
|
||||||
from conan.tools.cmake import CMakeToolchain, CMake, CMakeDeps, cmake_layout
|
from conans.tools import os_info, SystemPackageTool
|
||||||
from conan.tools.system.package_manager import Apt
|
|
||||||
import os
|
|
||||||
|
|
||||||
class OGREConan(ConanFile):
|
class OGREConan(ConanFile):
|
||||||
name = "ogre3d"
|
name = "ogre3d"
|
||||||
@ -10,93 +9,88 @@ class OGREConan(ConanFile):
|
|||||||
url = "https://github.com/AnotherFoxGuy/conan-OGRE"
|
url = "https://github.com/AnotherFoxGuy/conan-OGRE"
|
||||||
description = "scene-oriented, flexible 3D engine written in C++"
|
description = "scene-oriented, flexible 3D engine written in C++"
|
||||||
settings = "os", "compiler", "build_type", "arch"
|
settings = "os", "compiler", "build_type", "arch"
|
||||||
|
generators = "cmake_paths", "cmake_find_package"
|
||||||
def export_sources(self):
|
exports_sources = "patches/**"
|
||||||
export_conandata_patches(self)
|
|
||||||
|
|
||||||
def layout(self):
|
|
||||||
cmake_layout(self)
|
|
||||||
|
|
||||||
def requirements(self):
|
def requirements(self):
|
||||||
self.requires("zlib/[~1]")
|
for req in self.conan_data["requirements"]:
|
||||||
self.requires("zziplib/[~0]")
|
self.requires(req)
|
||||||
self.requires("freetype/[~2]")
|
|
||||||
self.requires("freeimage/[~3]")
|
if os_info.is_windows:
|
||||||
self.requires("cg-toolkit/3.1@anotherfoxguy/stable")
|
|
||||||
self.requires("pugixml/[~1]")
|
|
||||||
if self.settings.os == "Windows":
|
|
||||||
self.requires("directx-sdk/9.0@anotherfoxguy/stable")
|
self.requires("directx-sdk/9.0@anotherfoxguy/stable")
|
||||||
|
|
||||||
def system_requirements(self):
|
def system_requirements(self):
|
||||||
Apt(self).install([
|
if os_info.is_linux:
|
||||||
"libx11-dev",
|
if os_info.with_apt:
|
||||||
"libxaw7-dev",
|
installer = SystemPackageTool()
|
||||||
"libxrandr-dev",
|
installer.install("libgles2-mesa-dev")
|
||||||
"libgles2-mesa-dev",
|
installer.install("libglu1-mesa-dev")
|
||||||
"libvulkan-dev",
|
installer.install("libx11-dev")
|
||||||
"glslang-dev"
|
installer.install("libxaw7-dev")
|
||||||
], check=True)
|
installer.install("libxrandr-dev")
|
||||||
|
installer.install("libxt-dev")
|
||||||
|
|
||||||
def source(self):
|
def source(self):
|
||||||
get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
tools.get(**self.conan_data["sources"][self.version], strip_root=True)
|
||||||
|
tools.replace_in_file(
|
||||||
def generate(self):
|
"CMake/Dependencies.cmake",
|
||||||
tc = CMakeToolchain(self)
|
|
||||||
tc.variables["OGRE_BUILD_COMPONENT_BITES"] = "ON"
|
|
||||||
tc.variables["OGRE_BUILD_COMPONENT_CSHARP"] = "OFF"
|
|
||||||
tc.variables["OGRE_BUILD_COMPONENT_JAVA"] = "OFF"
|
|
||||||
tc.variables["OGRE_BUILD_COMPONENT_OVERLAY_IMGUI"] = "ON"
|
|
||||||
tc.variables["OGRE_BUILD_COMPONENT_PYTHON"] = "OFF"
|
|
||||||
tc.variables["OGRE_BUILD_DEPENDENCIES"] = "OFF"
|
|
||||||
tc.variables["OGRE_BUILD_PLUGIN_STBI"] = "ON"
|
|
||||||
tc.variables["OGRE_BUILD_PLUGIN_EXRCODEC"] = "OFF"
|
|
||||||
tc.variables["OGRE_BUILD_RENDERSYSTEM_D3D11"] = "ON"
|
|
||||||
tc.variables["OGRE_BUILD_RENDERSYSTEM_D3D9"] = "ON"
|
|
||||||
tc.variables["OGRE_BUILD_RENDERSYSTEM_GL3PLUS"] = "OFF"
|
|
||||||
tc.variables["OGRE_BUILD_SAMPLES"] = "OFF"
|
|
||||||
tc.variables["OGRE_INSTALL_SAMPLES"] = "OFF"
|
|
||||||
tc.variables["OGRE_RESOURCEMANAGER_STRICT"] = 0
|
|
||||||
|
|
||||||
if self.settings.os == "Windows":
|
|
||||||
tc.variables["CMAKE_CXX_FLAGS"] = "-D_OGRE_FILESYSTEM_ARCHIVE_UNICODE"
|
|
||||||
tc.generate()
|
|
||||||
deps = CMakeDeps(self)
|
|
||||||
deps.generate()
|
|
||||||
|
|
||||||
def _patch_sources(self):
|
|
||||||
apply_conandata_patches(self)
|
|
||||||
replace_in_file(self,
|
|
||||||
os.path.join(self.source_folder, "CMake/Dependencies.cmake"),
|
|
||||||
"find_package(DirectX)",
|
"find_package(DirectX)",
|
||||||
"find_package(DirectX9)",
|
"find_package(DirectX9)",
|
||||||
)
|
)
|
||||||
replace_in_file(self,
|
tools.replace_in_file(
|
||||||
os.path.join(self.source_folder, "CMake/Packages/FindDirectX11.cmake"),
|
"CMake/Dependencies.cmake",
|
||||||
|
"find_package(FreeImage)",
|
||||||
|
"find_package(ConanFreeImage)",
|
||||||
|
)
|
||||||
|
tools.replace_in_file(
|
||||||
|
"CMake/Dependencies.cmake",
|
||||||
|
"find_package(ZZip)",
|
||||||
|
"find_package(ConanZZip)",
|
||||||
|
)
|
||||||
|
tools.replace_in_file(
|
||||||
|
"CMake/Packages/FindDirectX11.cmake",
|
||||||
'find_path(DirectX11_INCLUDE_DIR NAMES d3d11.h HINTS "',
|
'find_path(DirectX11_INCLUDE_DIR NAMES d3d11.h HINTS "',
|
||||||
'find_path(DirectX11_INCLUDE_DIR NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NAMES d3d11.h HINTS "',
|
'find_path(DirectX11_INCLUDE_DIR NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NAMES d3d11.h HINTS "',
|
||||||
)
|
)
|
||||||
|
shutil.copyfile(
|
||||||
|
"patches/FindFreeImage.cmake", "CMake/Packages/FindConanFreeImage.cmake"
|
||||||
|
)
|
||||||
|
shutil.copyfile("patches/FindZZip.cmake", "CMake/Packages/FindConanZZip.cmake")
|
||||||
|
for patch in self.conan_data["patches"][self.version]:
|
||||||
|
tools.patch(**patch)
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
self._patch_sources()
|
|
||||||
cmake = CMake(self)
|
cmake = CMake(self)
|
||||||
|
cmake.definitions["OGRE_BUILD_COMPONENT_BITES"] = "ON"
|
||||||
|
cmake.definitions["OGRE_BUILD_COMPONENT_CSHARP"] = "OFF"
|
||||||
|
cmake.definitions["OGRE_BUILD_COMPONENT_JAVA"] = "OFF"
|
||||||
|
cmake.definitions["OGRE_BUILD_COMPONENT_OVERLAY_IMGUI"] = "ON"
|
||||||
|
cmake.definitions["OGRE_BUILD_COMPONENT_PYTHON"] = "OFF"
|
||||||
|
cmake.definitions["OGRE_BUILD_DEPENDENCIES"] = "OFF"
|
||||||
|
cmake.definitions["OGRE_BUILD_PLUGIN_STBI"] = "ON"
|
||||||
|
cmake.definitions["OGRE_BUILD_PLUGIN_EXRCODEC"] = "OFF"
|
||||||
|
cmake.definitions["OGRE_BUILD_RENDERSYSTEM_D3D11"] = "ON"
|
||||||
|
cmake.definitions["OGRE_BUILD_RENDERSYSTEM_D3D9"] = "ON"
|
||||||
|
cmake.definitions["OGRE_BUILD_RENDERSYSTEM_GL3PLUS"] = "OFF"
|
||||||
|
cmake.definitions["OGRE_BUILD_SAMPLES"] = "OFF"
|
||||||
|
cmake.definitions["OGRE_INSTALL_SAMPLES"] = "OFF"
|
||||||
|
cmake.definitions["OGRE_RESOURCEMANAGER_STRICT"] = 0
|
||||||
|
if os_info.is_windows:
|
||||||
|
cmake.definitions["CMAKE_CXX_FLAGS"] = "-D_OGRE_FILESYSTEM_ARCHIVE_UNICODE"
|
||||||
cmake.configure()
|
cmake.configure()
|
||||||
cmake.build()
|
cmake.build()
|
||||||
|
|
||||||
def package(self):
|
def package(self):
|
||||||
cmake = CMake(self)
|
cmake = CMake(self)
|
||||||
cmake.install()
|
cmake.install()
|
||||||
rmdir(self, os.path.join(self.package_folder, "CMake"))
|
|
||||||
rmdir(self, os.path.join(self.package_folder, "Docs"))
|
|
||||||
|
|
||||||
def package_info(self):
|
def package_info(self):
|
||||||
self.cpp_info.set_property("cmake_module_file_name", "OGRE")
|
self.cpp_info.name = "OGRE"
|
||||||
self.cpp_info.set_property("cmake_module_target_name", "OGRE::OGRE")
|
|
||||||
self.cpp_info.set_property("cmake_file_name", "OGRE")
|
|
||||||
self.cpp_info.set_property("cmake_target_name", "OGRE::OGRE")
|
|
||||||
self.cpp_info.includedirs = [
|
self.cpp_info.includedirs = [
|
||||||
"include",
|
"include",
|
||||||
"include/OGRE",
|
"include/OGRE",
|
||||||
"include/OGRE/Bites",
|
"include/OGRE/Bites",
|
||||||
|
"include/OGRE/HLMS",
|
||||||
"include/OGRE/MeshLodGenerator",
|
"include/OGRE/MeshLodGenerator",
|
||||||
"include/OGRE/Overlay",
|
"include/OGRE/Overlay",
|
||||||
"include/OGRE/Paging",
|
"include/OGRE/Paging",
|
||||||
@ -108,4 +102,4 @@ class OGREConan(ConanFile):
|
|||||||
"include/OGRE/Threading",
|
"include/OGRE/Threading",
|
||||||
"include/OGRE/Volume",
|
"include/OGRE/Volume",
|
||||||
]
|
]
|
||||||
self.cpp_info.libs = collect_libs(self)
|
self.cpp_info.libs = tools.collect_libs(self)
|
||||||
|
20
ogre/1.11/patches/1.11.6.1/CMakeLists.txt.patch
Normal file
20
ogre/1.11/patches/1.11.6.1/CMakeLists.txt.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
--- CMakeLists.txt
|
||||||
|
+++ CMakeLists.txt
|
||||||
|
@@ -16,6 +16,8 @@
|
||||||
|
|
||||||
|
cmake_minimum_required(VERSION 3.3.0)
|
||||||
|
|
||||||
|
+include(${CMAKE_BINARY_DIR}/conan_paths.cmake)
|
||||||
|
+
|
||||||
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||||
|
@@ -63,6 +65,7 @@
|
||||||
|
|
||||||
|
# Include necessary submodules
|
||||||
|
set(CMAKE_MODULE_PATH
|
||||||
|
+ "${CMAKE_BINARY_DIR}"
|
||||||
|
"${PROJECT_SOURCE_DIR}/CMake"
|
||||||
|
"${PROJECT_SOURCE_DIR}/CMake/Utils"
|
||||||
|
"${PROJECT_SOURCE_DIR}/CMake/Packages"
|
||||||
|
|
@ -1,11 +0,0 @@
|
|||||||
--- a/PlugIns/FreeImageCodec/CMakeLists.txt
|
|
||||||
+++ b/PlugIns/FreeImageCodec/CMakeLists.txt
|
|
||||||
@@ -13,7 +13,7 @@ set(SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/OgreFreeImageCodec.cpp")
|
|
||||||
|
|
||||||
add_definitions(-DFREEIMAGE_LIB)
|
|
||||||
add_library(Codec_FreeImage ${OGRE_LIB_TYPE} ${HEADER_FILES} ${SOURCES})
|
|
||||||
-target_link_libraries(Codec_FreeImage PUBLIC OgreMain ${FreeImage_LIBRARIES})
|
|
||||||
+target_link_libraries(Codec_FreeImage PUBLIC OgreMain freeimage::FreeImage)
|
|
||||||
target_include_directories(Codec_FreeImage PUBLIC
|
|
||||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
|
|
||||||
$<INSTALL_INTERFACE:include/OGRE/Plugins/FreeImageCodec>
|
|
@ -1,13 +1,11 @@
|
|||||||
diff --git a/Components/Overlay/CMakeLists.txt b/Components/Overlay/CMakeLists.txt
|
--- Components/Overlay/CMakeLists.txt
|
||||||
index 1ed646080..3f0b75c33 100644
|
+++ Components/Overlay/CMakeLists.txt
|
||||||
--- a/Components/Overlay/CMakeLists.txt
|
@@ -21,7 +21,7 @@
|
||||||
+++ b/Components/Overlay/CMakeLists.txt
|
|
||||||
@@ -21,7 +21,7 @@ file(GLOB SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
|
|
||||||
# setup target
|
# setup target
|
||||||
add_library(OgreOverlay ${OGRE_COMP_LIB_TYPE} ${HEADER_FILES} ${SOURCE_FILES} ${PLATFORM_HEADER_FILES} ${PLATFORM_SOURCE_FILES})
|
add_library(OgreOverlay ${OGRE_COMP_LIB_TYPE} ${HEADER_FILES} ${SOURCE_FILES} ${PLATFORM_HEADER_FILES} ${PLATFORM_SOURCE_FILES})
|
||||||
set_target_properties(OgreOverlay PROPERTIES VERSION ${OGRE_SOVERSION} SOVERSION ${OGRE_SOVERSION})
|
set_target_properties(OgreOverlay PROPERTIES VERSION ${OGRE_SOVERSION} SOVERSION ${OGRE_SOVERSION})
|
||||||
-target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE "${FREETYPE_LIBRARIES}" ZLIB::ZLIB)
|
-target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE "${FREETYPE_LIBRARIES}" ZLIB::ZLIB)
|
||||||
+target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE freetype ZLIB::ZLIB)
|
+target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE Freetype::Freetype ZLIB::ZLIB)
|
||||||
target_include_directories(OgreOverlay PUBLIC
|
target_include_directories(OgreOverlay PUBLIC
|
||||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
|
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
|
||||||
$<INSTALL_INTERFACE:include/OGRE/Overlay>
|
$<INSTALL_INTERFACE:include/OGRE/Overlay>
|
@ -23,70 +23,43 @@ sources:
|
|||||||
"13.4.4":
|
"13.4.4":
|
||||||
url: "https://github.com/OGRECave/ogre/archive/refs/tags/v13.4.4.tar.gz"
|
url: "https://github.com/OGRECave/ogre/archive/refs/tags/v13.4.4.tar.gz"
|
||||||
sha256: "7cf05dbb3acbfc9326daecb60429a8ae9ce7625fb425e6a29de00cf77454596f"
|
sha256: "7cf05dbb3acbfc9326daecb60429a8ae9ce7625fb425e6a29de00cf77454596f"
|
||||||
"13.5.0":
|
|
||||||
url: "https://github.com/OGRECave/ogre/archive/refs/tags/v13.5.0.tar.gz"
|
|
||||||
sha256: "94d514d03d421c43af09e916ecd127685e15afed62e2f4cde8949b7818bc4900"
|
|
||||||
"13.5.1":
|
|
||||||
url: "https://github.com/OGRECave/ogre/archive/refs/tags/v13.5.1.tar.gz"
|
|
||||||
sha256: "ce7e0c65d3395ad214567bdd616ee20df16769f452f1fd3e1ac6c5970890df81"
|
|
||||||
"13.5.2":
|
|
||||||
url: "https://github.com/OGRECave/ogre/archive/refs/tags/v13.5.2.tar.gz"
|
|
||||||
sha256: "165d4c7cfdf4a6026398a8ca466c6e656118569b549eaf37b6de68d843012d1f"
|
|
||||||
"13.5.3":
|
|
||||||
url: "https://github.com/OGRECave/ogre/archive/refs/tags/v13.5.3.tar.gz"
|
|
||||||
sha256: "8f966174cd537a1eb3da763d86a1da29ab8465ca29a54093bba3457b53bbde29"
|
|
||||||
"13.6.0":
|
|
||||||
url: "https://github.com/OGRECave/ogre/archive/refs/tags/v13.6.0.tar.gz"
|
|
||||||
sha256: "d32e58ad18d5fd9518f6a0dff4e566c281adc7a458b8231aa730983a8646bf95"
|
|
||||||
"13.6.1":
|
|
||||||
url: "https://github.com/OGRECave/ogre/archive/refs/tags/v13.6.1.tar.gz"
|
|
||||||
sha256: "9fe7410fec4852daf83a52cc137226592430696b1c96896f97f677d90421a44c"
|
|
||||||
"13.6.2":
|
|
||||||
url: "https://github.com/OGRECave/ogre/archive/refs/tags/v13.6.2.tar.gz"
|
|
||||||
sha256: "76b6e7708a429bae8bf2974569eac759604c7175a43a04cfe4e43eef0ad17abf"
|
|
||||||
patches:
|
patches:
|
||||||
"13.2.4":
|
"13.2.4":
|
||||||
|
- patch_file: "patches/13.2.4/CMakeLists.txt.patch"
|
||||||
- patch_file: "patches/13.2.4/pugixml-fix.patch"
|
- patch_file: "patches/13.2.4/pugixml-fix.patch"
|
||||||
- patch_file: "patches/13.2.4/FindPkgMacros.cmake.patch"
|
- patch_file: "patches/13.2.4/FindPkgMacros.cmake.patch"
|
||||||
"13.3.1":
|
"13.3.1":
|
||||||
|
- patch_file: "patches/13.3.1/CMakeLists.txt.patch"
|
||||||
- patch_file: "patches/13.3.1/pugixml-fix.patch"
|
- patch_file: "patches/13.3.1/pugixml-fix.patch"
|
||||||
- patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
|
- patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
|
||||||
"13.3.2":
|
"13.3.2":
|
||||||
|
- patch_file: "patches/13.3.1/CMakeLists.txt.patch"
|
||||||
- patch_file: "patches/13.3.1/pugixml-fix.patch"
|
- patch_file: "patches/13.3.1/pugixml-fix.patch"
|
||||||
- patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
|
- patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
|
||||||
"13.3.3":
|
"13.3.3":
|
||||||
|
- patch_file: "patches/13.3.1/CMakeLists.txt.patch"
|
||||||
- patch_file: "patches/13.3.1/pugixml-fix.patch"
|
- patch_file: "patches/13.3.1/pugixml-fix.patch"
|
||||||
- patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
|
- patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
|
||||||
"13.4.1":
|
"13.4.1":
|
||||||
|
- patch_file: "patches/13.3.1/CMakeLists.txt.patch"
|
||||||
- patch_file: "patches/13.3.1/pugixml-fix.patch"
|
- patch_file: "patches/13.3.1/pugixml-fix.patch"
|
||||||
- patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
|
- patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
|
||||||
"13.4.2":
|
"13.4.2":
|
||||||
|
- patch_file: "patches/13.3.1/CMakeLists.txt.patch"
|
||||||
- patch_file: "patches/13.3.1/pugixml-fix.patch"
|
- patch_file: "patches/13.3.1/pugixml-fix.patch"
|
||||||
- patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
|
- patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
|
||||||
"13.4.3":
|
"13.4.3":
|
||||||
|
- patch_file: "patches/13.3.1/CMakeLists.txt.patch"
|
||||||
- patch_file: "patches/13.3.1/pugixml-fix.patch"
|
- patch_file: "patches/13.3.1/pugixml-fix.patch"
|
||||||
- patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
|
- patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
|
||||||
"13.4.4":
|
"13.4.4":
|
||||||
|
- patch_file: "patches/13.3.1/CMakeLists.txt.patch"
|
||||||
- patch_file: "patches/13.3.1/pugixml-fix.patch"
|
- patch_file: "patches/13.3.1/pugixml-fix.patch"
|
||||||
- patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
|
- patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
|
||||||
"13.5.0":
|
requirements:
|
||||||
- patch_file: "patches/13.3.1/pugixml-fix.patch"
|
- "zlib/[1.x]"
|
||||||
- patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
|
- "zziplib/[0.13.x]"
|
||||||
"13.5.1":
|
- "freetype/[2.x]"
|
||||||
- patch_file: "patches/13.3.1/pugixml-fix.patch"
|
- "freeimage/[3.x]"
|
||||||
- patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
|
- "cg-toolkit/3.1@anotherfoxguy/stable"
|
||||||
"13.5.2":
|
- "pugixml/[1.x]"
|
||||||
- patch_file: "patches/13.3.1/pugixml-fix.patch"
|
|
||||||
- patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
|
|
||||||
"13.5.3":
|
|
||||||
- patch_file: "patches/13.3.1/pugixml-fix.patch"
|
|
||||||
- patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
|
|
||||||
"13.6.0":
|
|
||||||
- patch_file: "patches/13.3.1/pugixml-fix.patch"
|
|
||||||
- patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
|
|
||||||
"13.6.1":
|
|
||||||
- patch_file: "patches/13.3.1/pugixml-fix.patch"
|
|
||||||
- patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
|
|
||||||
"13.6.2":
|
|
||||||
- patch_file: "patches/13.3.1/pugixml-fix.patch"
|
|
||||||
- patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
|
|
@ -1,8 +1,7 @@
|
|||||||
from conan import ConanFile
|
import shutil
|
||||||
from conan.tools.files import get, collect_libs, rmdir, replace_in_file, apply_conandata_patches, export_conandata_patches
|
from conans import ConanFile, CMake, tools
|
||||||
from conan.tools.cmake import CMakeToolchain, CMake, CMakeDeps, cmake_layout
|
from conans.tools import os_info, SystemPackageTool
|
||||||
from conan.tools.system.package_manager import Apt
|
|
||||||
import os
|
|
||||||
|
|
||||||
class OGREConan(ConanFile):
|
class OGREConan(ConanFile):
|
||||||
name = "ogre3d"
|
name = "ogre3d"
|
||||||
@ -10,129 +9,117 @@ class OGREConan(ConanFile):
|
|||||||
url = "https://github.com/AnotherFoxGuy/conan-OGRE"
|
url = "https://github.com/AnotherFoxGuy/conan-OGRE"
|
||||||
description = "scene-oriented, flexible 3D engine written in C++"
|
description = "scene-oriented, flexible 3D engine written in C++"
|
||||||
settings = "os", "compiler", "build_type", "arch"
|
settings = "os", "compiler", "build_type", "arch"
|
||||||
|
generators = "cmake_find_package"
|
||||||
|
exports_sources = "patches/**"
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
"resourcemanager_strict": ["off", "pedantic", "strict"],
|
"resourcemanager_strict": ["off", "pedantic", "strict"],
|
||||||
"nodeless_positioning": [True, False],
|
"nodeless_positioning": [True, False],
|
||||||
"codec_rsimage": [True, False],
|
|
||||||
}
|
}
|
||||||
|
|
||||||
default_options = {
|
default_options = {
|
||||||
"resourcemanager_strict": "strict",
|
"resourcemanager_strict": "strict",
|
||||||
"nodeless_positioning": False,
|
"nodeless_positioning": False,
|
||||||
"codec_rsimage": False,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def export_sources(self):
|
_cmake = None
|
||||||
export_conandata_patches(self)
|
|
||||||
|
|
||||||
def layout(self):
|
def _configure_cmake(self):
|
||||||
cmake_layout(self)
|
if self._cmake:
|
||||||
|
return self._cmake
|
||||||
|
self._cmake = CMake(self)
|
||||||
|
|
||||||
|
self._cmake.definitions["OGRE_BUILD_COMPONENT_BITES"] = "ON"
|
||||||
|
self._cmake.definitions["OGRE_BUILD_COMPONENT_CSHARP"] = "OFF"
|
||||||
|
self._cmake.definitions["OGRE_BUILD_COMPONENT_JAVA"] = "OFF"
|
||||||
|
self._cmake.definitions["OGRE_BUILD_COMPONENT_OVERLAY_IMGUI"] = "ON"
|
||||||
|
self._cmake.definitions["OGRE_BUILD_COMPONENT_PYTHON"] = "OFF"
|
||||||
|
self._cmake.definitions["OGRE_BUILD_DEPENDENCIES"] = "OFF"
|
||||||
|
self._cmake.definitions["OGRE_BUILD_PLUGIN_DOT_SCENE"] = "OFF"
|
||||||
|
self._cmake.definitions["OGRE_BUILD_PLUGIN_STBI"] = "ON"
|
||||||
|
self._cmake.definitions["OGRE_BUILD_PLUGIN_EXRCODEC"] = "OFF"
|
||||||
|
self._cmake.definitions["OGRE_BUILD_RENDERSYSTEM_D3D11"] = "ON"
|
||||||
|
self._cmake.definitions["OGRE_BUILD_RENDERSYSTEM_D3D9"] = "ON"
|
||||||
|
self._cmake.definitions["OGRE_BUILD_RENDERSYSTEM_GL3PLUS"] = "OFF"
|
||||||
|
self._cmake.definitions["OGRE_BUILD_SAMPLES"] = "OFF"
|
||||||
|
self._cmake.definitions["OGRE_COPY_DEPENDENCIES"] = "OFF"
|
||||||
|
self._cmake.definitions["OGRE_INSTALL_DEPENDENCIES"] = "OFF"
|
||||||
|
self._cmake.definitions["OGRE_INSTALL_SAMPLES"] = "OFF"
|
||||||
|
self._cmake.definitions[
|
||||||
|
"OGRE_NODELESS_POSITIONING"
|
||||||
|
] = self.options.nodeless_positioning
|
||||||
|
|
||||||
|
if self.options.resourcemanager_strict == "off":
|
||||||
|
self._cmake.definitions["OGRE_RESOURCEMANAGER_STRICT"] = 0
|
||||||
|
elif self.options.resourcemanager_strict == "pedantic":
|
||||||
|
self._cmake.definitions["OGRE_RESOURCEMANAGER_STRICT"] = 1
|
||||||
|
else:
|
||||||
|
self._cmake.definitions["OGRE_RESOURCEMANAGER_STRICT"] = 2
|
||||||
|
|
||||||
|
if os_info.is_windows:
|
||||||
|
self._cmake.definitions[
|
||||||
|
"CMAKE_CXX_FLAGS"
|
||||||
|
] = "-D_OGRE_FILESYSTEM_ARCHIVE_UNICODE"
|
||||||
|
|
||||||
|
self._cmake.configure()
|
||||||
|
return self._cmake
|
||||||
|
|
||||||
def requirements(self):
|
def requirements(self):
|
||||||
self.requires("zlib/[1.x]")
|
for req in self.conan_data["requirements"]:
|
||||||
self.requires("zziplib/[0.13.x]")
|
self.requires(req)
|
||||||
self.requires("freetype/[2.x]")
|
|
||||||
self.requires("freeimage/[3.x]")
|
if os_info.is_windows:
|
||||||
self.requires("cg-toolkit/3.1@anotherfoxguy/stable")
|
|
||||||
self.requires("pugixml/[1.x]")
|
|
||||||
self.requires("libpng/1.6.38")
|
|
||||||
self.requires("sdl/[2.x]")
|
|
||||||
if self.settings.os == "Windows":
|
|
||||||
self.requires("directx-sdk/9.0@anotherfoxguy/stable")
|
self.requires("directx-sdk/9.0@anotherfoxguy/stable")
|
||||||
|
|
||||||
def system_requirements(self):
|
def system_requirements(self):
|
||||||
Apt(self).install([
|
if os_info.is_linux:
|
||||||
"libx11-dev",
|
if os_info.with_apt:
|
||||||
"libxaw7-dev",
|
installer = SystemPackageTool()
|
||||||
"libxrandr-dev",
|
installer.install("libx11-dev")
|
||||||
"libgles2-mesa-dev",
|
installer.install("libxaw7-dev")
|
||||||
"libvulkan-dev",
|
installer.install("libxrandr-dev")
|
||||||
"glslang-dev"
|
installer.install("libgles2-mesa-dev")
|
||||||
], check=True)
|
installer.install("libvulkan-dev")
|
||||||
|
installer.install("glslang-dev")
|
||||||
|
|
||||||
def source(self):
|
def source(self):
|
||||||
get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
tools.get(**self.conan_data["sources"][self.version], strip_root=True)
|
||||||
|
tools.replace_in_file(
|
||||||
def generate(self):
|
"CMake/Dependencies.cmake",
|
||||||
tc = CMakeToolchain(self)
|
|
||||||
tc.variables["OGRE_BUILD_COMPONENT_BITES"] = "ON"
|
|
||||||
tc.variables["OGRE_BUILD_COMPONENT_CSHARP"] = "OFF"
|
|
||||||
tc.variables["OGRE_BUILD_COMPONENT_JAVA"] = "OFF"
|
|
||||||
tc.variables["OGRE_BUILD_COMPONENT_OVERLAY_IMGUI"] = "ON"
|
|
||||||
tc.variables["OGRE_BUILD_COMPONENT_PYTHON"] = "OFF"
|
|
||||||
tc.variables["OGRE_BUILD_COMPONENT_BULLET"] = "OFF"
|
|
||||||
tc.variables["OGRE_BUILD_DEPENDENCIES"] = "OFF"
|
|
||||||
tc.variables["OGRE_BUILD_PLUGIN_DOT_SCENE"] = "OFF"
|
|
||||||
tc.variables["OGRE_BUILD_PLUGIN_STBI"] = "ON"
|
|
||||||
tc.variables["OGRE_BUILD_PLUGIN_EXRCODEC"] = "OFF"
|
|
||||||
tc.variables["OGRE_BUILD_RENDERSYSTEM_D3D11"] = "ON"
|
|
||||||
tc.variables["OGRE_BUILD_RENDERSYSTEM_D3D9"] = "ON"
|
|
||||||
tc.variables["OGRE_BUILD_RENDERSYSTEM_GL3PLUS"] = "OFF"
|
|
||||||
tc.variables["OGRE_BUILD_SAMPLES"] = "OFF"
|
|
||||||
tc.variables["OGRE_COPY_DEPENDENCIES"] = "OFF"
|
|
||||||
tc.variables["OGRE_INSTALL_DEPENDENCIES"] = "OFF"
|
|
||||||
tc.variables["OGRE_INSTALL_SAMPLES"] = "OFF"
|
|
||||||
tc.variables["OGRE_BUILD_PLUGIN_RSIMAGE"] = self.options.codec_rsimage
|
|
||||||
tc.variables["OGRE_NODELESS_POSITIONING"] = self.options.nodeless_positioning
|
|
||||||
|
|
||||||
if self.options.resourcemanager_strict == "off":
|
|
||||||
tc.variables["OGRE_RESOURCEMANAGER_STRICT"] = 0
|
|
||||||
elif self.options.resourcemanager_strict == "pedantic":
|
|
||||||
tc.variables["OGRE_RESOURCEMANAGER_STRICT"] = 1
|
|
||||||
else:
|
|
||||||
tc.variables["OGRE_RESOURCEMANAGER_STRICT"] = 2
|
|
||||||
|
|
||||||
if self.settings.os == "Windows":
|
|
||||||
tc.variables["CMAKE_CXX_FLAGS"] = "-D_OGRE_FILESYSTEM_ARCHIVE_UNICODE"
|
|
||||||
tc.generate()
|
|
||||||
deps = CMakeDeps(self)
|
|
||||||
deps.generate()
|
|
||||||
|
|
||||||
def _patch_sources(self):
|
|
||||||
apply_conandata_patches(self)
|
|
||||||
replace_in_file(self,
|
|
||||||
os.path.join(self.source_folder, "CMake/Dependencies.cmake"),
|
|
||||||
"find_package(DirectX)",
|
"find_package(DirectX)",
|
||||||
"find_package(DirectX9)",
|
"find_package(DirectX9)",
|
||||||
)
|
)
|
||||||
replace_in_file(self,
|
tools.replace_in_file(
|
||||||
os.path.join(self.source_folder, "PlugIns/FreeImageCodec/CMakeLists.txt"),
|
"CMake/Dependencies.cmake",
|
||||||
"${FreeImage_LIBRARIES}",
|
"find_package(FreeImage)",
|
||||||
"freeimage::FreeImage",
|
"find_package(ConanFreeImage)",
|
||||||
)
|
)
|
||||||
replace_in_file(self,
|
tools.replace_in_file(
|
||||||
os.path.join(self.source_folder, "Components/Overlay/CMakeLists.txt"),
|
"CMake/Packages/FindDirectX11.cmake",
|
||||||
"${FREETYPE_LIBRARIES}",
|
|
||||||
"freetype",
|
|
||||||
)
|
|
||||||
replace_in_file(self,
|
|
||||||
os.path.join(self.source_folder, "CMake/Packages/FindDirectX11.cmake"),
|
|
||||||
'find_path(DirectX11_INCLUDE_DIR NAMES d3d11.h HINTS "',
|
'find_path(DirectX11_INCLUDE_DIR NAMES d3d11.h HINTS "',
|
||||||
'find_path(DirectX11_INCLUDE_DIR NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NAMES d3d11.h HINTS "',
|
'find_path(DirectX11_INCLUDE_DIR NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NAMES d3d11.h HINTS "',
|
||||||
)
|
)
|
||||||
|
shutil.copyfile(
|
||||||
|
"patches/FindFreeImage.cmake", "CMake/Packages/FindConanFreeImage.cmake"
|
||||||
|
)
|
||||||
|
for patch in self.conan_data["patches"][self.version]:
|
||||||
|
tools.patch(**patch)
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
self._patch_sources()
|
cmake = self._configure_cmake()
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.configure()
|
|
||||||
cmake.build()
|
cmake.build()
|
||||||
|
|
||||||
def package(self):
|
def package(self):
|
||||||
cmake = CMake(self)
|
cmake = self._configure_cmake()
|
||||||
cmake.install()
|
cmake.install()
|
||||||
rmdir(self, os.path.join(self.package_folder, "CMake"))
|
|
||||||
rmdir(self, os.path.join(self.package_folder, "Docs"))
|
|
||||||
|
|
||||||
def package_info(self):
|
def package_info(self):
|
||||||
self.cpp_info.set_property("cmake_module_file_name", "OGRE")
|
self.cpp_info.name = "OGRE"
|
||||||
self.cpp_info.set_property("cmake_module_target_name", "OGRE::OGRE")
|
|
||||||
self.cpp_info.set_property("cmake_file_name", "OGRE")
|
|
||||||
self.cpp_info.set_property("cmake_target_name", "OGRE::OGRE")
|
|
||||||
self.cpp_info.includedirs = [
|
self.cpp_info.includedirs = [
|
||||||
"include",
|
"include",
|
||||||
"include/OGRE",
|
"include/OGRE",
|
||||||
"include/OGRE/Bites",
|
"include/OGRE/Bites",
|
||||||
|
"include/OGRE/HLMS",
|
||||||
"include/OGRE/MeshLodGenerator",
|
"include/OGRE/MeshLodGenerator",
|
||||||
"include/OGRE/Overlay",
|
"include/OGRE/Overlay",
|
||||||
"include/OGRE/Paging",
|
"include/OGRE/Paging",
|
||||||
@ -144,4 +131,4 @@ class OGREConan(ConanFile):
|
|||||||
"include/OGRE/Threading",
|
"include/OGRE/Threading",
|
||||||
"include/OGRE/Volume",
|
"include/OGRE/Volume",
|
||||||
]
|
]
|
||||||
self.cpp_info.libs = collect_libs(self)
|
self.cpp_info.libs = tools.collect_libs(self)
|
||||||
|
10
ogre/13/patches/13.2.4/CMakeLists.txt.patch
Normal file
10
ogre/13/patches/13.2.4/CMakeLists.txt.patch
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
--- CMakeLists.txt
|
||||||
|
+++ CMakeLists.txt
|
||||||
|
@@ -76,6 +76,7 @@
|
||||||
|
|
||||||
|
# Include necessary submodules
|
||||||
|
set(CMAKE_MODULE_PATH
|
||||||
|
+ "${CMAKE_BINARY_DIR}"
|
||||||
|
"${PROJECT_SOURCE_DIR}/CMake"
|
||||||
|
"${PROJECT_SOURCE_DIR}/CMake/Utils"
|
||||||
|
"${PROJECT_SOURCE_DIR}/CMake/Packages"
|
10
ogre/13/patches/13.3.1/CMakeLists.txt.patch
Normal file
10
ogre/13/patches/13.3.1/CMakeLists.txt.patch
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
--- CMakeLists.txt
|
||||||
|
+++ CMakeLists.txt
|
||||||
|
@@ -80,6 +80,7 @@
|
||||||
|
|
||||||
|
# Include necessary submodules
|
||||||
|
set(CMAKE_MODULE_PATH
|
||||||
|
+ "${CMAKE_BINARY_DIR}"
|
||||||
|
"${PROJECT_SOURCE_DIR}/CMake"
|
||||||
|
"${PROJECT_SOURCE_DIR}/CMake/Utils"
|
||||||
|
"${PROJECT_SOURCE_DIR}/CMake/Packages"
|
@ -1,7 +0,0 @@
|
|||||||
sources:
|
|
||||||
"2022.10":
|
|
||||||
url: "https://github.com/OGRECave/ogre-next/archive/ede1690bb3dcf932df6a06f06e9e6de585e5eeea.tar.gz"
|
|
||||||
sha256: "6baf05cc4dc14cb70b6f4a958dbc7ac79a209eb9658733d0b19f651a5f96da08"
|
|
||||||
"2023.01":
|
|
||||||
url: "https://github.com/OGRECave/ogre-next/archive/186ea7ee972860ed09bcdbcdd99f609348c6aa8b.tar.gz"
|
|
||||||
sha256: "38a93399b5ce2b053894e858cafa3830118ff938f40204c727a77c9233744e8f"
|
|
@ -1,137 +0,0 @@
|
|||||||
from conan import ConanFile
|
|
||||||
from conan.tools.files import get, collect_libs, rmdir, replace_in_file, apply_conandata_patches, export_conandata_patches
|
|
||||||
from conan.tools.cmake import CMakeToolchain, CMake, CMakeDeps, cmake_layout
|
|
||||||
from conan.tools.system.package_manager import Apt
|
|
||||||
import os
|
|
||||||
|
|
||||||
class OGRENextConan(ConanFile):
|
|
||||||
name = "ogre3d-next"
|
|
||||||
license = "MIT"
|
|
||||||
url = "https://github.com/AnotherFoxGuy/conan-OGRE"
|
|
||||||
description = "scene-oriented, flexible 3D engine written in C++"
|
|
||||||
settings = "os", "compiler", "build_type", "arch"
|
|
||||||
|
|
||||||
def export_sources(self):
|
|
||||||
export_conandata_patches(self)
|
|
||||||
|
|
||||||
def layout(self):
|
|
||||||
cmake_layout(self)
|
|
||||||
|
|
||||||
def requirements(self):
|
|
||||||
self.requires("zlib/[1.x]")
|
|
||||||
self.requires("zziplib/[0.13.x]")
|
|
||||||
self.requires("freetype/[2.x]")
|
|
||||||
self.requires("freeimage/[3.x]")
|
|
||||||
self.requires("rapidjson/cci.20220822")
|
|
||||||
self.requires("libpng/1.6.38")
|
|
||||||
self.requires("sdl/[2.x]")
|
|
||||||
self.requires("tinyxml/[2.x]")
|
|
||||||
|
|
||||||
def system_requirements(self):
|
|
||||||
Apt(self).install([
|
|
||||||
"libx11-dev",
|
|
||||||
"libxaw7-dev",
|
|
||||||
"libxrandr-dev",
|
|
||||||
"libgles2-mesa-dev",
|
|
||||||
"libvulkan-dev",
|
|
||||||
"glslang-dev"
|
|
||||||
], check=True)
|
|
||||||
|
|
||||||
def source(self):
|
|
||||||
get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
|
||||||
|
|
||||||
def generate(self):
|
|
||||||
tc = CMakeToolchain(self)
|
|
||||||
tc.variables["OGRE_BUILD_COMPONENT_ATMOSPHERE"] = "ON"
|
|
||||||
tc.variables["OGRE_BUILD_COMPONENT_BITES"] = "ON"
|
|
||||||
tc.variables["OGRE_BUILD_COMPONENT_CSHARP"] = "OFF"
|
|
||||||
tc.variables["OGRE_BUILD_COMPONENT_JAVA"] = "OFF"
|
|
||||||
tc.variables["OGRE_BUILD_COMPONENT_OVERLAY_IMGUI"] = "ON"
|
|
||||||
tc.variables["OGRE_BUILD_COMPONENT_PYTHON"] = "OFF"
|
|
||||||
tc.variables["OGRE_BUILD_COMPONENT_TERRAIN"] = "ON"
|
|
||||||
#tc.variables["OGRE_BUILD_COMPONENT_PAGING"] = "ON" # Completly broken
|
|
||||||
tc.variables["OGRE_BUILD_DEPENDENCIES"] = "OFF"
|
|
||||||
tc.variables["OGRE_BUILD_PLUGIN_DOT_SCENE"] = "OFF"
|
|
||||||
tc.variables["OGRE_BUILD_PLUGIN_EXRCODEC"] = "OFF"
|
|
||||||
tc.variables["OGRE_BUILD_RENDERSYSTEM_D3D11"] = "ON"
|
|
||||||
tc.variables["OGRE_BUILD_RENDERSYSTEM_GL3PLUS"] = "OFF"
|
|
||||||
tc.variables["OGRE_BUILD_SAMPLES"] = "OFF"
|
|
||||||
tc.variables["OGRE_BUILD_SAMPLES2"] = "OFF"
|
|
||||||
tc.variables["OGRE_CONFIG_ENABLE_JSON"] = "ON"
|
|
||||||
tc.variables["OGRE_COPY_DEPENDENCIES"] = "OFF"
|
|
||||||
tc.variables["OGRE_INSTALL_DEPENDENCIES"] = "OFF"
|
|
||||||
tc.variables["OGRE_INSTALL_SAMPLES"] = "OFF"
|
|
||||||
tc.generate()
|
|
||||||
deps = CMakeDeps(self)
|
|
||||||
deps.generate()
|
|
||||||
|
|
||||||
def _patch_sources(self):
|
|
||||||
apply_conandata_patches(self)
|
|
||||||
replace_in_file(self,
|
|
||||||
os.path.join(self.source_folder, "CMake/Dependencies.cmake"),
|
|
||||||
"find_package(Rapidjson)",
|
|
||||||
"""
|
|
||||||
find_package(RapidJSON)
|
|
||||||
set(Rapidjson_FOUND TRUE)
|
|
||||||
""",
|
|
||||||
)
|
|
||||||
replace_in_file(self,
|
|
||||||
os.path.join(self.source_folder, "Components/Overlay/CMakeLists.txt"),
|
|
||||||
"${FREETYPE_LIBRARIES}",
|
|
||||||
"freetype",
|
|
||||||
)
|
|
||||||
replace_in_file(self,
|
|
||||||
os.path.join(self.source_folder, "CMake/InstallDependencies.cmake"),
|
|
||||||
"# Install dependencies",
|
|
||||||
"return()",
|
|
||||||
)
|
|
||||||
replace_in_file(self,
|
|
||||||
os.path.join(self.source_folder, "OgreMain/CMakeLists.txt"),
|
|
||||||
"target_link_libraries(${OGRE_NEXT}Main ${LIBRARIES})",
|
|
||||||
"target_link_libraries(${OGRE_NEXT}Main ${LIBRARIES} rapidjson freeimage::FreeImage)",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def build(self):
|
|
||||||
self._patch_sources()
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.configure()
|
|
||||||
cmake.build()
|
|
||||||
|
|
||||||
def package(self):
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.install()
|
|
||||||
rmdir(self, os.path.join(self.package_folder, "CMake"))
|
|
||||||
rmdir(self, os.path.join(self.package_folder, "Docs"))
|
|
||||||
|
|
||||||
def package_info(self):
|
|
||||||
self.cpp_info.set_property("cmake_module_file_name", "OGRE")
|
|
||||||
self.cpp_info.set_property("cmake_module_target_name", "OGRE::OGRE")
|
|
||||||
self.cpp_info.set_property("cmake_file_name", "OGRE")
|
|
||||||
self.cpp_info.set_property("cmake_target_name", "OGRE::OGRE")
|
|
||||||
self.cpp_info.includedirs = [
|
|
||||||
"include",
|
|
||||||
"include/OGRE",
|
|
||||||
"include/OGRE/Animation",
|
|
||||||
"include/OGRE/Atmosphere",
|
|
||||||
"include/OGRE/CommandBuffer",
|
|
||||||
"include/OGRE/Compositor",
|
|
||||||
"include/OGRE/Compute",
|
|
||||||
"include/OGRE/Hash",
|
|
||||||
"include/OGRE/Hlms",
|
|
||||||
"include/OGRE/Hlms/Common",
|
|
||||||
"include/OGRE/Hlms/Pbs",
|
|
||||||
"include/OGRE/Hlms/Unlit",
|
|
||||||
"include/OGRE/Math",
|
|
||||||
"include/OGRE/MeshLodGenerator",
|
|
||||||
"include/OGRE/ogrestd",
|
|
||||||
"include/OGRE/Overlay",
|
|
||||||
"include/OGRE/Plugins",
|
|
||||||
"include/OGRE/RenderSystems",
|
|
||||||
"include/OGRE/SceneFormat",
|
|
||||||
"include/OGRE/Threading",
|
|
||||||
"include/OGRE/Vao",
|
|
||||||
]
|
|
||||||
# Directories where libraries can be found
|
|
||||||
self.cpp_info.libdirs = ['lib', f'lib/{self.settings.build_type}']
|
|
||||||
self.cpp_info.libs = collect_libs(self)
|
|
@ -1,11 +0,0 @@
|
|||||||
--- CMake/Utils/FindPkgMacros.cmake
|
|
||||||
+++ CMake/Utils/FindPkgMacros.cmake
|
|
||||||
@@ -82,7 +82,7 @@
|
|
||||||
if (${PREFIX}_FWK)
|
|
||||||
set(${PREFIX} ${${PREFIX}_FWK})
|
|
||||||
elseif (${PREFIX}_REL AND ${PREFIX}_DBG)
|
|
||||||
- set(${PREFIX} optimized ${${PREFIX}_REL} debug ${${PREFIX}_DBG})
|
|
||||||
+ set(${PREFIX} "$<$<CONFIG:Debug>:${${PREFIX}_DBG}>$<$<NOT:$<CONFIG:Debug>>:${${PREFIX}_REL}>")
|
|
||||||
elseif (${PREFIX}_REL)
|
|
||||||
set(${PREFIX} ${${PREFIX}_REL})
|
|
||||||
elseif (${PREFIX}_DBG)
|
|
@ -1,11 +0,0 @@
|
|||||||
--- OgreMain/CMakeLists.txt
|
|
||||||
+++ OgreMain/CMakeLists.txt
|
|
||||||
@@ -475,7 +475,7 @@
|
|
||||||
set_target_properties(OgreMain PROPERTIES OUTPUT_NAME Ogre)
|
|
||||||
endif ()
|
|
||||||
endif ()
|
|
||||||
-target_link_libraries(OgreMain ${LIBRARIES})
|
|
||||||
+target_link_libraries(OgreMain ${LIBRARIES} RapidJSON::RapidJSON freeimage::FreeImage)
|
|
||||||
if (MINGW)
|
|
||||||
# may need winsock htons functions for FreeImage
|
|
||||||
target_link_libraries(OgreMain ws2_32)
|
|
@ -1,3 +1,5 @@
|
|||||||
versions:
|
versions:
|
||||||
"13.5.3":
|
"1.11.6.1":
|
||||||
|
folder: "1.11"
|
||||||
|
"13.4.4":
|
||||||
folder: "13"
|
folder: "13"
|
@ -1,7 +1,5 @@
|
|||||||
from conan import ConanFile
|
from conans import ConanFile, CMake, tools
|
||||||
from conan.tools.files import get, collect_libs
|
from conans.tools import os_info, SystemPackageTool
|
||||||
from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout
|
|
||||||
from conan.tools.system import package_manager
|
|
||||||
|
|
||||||
|
|
||||||
class OisConan(ConanFile):
|
class OisConan(ConanFile):
|
||||||
@ -13,22 +11,18 @@ class OisConan(ConanFile):
|
|||||||
topics = ("Input", "System")
|
topics = ("Input", "System")
|
||||||
settings = "os", "compiler", "build_type", "arch"
|
settings = "os", "compiler", "build_type", "arch"
|
||||||
|
|
||||||
def layout(self):
|
|
||||||
cmake_layout(self)
|
|
||||||
|
|
||||||
def system_requirements(self):
|
def system_requirements(self):
|
||||||
package_manager.Apt(self).install(["libx11-dev"])
|
if os_info.is_linux:
|
||||||
|
if os_info.with_apt:
|
||||||
|
installer = SystemPackageTool()
|
||||||
|
installer.install("libx11-dev")
|
||||||
|
|
||||||
def source(self):
|
def source(self):
|
||||||
get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
tools.get(**self.conan_data["sources"][self.version], strip_root=True)
|
||||||
|
|
||||||
def generate(self):
|
|
||||||
tc = CMakeToolchain(self)
|
|
||||||
tc.variables["OIS_BUILD_DEMOS"] = "OFF"
|
|
||||||
tc.generate()
|
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
cmake = CMake(self)
|
cmake = CMake(self)
|
||||||
|
cmake.definitions['OIS_BUILD_DEMOS'] = 'OFF'
|
||||||
cmake.configure()
|
cmake.configure()
|
||||||
cmake.build()
|
cmake.build()
|
||||||
|
|
||||||
@ -38,4 +32,4 @@ class OisConan(ConanFile):
|
|||||||
|
|
||||||
def package_info(self):
|
def package_info(self):
|
||||||
self.cpp_info.includedirs = ['include', 'include/ois']
|
self.cpp_info.includedirs = ['include', 'include/ois']
|
||||||
self.cpp_info.libs = collect_libs(self)
|
self.cpp_info.libs = tools.collect_libs(self)
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
@echo off
|
|
||||||
set PYTHONPATH=%~dp0
|
|
||||||
pylint --rcfile=linter/pylintrc_recipe %*
|
|
@ -1,6 +1,5 @@
|
|||||||
from conan import ConanFile
|
from conans import ConanFile, CMake, tools
|
||||||
from conan.tools.files import get, collect_libs
|
|
||||||
from conan.tools.cmake import CMakeToolchain, CMake, CMakeDeps, cmake_layout
|
|
||||||
|
|
||||||
class SocketwConan(ConanFile):
|
class SocketwConan(ConanFile):
|
||||||
name = "socketw"
|
name = "socketw"
|
||||||
@ -8,22 +7,14 @@ class SocketwConan(ConanFile):
|
|||||||
url = "https://github.com/RigsOfRods/socketw/issues"
|
url = "https://github.com/RigsOfRods/socketw/issues"
|
||||||
description = "SocketW is a library which provides cross-platform socket abstraction"
|
description = "SocketW is a library which provides cross-platform socket abstraction"
|
||||||
settings = "os", "compiler", "build_type", "arch"
|
settings = "os", "compiler", "build_type", "arch"
|
||||||
|
generators = "cmake"
|
||||||
def layout(self):
|
|
||||||
cmake_layout(self)
|
|
||||||
|
|
||||||
def requirements(self):
|
def requirements(self):
|
||||||
for req in self.conan_data["requirements"]:
|
for req in self.conan_data["requirements"]:
|
||||||
self.requires(req)
|
self.requires(req)
|
||||||
|
|
||||||
def source(self):
|
def source(self):
|
||||||
get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
tools.get(**self.conan_data["sources"][self.version], strip_root=True)
|
||||||
|
|
||||||
def generate(self):
|
|
||||||
tc = CMakeToolchain(self)
|
|
||||||
tc.generate()
|
|
||||||
deps = CMakeDeps(self)
|
|
||||||
deps.generate()
|
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
cmake = CMake(self)
|
cmake = CMake(self)
|
||||||
@ -35,8 +26,4 @@ class SocketwConan(ConanFile):
|
|||||||
cmake.install()
|
cmake.install()
|
||||||
|
|
||||||
def package_info(self):
|
def package_info(self):
|
||||||
self.cpp_info.set_property("cmake_module_file_name", "SocketW")
|
self.cpp_info.libs = tools.collect_libs(self)
|
||||||
self.cpp_info.set_property("cmake_module_target_name", "SocketW::SocketW")
|
|
||||||
self.cpp_info.set_property("cmake_file_name", "SocketW")
|
|
||||||
self.cpp_info.set_property("cmake_target_name", "SocketW::SocketW")
|
|
||||||
self.cpp_info.libs = collect_libs(self)
|
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
import os
|
|
||||||
from conans import ConanFile
|
|
||||||
from conans.errors import ConanInvalidConfiguration
|
|
||||||
|
|
||||||
|
|
||||||
class conantoolsConan(ConanFile):
|
|
||||||
name = "afg-conan-tools"
|
|
||||||
version = "1.0"
|
|
||||||
description = "helper-tools"
|
|
||||||
settings = "os", "arch"
|
|
||||||
exports_sources = "bin/**"
|
|
||||||
|
|
||||||
def validate(self):
|
|
||||||
if self.settings.os != "Linux":
|
|
||||||
raise ConanInvalidConfiguration("Only Linux supported")
|
|
||||||
|
|
||||||
def package(self):
|
|
||||||
self.copy("*", src="bin", dst="bin", keep_path=True)
|
|
||||||
|
|
||||||
def package_info(self):
|
|
||||||
self.env_info.PATH.append(os.path.join(self.package_folder, "bin"))
|
|
Loading…
x
Reference in New Issue
Block a user