Skip to content

Commit

Permalink
WIP - trying to make python work in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinGuillaume committed Dec 5, 2024
1 parent f22e13f commit e4ca83d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
26 changes: 13 additions & 13 deletions lib/app/cmake/library.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ target_sources(vtx_app
PRIVATE ${SOURCES}
PUBLIC FILE_SET public_headers TYPE HEADERS BASE_DIRS "${CMAKE_CURRENT_LIST_DIR}/../include" FILES ${HEADERS})

add_library(vtx_app_no_opengl)
configure_target(vtx_app_no_opengl)
add_library(poneyponey)
configure_target(poneyponey)

target_sources(vtx_app_no_opengl
target_sources(poneyponey
PRIVATE ${SOURCES}
PUBLIC FILE_SET public_headers TYPE HEADERS BASE_DIRS "${CMAKE_CURRENT_LIST_DIR}/../include" FILES ${HEADERS})

Expand All @@ -33,10 +33,10 @@ if (NOT DEFINED _VTX_APP_CONAN)
target_link_libraries(vtx_app PRIVATE vtx_renderer)
target_link_libraries(vtx_app PRIVATE vtx_core)
target_link_libraries(vtx_app PRIVATE vtx_io)
target_link_libraries(vtx_app_no_opengl PRIVATE vtx_util)
target_link_libraries(vtx_app_no_opengl PRIVATE vtx_renderer_no_opengl)
target_link_libraries(vtx_app_no_opengl PRIVATE vtx_core)
target_link_libraries(vtx_app_no_opengl PRIVATE vtx_io)
target_link_libraries(poneyponey PRIVATE vtx_util)
target_link_libraries(poneyponey PRIVATE vtx_renderer_no_opengl)
target_link_libraries(poneyponey PRIVATE vtx_core)
target_link_libraries(poneyponey PRIVATE vtx_io)
target_link_libraries(vtx_app_test PRIVATE vtx_util)
target_link_libraries(vtx_app_test PRIVATE vtx_renderer_no_opengl)
target_link_libraries(vtx_app_test PRIVATE vtx_core)
Expand All @@ -46,19 +46,19 @@ else()
target_link_libraries(vtx_app PUBLIC vtx_renderer::vtx_renderer)
target_link_libraries(vtx_app PRIVATE vtx_core::vtx_core)
target_link_libraries(vtx_app PRIVATE vtx_io::vtx_io)
target_link_libraries(vtx_app_no_opengl PRIVATE vtx_util::vtx_util)
target_link_libraries(vtx_app_no_opengl PUBLIC vtx_renderer::vtx_renderer_no_opengl)
target_link_libraries(vtx_app_no_opengl PRIVATE vtx_core::vtx_core)
target_link_libraries(vtx_app_no_opengl PRIVATE vtx_io::vtx_io)
target_link_libraries(poneyponey PRIVATE vtx_util::vtx_util)
target_link_libraries(poneyponey PUBLIC vtx_renderer::vtx_renderer_no_opengl)
target_link_libraries(poneyponey PRIVATE vtx_core::vtx_core)
target_link_libraries(poneyponey PRIVATE vtx_io::vtx_io)
target_link_libraries(vtx_app_test PRIVATE vtx_util::vtx_util)
target_link_libraries(vtx_app_test PUBLIC vtx_renderer::vtx_renderer_no_opengl)
target_link_libraries(vtx_app_test PRIVATE vtx_core::vtx_core)
target_link_libraries(vtx_app_test PRIVATE vtx_io::vtx_io)
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(poneyponey PUBLIC EnTT::EnTT)
target_link_libraries(vtx_app_test PRIVATE poneyponey)
target_link_libraries(vtx_app_test PRIVATE Catch2::Catch2WithMain)

vtx_register_build_directory_copy("${CMAKE_CURRENT_LIST_DIR}/../data" "./data")
Expand Down
10 changes: 5 additions & 5 deletions lib/app/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ 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["poneyponey"].libdirs = self.cpp.build.libdirs

def generate(self):
tc = CMakeToolchain(self)
Expand All @@ -56,11 +56,11 @@ def package_info(self):
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["poneyponey"].libs = ["poneyponey"]
self.cpp_info.components["poneyponey"].set_property("cmake_target_name", "vtx_app::poneyponey")
self.cpp_info.components["poneyponey"].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_test")

self.cpp_info.components["vtx_app_test"].requires = [ "vtx_app_no_opengl", "catch2::catch2" ]
self.cpp_info.components["vtx_app_test"].requires = [ "poneyponey", "catch2::catch2" ]

2 changes: 1 addition & 1 deletion lib/python_binding/cmake/library.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ else()
target_link_libraries(vtx_python_binding_test PRIVATE vtx_util::vtx_util)
target_link_libraries(vtx_python_binding_test PRIVATE vtx_core::vtx_core)
target_link_libraries(vtx_python_binding_test PRIVATE vtx_io::vtx_io)
target_link_libraries(vtx_python_binding_test PRIVATE vtx_app::vtx_app_no_opengl)
target_link_libraries(vtx_python_binding_test PRIVATE vtx_app::poneyponey)
endif()

# TODO : are those lines usefull ?
Expand Down
2 changes: 1 addition & 1 deletion lib/renderer/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def package_info(self):

self.cpp_info.components["vtx_renderer_no_opengl"].libs = ["vtx_renderer_no_opengl"]
self.cpp_info.components["vtx_renderer_no_opengl"].set_property("cmake_target_name", "vtx_renderer::vtx_renderer_no_opengl")
self.cpp_info.components["vtx_renderer_no_opengl"].requires = ["vtx_util::vtx_util"]
# self.cpp_info.components["vtx_renderer_no_opengl"].requires = ["vtx_util::vtx_util"]
#self.cpp_info.components["vtx_renderer_no_opengl"].includedirs = ["include"]

self.cpp_info.components["vtx_renderer_test"].requires = ["catch2::catch2"]
Expand Down

0 comments on commit e4ca83d

Please sign in to comment.