Compare commits

..

No commits in common. "f1c3a2dc1555240ec59e2d7dfd983dc0467d9a9c" and "ab4b1a82025ed85d2c26428ae51116968a097a41" have entirely different histories.

61 changed files with 445 additions and 1261 deletions

4
.gitignore vendored
View File

@ -2,6 +2,4 @@ build/
tmp/
upload.*
.idea/
build_tmp.py
__pycache__
conanfile-old.py
build_tmp.py

View File

@ -1,6 +1,6 @@
from conan import ConanFile
from conan.tools.files import get, collect_libs, copy
import os
from conans import ConanFile, tools
from conans.tools import os_info
class GcConan(ConanFile):
name = "cg-toolkit"
@ -9,26 +9,23 @@ class GcConan(ConanFile):
settings = "os", "arch"
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):
copy(self, "*.h", os.path.join(self.source_folder, "include"), os.path.join(self.package_folder,"include"))
if self.settings.os == "Windows":
if '64' in self.settings.arch:
#copy(self, "*.h", self.source_folder, os.path.join(self.package_folder, "include"))
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"))
self.copy("*.h", src="include", dst="include")
if os_info.is_linux:
if self.settings.arch.__contains__('64'):
self.copy("*.so", src="lib64", dst="lib", keep_path=False)
else:
copy(self, "*.lib", os.path.join(self.source_folder, "lib"), os.path.join(self.package_folder,"lib"))
copy(self, "*.dll", os.path.join(self.source_folder, "bin"), os.path.join(self.package_folder,"bin"))
self.copy("*.so", src="lib", dst="lib", keep_path=False)
else:
if '64' in self.settings.arch:
copy(self, "*.so", os.path.join(self.source_folder, "lib64"), os.path.join(self.package_folder,"lib"))
if self.settings.arch.__contains__('64'):
self.copy("*.lib", src="lib64", dst="lib", keep_path=False)
self.copy("*.dll", src="bin64", dst="bin", keep_path=False)
else:
copy(self, "*.so", os.path.join(self.source_folder, "lib"), os.path.join(self.package_folder,"lib"))
def package_info(self):
self.cpp_info.set_property("cmake_module_file_name", "Cg")
self.cpp_info.set_property("cmake_module_target_name", "Cg::Cg")
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)
self.copy("*.lib", src="lib", dst="lib", keep_path=False)
self.copy("*.dll", src="bin", dst="bin", keep_path=False)
def package_info(self):
self.cpp_info.name = "Cg"
self.cpp_info.libs = tools.collect_libs(self)

View File

@ -1,4 +0,0 @@
sources:
"9.0":
url: "https://cdn.anotherfoxguy.com/DirectX-SDK.zip"
sha256: "f73f10c4519f445e1ecc71bcc315c3c9da90f08bacf354e1b3fabba1bacef77d"

View File

@ -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"]

View File

@ -1,3 +0,0 @@
versions:
"9.0":
folder: all

View File

@ -1,6 +1,4 @@
from conan import ConanFile
from conan.tools.files import get, collect_libs
from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout
from conans import ConanFile, CMake, tools
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."
settings = "os", "compiler", "build_type", "arch"
def layout(self):
cmake_layout(self)
def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
def generate(self):
tc = CMakeToolchain(self)
tc.variables["BUILD_EXAMPLES"] = "OFF"
tc.generate()
tools.get(**self.conan_data["sources"][self.version], strip_root=True)
def build(self):
cmake = CMake(self)
cmake.definitions['BUILD_EXAMPLES'] = 'OFF'
cmake.configure()
cmake.build()
@ -32,4 +23,4 @@ class DiscordrpcConan(ConanFile):
cmake.install()
def package_info(self):
self.cpp_info.libs = collect_libs(self)
self.cpp_info.libs = tools.collect_libs(self)

View File

@ -1,3 +0,0 @@
versions:
"3.4.0":
folder: all

View File

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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))

View File

@ -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))

View File

@ -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

View File

@ -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

View File

@ -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
}
]
}
]
}

View File

@ -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")

View File

@ -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")

View File

@ -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

View File

@ -4,4 +4,13 @@ sources:
sha256: "d1d5f294670ae71f7200ed4b30859018281d8cfd45d6a38d18b97a4aba604c42"
"3.4.1":
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]"

View File

@ -1,7 +1,5 @@
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
from conans import ConanFile, CMake, tools
from conans.tools import os_info, SystemPackageTool
class MyGUIConan(ConanFile):
@ -10,49 +8,30 @@ class MyGUIConan(ConanFile):
url = "https://github.com/AnotherFoxGuy/conan-MyGUI"
description = "Fast, flexible and simple GUI."
settings = "os", "compiler", "build_type", "arch"
generators = "cmake_paths", "cmake_find_package"
exports_sources = "patches/**"
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/[>=1 <14]@anotherfoxguy/stable")
for req in self.conan_data["requirements"]:
self.requires(req)
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_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",
)
tools.get(**self.conan_data["sources"][self.version], strip_root=True)
if not self.options.system_ogre:
for patch in self.conan_data["patches"][self.version]:
tools.patch(**patch)
def build(self):
self._patch_sources()
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.build()
@ -61,14 +40,10 @@ class MyGUIConan(ConanFile):
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)
self.cpp_info.libs = tools.collect_libs(self)
def package_id(self):
if not self.options.system_ogre:

View 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"

View 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"

View File

@ -1,4 +0,0 @@
sources:
"2022.10":
url: "https://github.com/cryham/mygui-next/archive/3f1194e5075078f0a9428b052f97749486b6fd72.tar.gz"
sha256: "13f084a95e9e22bbb1f1d216b55527fd03f4a4e525484e45b97f98ba307732a4"

View File

@ -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()

View File

@ -2,15 +2,16 @@ sources:
"0.6.3":
url: "https://github.com/OGRECave/ogre-caelum/archive/94913d2040a41148c14001c33a0bdc0f100842f8.zip"
sha256: "9de4159ae8050fd0858b3c1c09005aa50b36079a3a06accfb67203669be9a09e"
"0.6.3.1":
url: "https://github.com/RigsOfRods/ogre-caelum/archive/70fcf62f306288c9472cc03a42367c9625c839ea.zip"
sha256: "b4b4b6fe2997c3da4537ada2ab69032647e65773886e57c9803fc90aac2dd158"
"0.6.4":
url: "https://github.com/OGRECave/ogre-caelum/archive/4bd1b0581d55896d37922483981582661ca557de.zip"
sha256: "deffe26ba169d89954f62ade50e856fdae293078c73836378d7bf3051eff0a8d"
"2022.08":
url: "https://github.com/OGRECave/ogre-caelum/archive/4bd1b0581d55896d37922483981582661ca557de.zip"
sha256: "deffe26ba169d89954f62ade50e856fdae293078c73836378d7bf3051eff0a8d"
url: "https://github.com/OGRECave/ogre-caelum/archive/7763bff99f758bbfcc5e7f9d751b2551e975545b.zip"
sha256: "069050b1039194324b0d1dddef887e83442b04d5843b4572ae5035da3e2d1ef6"
patches:
"2022.08":
- patch_file: "patches/2022.08/CMakeLists.txt.patch"
"0.6.3":
- 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"

View File

@ -1,45 +1,25 @@
from conan import ConanFile
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
from conans import ConanFile, CMake, tools
class CaelumConan(ConanFile):
name = "ogre3d-caelum"
license = "GNU Lesser General Public License v2.1"
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"
def export_sources(self):
export_conandata_patches(self)
def layout(self):
cmake_layout(self)
generators = "cmake_find_package"
exports_sources = "patches/**"
def requirements(self):
self.requires("ogre3d/[13.x]@anotherfoxguy/stable")
self.requires("libpng/1.6.38")
for req in self.conan_data["requirements"][self.version]:
self.requires(req)
def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
def generate(self):
tc = CMakeToolchain(self)
tc.generate()
deps = CMakeDeps(self)
deps.generate()
def _patch_sources(self):
apply_conandata_patches(self)
tools.get(**self.conan_data["sources"][self.version], strip_root=True)
for patch in self.conan_data["patches"][self.version]:
tools.patch(**patch)
def build(self):
self._patch_sources()
cmake = CMake(self)
cmake.configure()
cmake.build()
@ -49,12 +29,12 @@ class CaelumConan(ConanFile):
cmake.install()
def package_info(self):
self.cpp_info.set_property("cmake_module_file_name", "Caelum")
self.cpp_info.set_property("cmake_module_target_name", "Caelum::Caelum")
self.cpp_info.set_property("cmake_file_name", "Caelum")
self.cpp_info.set_property("cmake_target_name", "Caelum::Caelum")
self.cpp_info.includedirs = ["include", "include/Caelum"]
self.cpp_info.libs = collect_libs(self)
self.cpp_info.name = "Caelum"
self.cpp_info.includedirs = [
'include',
'include/Caelum'
]
self.cpp_info.libs = tools.collect_libs(self)
def package_id(self):
self.info.requires["ogre3d"].full_recipe_mode()

View 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

View 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/")

View File

@ -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)

View File

@ -1,5 +1,5 @@
versions:
"0.6.3":
folder: all
"2022.08":
"0.6.4":
folder: all

View File

@ -5,6 +5,13 @@ sources:
"1.3.0":
url: "https://github.com/OGRECave/ogre-pagedgeometry/archive/18ca8a0abd26cb5d52b99ad8e8fa0c8f7e6e7d79.zip"
sha256: "4a3d97d75f7417208403bd0f5e8c3b010ae0dd9a36968f78ecc5cd0161b2ddb9"
"2022.08":
url: "https://github.com/OGRECave/ogre-pagedgeometry/archive/8637c7f4b6238ced28e741bb6e4d4ddc8b60b477.zip"
sha256: "b83884652dc773e6c58e8efebfb950de714f6e34161a0fb388d2f546efea3a87"
patches:
"1.2.0":
- 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"

View File

@ -1,50 +1,40 @@
from conan import ConanFile
from conan.tools.files import get, collect_libs
from conan.tools.cmake import CMakeToolchain, CMake, CMakeDeps, cmake_layout
class PagedGeometryConan(ConanFile):
name = "ogre3d-pagedgeometry"
license = "GNU Lesser General Public License v2.1"
url = "https://github.com/RigsOfRods/Caelum/issues"
description = "PagedGeometry is a plugin for OGRE for rendering of dense vegetation "
settings = "os", "compiler", "build_type", "arch"
def layout(self):
cmake_layout(self)
def requirements(self):
self.requires("ogre3d/[13.x]@anotherfoxguy/stable")
self.requires("libpng/1.6.38")
def source(self):
get(self, **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):
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", "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 = [
'include',
'include/PagedGeometry'
]
self.cpp_info.libs = collect_libs(self)
def package_id(self):
self.info.requires["ogre3d"].full_recipe_mode()
from conans import ConanFile, CMake, tools
class PagedGeometryConan(ConanFile):
name = "ogre3d-pagedgeometry"
license = "GNU Lesser General Public License v2.1"
url = "https://github.com/RigsOfRods/Caelum/issues"
description = "PagedGeometry is a plugin for OGRE for rendering of dense vegetation "
settings = "os", "compiler", "build_type", "arch"
generators = "cmake_find_package"
exports_sources = "patches/**"
def requirements(self):
for req in self.conan_data["requirements"][self.version]:
self.requires(req)
def source(self):
tools.get(**self.conan_data["sources"][self.version], strip_root=True)
for patch in self.conan_data["patches"][self.version]:
tools.patch(**patch)
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
def package(self):
cmake = CMake(self)
cmake.install()
def package_info(self):
self.cpp_info.name = "PagedGeometry"
self.cpp_info.includedirs = [
'include',
'include/PagedGeometry'
]
self.cpp_info.libs = tools.collect_libs(self)
def package_id(self):
self.info.requires["ogre3d"].full_recipe_mode()

View 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)

View File

@ -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)

View File

@ -1,5 +1,5 @@
versions:
"1.2.0":
folder: all
"2022.08":
"1.3.0":
folder: all

View File

@ -4,7 +4,14 @@ sources:
sha256: "31c84051ffe9a3710c553cfa27ebda7b176c9dfe3b4d2a113d4f02caf48ecd5b"
patches:
"1.11.6.1":
- patch_file: "patches/1.11.6.1/FixFreeImage.patch"
- patch_file: "patches/1.11.6.1/FixSamples.patch"
- patch_file: "patches/1.11.6.1/FixOverlay.patch"
- patch_file: "patches/1.11.6.1/scriptlexer.patch"
- patch_file: "patches/1.11.6.1/CMakeLists.txt.patch"
- patch_file: "patches/1.11.6.1/Samples-CMakeList.txt.patch"
- patch_file: "patches/1.11.6.1/FixOverlayCMakeLists.txt.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]"

View File

@ -1,8 +1,7 @@
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
import shutil
from conans import ConanFile, CMake, tools
from conans.tools import os_info, SystemPackageTool
class OGREConan(ConanFile):
name = "ogre3d"
@ -10,93 +9,88 @@ class OGREConan(ConanFile):
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)
generators = "cmake_paths", "cmake_find_package"
exports_sources = "patches/**"
def requirements(self):
self.requires("zlib/[~1]")
self.requires("zziplib/[~0]")
self.requires("freetype/[~2]")
self.requires("freeimage/[~3]")
self.requires("cg-toolkit/3.1@anotherfoxguy/stable")
self.requires("pugixml/[~1]")
if self.settings.os == "Windows":
for req in self.conan_data["requirements"]:
self.requires(req)
if os_info.is_windows:
self.requires("directx-sdk/9.0@anotherfoxguy/stable")
def system_requirements(self):
Apt(self).install([
"libx11-dev",
"libxaw7-dev",
"libxrandr-dev",
"libgles2-mesa-dev",
"libvulkan-dev",
"glslang-dev"
], check=True)
if os_info.is_linux:
if os_info.with_apt:
installer = SystemPackageTool()
installer.install("libgles2-mesa-dev")
installer.install("libglu1-mesa-dev")
installer.install("libx11-dev")
installer.install("libxaw7-dev")
installer.install("libxrandr-dev")
installer.install("libxt-dev")
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_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"),
tools.get(**self.conan_data["sources"][self.version], strip_root=True)
tools.replace_in_file(
"CMake/Dependencies.cmake",
"find_package(DirectX)",
"find_package(DirectX9)",
)
replace_in_file(self,
os.path.join(self.source_folder, "CMake/Packages/FindDirectX11.cmake"),
tools.replace_in_file(
"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 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):
self._patch_sources()
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.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.name = "OGRE"
self.cpp_info.includedirs = [
"include",
"include/OGRE",
"include/OGRE/Bites",
"include/OGRE/HLMS",
"include/OGRE/MeshLodGenerator",
"include/OGRE/Overlay",
"include/OGRE/Paging",
@ -108,4 +102,4 @@ class OGREConan(ConanFile):
"include/OGRE/Threading",
"include/OGRE/Volume",
]
self.cpp_info.libs = collect_libs(self)
self.cpp_info.libs = tools.collect_libs(self)

View 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"

View File

@ -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>

View File

@ -1,13 +1,11 @@
diff --git a/Components/Overlay/CMakeLists.txt b/Components/Overlay/CMakeLists.txt
index 1ed646080..3f0b75c33 100644
--- a/Components/Overlay/CMakeLists.txt
+++ b/Components/Overlay/CMakeLists.txt
@@ -21,7 +21,7 @@ file(GLOB SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
--- Components/Overlay/CMakeLists.txt
+++ Components/Overlay/CMakeLists.txt
@@ -21,7 +21,7 @@
# setup target
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})
-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
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
$<INSTALL_INTERFACE:include/OGRE/Overlay>

View File

@ -23,70 +23,43 @@ sources:
"13.4.4":
url: "https://github.com/OGRECave/ogre/archive/refs/tags/v13.4.4.tar.gz"
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:
"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/FindPkgMacros.cmake.patch"
"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/FindPkgMacros.cmake.patch"
"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/FindPkgMacros.cmake.patch"
"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/FindPkgMacros.cmake.patch"
"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/FindPkgMacros.cmake.patch"
"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/FindPkgMacros.cmake.patch"
"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/FindPkgMacros.cmake.patch"
"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/FindPkgMacros.cmake.patch"
"13.5.0":
- patch_file: "patches/13.3.1/pugixml-fix.patch"
- patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
"13.5.1":
- patch_file: "patches/13.3.1/pugixml-fix.patch"
- patch_file: "patches/13.3.1/FindPkgMacros.cmake.patch"
"13.5.2":
- 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"
requirements:
- "zlib/[1.x]"
- "zziplib/[0.13.x]"
- "freetype/[2.x]"
- "freeimage/[3.x]"
- "cg-toolkit/3.1@anotherfoxguy/stable"
- "pugixml/[1.x]"

View File

@ -1,8 +1,7 @@
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
import shutil
from conans import ConanFile, CMake, tools
from conans.tools import os_info, SystemPackageTool
class OGREConan(ConanFile):
name = "ogre3d"
@ -10,129 +9,117 @@ class OGREConan(ConanFile):
url = "https://github.com/AnotherFoxGuy/conan-OGRE"
description = "scene-oriented, flexible 3D engine written in C++"
settings = "os", "compiler", "build_type", "arch"
generators = "cmake_find_package"
exports_sources = "patches/**"
options = {
"resourcemanager_strict": ["off", "pedantic", "strict"],
"nodeless_positioning": [True, False],
"codec_rsimage": [True, False],
}
default_options = {
"resourcemanager_strict": "strict",
"nodeless_positioning": False,
"codec_rsimage": False,
}
def export_sources(self):
export_conandata_patches(self)
_cmake = None
def layout(self):
cmake_layout(self)
def _configure_cmake(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):
self.requires("zlib/[1.x]")
self.requires("zziplib/[0.13.x]")
self.requires("freetype/[2.x]")
self.requires("freeimage/[3.x]")
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":
for req in self.conan_data["requirements"]:
self.requires(req)
if os_info.is_windows:
self.requires("directx-sdk/9.0@anotherfoxguy/stable")
def system_requirements(self):
Apt(self).install([
"libx11-dev",
"libxaw7-dev",
"libxrandr-dev",
"libgles2-mesa-dev",
"libvulkan-dev",
"glslang-dev"
], check=True)
if os_info.is_linux:
if os_info.with_apt:
installer = SystemPackageTool()
installer.install("libx11-dev")
installer.install("libxaw7-dev")
installer.install("libxrandr-dev")
installer.install("libgles2-mesa-dev")
installer.install("libvulkan-dev")
installer.install("glslang-dev")
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_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"),
tools.get(**self.conan_data["sources"][self.version], strip_root=True)
tools.replace_in_file(
"CMake/Dependencies.cmake",
"find_package(DirectX)",
"find_package(DirectX9)",
)
replace_in_file(self,
os.path.join(self.source_folder, "PlugIns/FreeImageCodec/CMakeLists.txt"),
"${FreeImage_LIBRARIES}",
"freeimage::FreeImage",
tools.replace_in_file(
"CMake/Dependencies.cmake",
"find_package(FreeImage)",
"find_package(ConanFreeImage)",
)
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/Packages/FindDirectX11.cmake"),
tools.replace_in_file(
"CMake/Packages/FindDirectX11.cmake",
'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 "',
)
shutil.copyfile(
"patches/FindFreeImage.cmake", "CMake/Packages/FindConanFreeImage.cmake"
)
for patch in self.conan_data["patches"][self.version]:
tools.patch(**patch)
def build(self):
self._patch_sources()
cmake = CMake(self)
cmake.configure()
cmake = self._configure_cmake()
cmake.build()
def package(self):
cmake = CMake(self)
cmake = self._configure_cmake()
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.name = "OGRE"
self.cpp_info.includedirs = [
"include",
"include/OGRE",
"include/OGRE/Bites",
"include/OGRE/HLMS",
"include/OGRE/MeshLodGenerator",
"include/OGRE/Overlay",
"include/OGRE/Paging",
@ -144,4 +131,4 @@ class OGREConan(ConanFile):
"include/OGRE/Threading",
"include/OGRE/Volume",
]
self.cpp_info.libs = collect_libs(self)
self.cpp_info.libs = tools.collect_libs(self)

View 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"

View 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"

View File

@ -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"

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -1,3 +1,5 @@
versions:
"13.5.3":
"1.11.6.1":
folder: "1.11"
"13.4.4":
folder: "13"

View File

@ -1,7 +1,5 @@
from conan import ConanFile
from conan.tools.files import get, collect_libs
from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout
from conan.tools.system import package_manager
from conans import ConanFile, CMake, tools
from conans.tools import os_info, SystemPackageTool
class OisConan(ConanFile):
@ -13,22 +11,18 @@ class OisConan(ConanFile):
topics = ("Input", "System")
settings = "os", "compiler", "build_type", "arch"
def layout(self):
cmake_layout(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):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
def generate(self):
tc = CMakeToolchain(self)
tc.variables["OIS_BUILD_DEMOS"] = "OFF"
tc.generate()
tools.get(**self.conan_data["sources"][self.version], strip_root=True)
def build(self):
cmake = CMake(self)
cmake.definitions['OIS_BUILD_DEMOS'] = 'OFF'
cmake.configure()
cmake.build()
@ -38,4 +32,4 @@ class OisConan(ConanFile):
def package_info(self):
self.cpp_info.includedirs = ['include', 'include/ois']
self.cpp_info.libs = collect_libs(self)
self.cpp_info.libs = tools.collect_libs(self)

View File

@ -1,3 +0,0 @@
@echo off
set PYTHONPATH=%~dp0
pylint --rcfile=linter/pylintrc_recipe %*

View File

@ -1,6 +1,5 @@
from conan import ConanFile
from conan.tools.files import get, collect_libs
from conan.tools.cmake import CMakeToolchain, CMake, CMakeDeps, cmake_layout
from conans import ConanFile, CMake, tools
class SocketwConan(ConanFile):
name = "socketw"
@ -8,22 +7,14 @@ class SocketwConan(ConanFile):
url = "https://github.com/RigsOfRods/socketw/issues"
description = "SocketW is a library which provides cross-platform socket abstraction"
settings = "os", "compiler", "build_type", "arch"
def layout(self):
cmake_layout(self)
generators = "cmake"
def requirements(self):
for req in self.conan_data["requirements"]:
self.requires(req)
def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
def generate(self):
tc = CMakeToolchain(self)
tc.generate()
deps = CMakeDeps(self)
deps.generate()
tools.get(**self.conan_data["sources"][self.version], strip_root=True)
def build(self):
cmake = CMake(self)
@ -35,8 +26,4 @@ class SocketwConan(ConanFile):
cmake.install()
def package_info(self):
self.cpp_info.set_property("cmake_module_file_name", "SocketW")
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)
self.cpp_info.libs = tools.collect_libs(self)

View File

@ -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"))