From ddc9725d176821165ceb90553680af036b993083 Mon Sep 17 00:00:00 2001 From: Valentin Date: Fri, 20 Dec 2024 19:57:55 +0100 Subject: [PATCH] WIP - trying to transitive entt headers --- lib/app/conanfile.py | 13 ++++++++----- lib/python_binding/conanfile.py | 21 ++++++++------------- tool/example/test/main.cpp | 4 ++++ 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/lib/app/conanfile.py b/lib/app/conanfile.py index de332a542..11df6be3b 100644 --- a/lib/app/conanfile.py +++ b/lib/app/conanfile.py @@ -29,16 +29,17 @@ def config_options(self): def layout(self): cmake_layout(self) - self.cpp.build.components["vtx_app"].libdirs = self.cpp.build.libdirs - self.cpp.build.components["vtx_app_no_opengl"].libdirs = self.cpp.build.libdirs + # self.cpp.build.components["vtx_app"].libdirs = self.cpp.build.libdirs + # self.cpp.build.components["vtx_app_no_opengl"].libdirs = self.cpp.build.libdirs def generate(self): tc = CMakeToolchain(self) dir_shaders = self.dependencies["vtx_renderer"].conf_info.get("user.myconf:dir_shaders") tc.cache_variables["DIR_SHADERS"] = dir_shaders - tc.generate() - for require, dependency in self.dependencies.items(): - self.output.info("VTX -- Dependency is direct={}: {}".format(require.direct, dependency.ref)) + for r, d in self.dependencies.items(): + self.output.info(f"Requirement {r}") + self.output.info(f"Is test {r.is_test} is override {r.override}") + tc.generate() def build(self): cmake = CMake(self) @@ -54,8 +55,10 @@ def package(self): def package_info(self): self.cpp_info.components["vtx_app"].libs = ["vtx_app"] self.cpp_info.components["vtx_app"].set_property("cmake_target_name", "vtx_app::vtx_app") + # self.cpp_info.components["vtx_app"].requires = ["vtx_util::vtx_util", "vtx_renderer::vtx_renderer", "vtx_core::vtx_core", "vtx_io::vtx_io", "EnTT::EnTT"] self.cpp_info.components["vtx_app_no_opengl"].libs = ["vtx_app_no_opengl"] self.cpp_info.components["vtx_app_no_opengl"].set_property("cmake_target_name", "vtx_app::vtx_app_no_opengl") + # self.cpp_info.components["vtx_app_no_opengl"].requires = ["vtx_util::vtx_util", "vtx_renderer::vtx_renderer_no_opengl", "vtx_core::vtx_core", "vtx_io::vtx_io", "EnTT::EnTT"] diff --git a/lib/python_binding/conanfile.py b/lib/python_binding/conanfile.py index 87e49b07e..fed259c80 100644 --- a/lib/python_binding/conanfile.py +++ b/lib/python_binding/conanfile.py @@ -14,7 +14,7 @@ class VTXPythonBindingRecipe(ConanFile): options = {"shared": [True, False], "fPIC": [True, False]} default_options = {"shared": False, "fPIC": True} - generators = "CMakeDeps" + generators = "CMakeDeps"#, "CMakeToolchain" # generators = "CMakeToolchain" exports_sources = "CMakeLists.txt", "src/*", "module/*", "include/*", "cmake/library.cmake", "cmake/vtx_python_binding_copy_files.cmake", "python_script/*", "test/*" @@ -31,21 +31,16 @@ def requirements(self): self.requires("pybind11/2.13.6") self.requires("catch2/3.7.0") - def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - + def generate(self): tc = CMakeToolchain(self) - tc.generate() - copy(self, "*.cmake", self.source_folder, self.build_folder) - - # def generate(self): - # deps = CMakeDeps(self) - # deps.check_components_exist = True - # deps.generate() - # copy(self, "*.cmake", self.source_folder, self.build_folder) + for r, d in self.dependencies.items(): + self.output.info(f"Requirement {r}") + self.output.info(f"Is test {r.is_test} is override {r.override}") + tc.generate() def layout(self): cmake_layout(self) @@ -66,10 +61,10 @@ def package(self): def package_info(self): self.cpp_info.components["vtx_python_binding"].libs = ["vtx_python_binding"] - self.cpp_info.components["vtx_python_binding"].set_property("cmake_target_name", "vtx_python_binding::vtx_python_binding") + # self.cpp_info.components["vtx_python_binding"].set_property("cmake_target_name", "vtx_python_binding::vtx_python_binding") self.cpp_info.components["vtx_python_bin"].libs = ["vtx_python_bin"] - self.cpp_info.components["vtx_python_bin"].set_property("cmake_target_name", "vtx_python_binding::vtx_python_bin") + # self.cpp_info.components["vtx_python_bin"].set_property("cmake_target_name", "vtx_python_binding::vtx_python_bin") self.cpp_info.components["vtx_python_binding_test"].libs = ["vtx_python_binding_test"] diff --git a/tool/example/test/main.cpp b/tool/example/test/main.cpp index c7503cb4d..97399acd9 100644 --- a/tool/example/test/main.cpp +++ b/tool/example/test/main.cpp @@ -1,3 +1,4 @@ +<<<<<<< Updated upstream #include #include #include @@ -6,6 +7,9 @@ #include #include // +======= +#include +>>>>>>> Stashed changes #include #include