Skip to content

Commit

Permalink
WIP - trying to transitive entt headers
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinGuillaume committed Dec 20, 2024
1 parent 2b294bf commit ddc9725
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
13 changes: 8 additions & 5 deletions lib/app/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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"]


21 changes: 8 additions & 13 deletions lib/python_binding/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/*"
Expand All @@ -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)
Expand All @@ -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"]

Expand Down
4 changes: 4 additions & 0 deletions tool/example/test/main.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<<<<<<< Updated upstream
#include <app/action/application.hpp>
#include <app/action/scene.hpp>
#include <app/application/scene.hpp>
Expand All @@ -6,6 +7,9 @@
#include <app/fixture.hpp>
#include <app/vtx_app.hpp>
//
=======
#include <app/component/controller.hpp>
>>>>>>> Stashed changes
#include <app/fixture.hpp>
#include <catch2/catch_test_macros.hpp>

Expand Down

0 comments on commit ddc9725

Please sign in to comment.