From 5c457d77c1bc22e40ff1581e05cdba3948412770 Mon Sep 17 00:00:00 2001 From: Valentin Date: Wed, 4 Dec 2024 15:06:44 +0100 Subject: [PATCH] WIP - trying to make python work in CI --- lib/app/cmake/library.cmake | 1 - lib/app/conanfile.py | 13 ++++++++++--- lib/python_binding/CMakeLists.txt | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/app/cmake/library.cmake b/lib/app/cmake/library.cmake index df112a289..1bcf421a6 100644 --- a/lib/app/cmake/library.cmake +++ b/lib/app/cmake/library.cmake @@ -59,7 +59,6 @@ endif() target_link_libraries(vtx_app PUBLIC EnTT::EnTT) target_link_libraries(vtx_app_no_opengl PUBLIC EnTT::EnTT) target_link_libraries(vtx_app_test PRIVATE vtx_app_no_opengl) -#target_link_libraries(vtx_app_test PRIVATE vtx_app) target_link_libraries(vtx_app_test PRIVATE Catch2::Catch2WithMain) vtx_register_build_directory_copy("${CMAKE_CURRENT_LIST_DIR}/../data" "./data") diff --git a/lib/app/conanfile.py b/lib/app/conanfile.py index 6e85a37ba..fd502b7a2 100644 --- a/lib/app/conanfile.py +++ b/lib/app/conanfile.py @@ -35,8 +35,10 @@ def layout(self): 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.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)) def build(self): cmake = CMake(self) @@ -50,8 +52,13 @@ def package(self): cmake.install() def package_info(self): - 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"].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_io::vtx_io", "vtx_core::vtx_core", "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_io::vtx_io", "vtx_core::vtx_core", "entt::entt" ] + self.cpp_info.components["vtx_app_test"].libs = ["vtx_app_test"] + self.cpp_info.components["vtx_app_test"].set_property("cmake_target_name", "vtx_app::vtx_app") + self.cpp_info.components["vtx_app_test"].requires = ["vtx_util::vtx_util", "vtx_renderer::vtx_renderer_no_opengl", "vtx_app_no_opengl", "vtx_io::vtx_io", "vtx_core::vtx_core", "entt::entt", "catch2::catch2" ] diff --git a/lib/python_binding/CMakeLists.txt b/lib/python_binding/CMakeLists.txt index 600cdc62c..6bcd9f415 100644 --- a/lib/python_binding/CMakeLists.txt +++ b/lib/python_binding/CMakeLists.txt @@ -6,7 +6,7 @@ project(vtx_python_binding) find_package(vtx_util CONFIG REQUIRED) find_package(vtx_core CONFIG REQUIRED) -find_package(vtx_app CONFIG REQUIRED) +find_package(vtx_app CONFIG REQUIRED ) find_package(vtx_io CONFIG REQUIRED) find_package(pybind11 REQUIRED) find_package(EnTT CONFIG REQUIRED)