Move Mujoco struct wrappers definitions into library separate from pybind module.

This allows other modules to depend on functions such as FromRawPointer that previously were only defined in the _struct python module.

PiperOrigin-RevId: 745619670
Change-Id: I9f1af60cb665c00d853b7ca38201b37302d278af
This commit is contained in:
Sam Haves
2025-04-09 09:27:40 -07:00
committed by Copybara-Service
parent da1850760a
commit eadd13038a
3 changed files with 1505 additions and 1459 deletions
+20
View File
@@ -278,6 +278,25 @@ target_link_libraries(
raw
)
add_library(structs_wrappers STATIC
structs_wrappers.cc
serialization.h
indexers.cc
)
target_include_directories(structs_wrappers PRIVATE ${Python3_INCLUDE_DIRS})
target_link_libraries(
structs_wrappers
PRIVATE absl::flat_hash_map
absl::span
crossplatform
mujoco
raw
structs_header
pybind11::headers
Eigen3::Eigen
)
add_library(functions_header INTERFACE)
target_sources(functions_header INTERFACE functions.h)
set_target_properties(functions_header PROPERTIES PUBLIC_HEADER functions.h)
@@ -403,6 +422,7 @@ target_link_libraries(
func_wrap
function_traits
structs_header
structs_wrappers
)
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/specs.cc.inc)
+157 -1459
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff