From f6e4666624d701804d3593de686e68d96d99a91e Mon Sep 17 00:00:00 2001 From: vidurvij-apptronik <152456958+vidurvij-apptronik@users.noreply.github.com> Date: Wed, 23 Oct 2024 14:59:33 -0500 Subject: [PATCH 01/12] Updating simulation cmake to install headers and so file if requested using a flag. --- simulate/CMakeLists.txt | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/simulate/CMakeLists.txt b/simulate/CMakeLists.txt index 487b1b16..b8a3c294 100644 --- a/simulate/CMakeLists.txt +++ b/simulate/CMakeLists.txt @@ -41,12 +41,16 @@ if(APPLE) enable_language(OBJCXX) endif() +if(NOT DEFINED expose_headers) + +endif() option(SIMULATE_BUILD_EXECUTABLE "Build the simulate executable binary." ON) option(SIMULATE_GLFW_DYNAMIC_SYMBOLS "Whether to resolve GLFW symbols dynamically." OFF) # Check if we are building as standalone project. set(SIMULATE_STANDALONE OFF) set(_INSTALL_SIMULATE ON) +set(EXPOSE_HEADERS OFF) if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) set(SIMULATE_STANDALONE ON) # If standalone, do not install the samples. @@ -128,7 +132,11 @@ add_library(mujoco::libsimulate ALIAS libsimulate) target_sources( libsimulate - PUBLIC simulate.h + PUBLIC + simulate.h + platform_ui_adapter.h + glfw_adapter.h + glfw_dispatch.h PRIVATE simulate.cc array_safety.h ) target_include_directories(libsimulate PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) @@ -223,6 +231,14 @@ if(SIMULATE_BUILD_EXECUTABLE) set(_INSTALL_SIMULATE OFF) endif() + target_link_libraries(libsimulate + PUBLIC + lodepng + mujoco::platform_ui_adapter + mujoco::mujoco + PRIVATE + # Add any private dependencies here +) if(_INSTALL_SIMULATE) include(TargetAddRpath) @@ -246,9 +262,21 @@ if(SIMULATE_BUILD_EXECUTABLE) LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT simulate ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT simulate BUNDLE DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT simulate - PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT simulate + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" COMPONENT simulate ) + # Specify public headers for libsimulate + if(SIMULATE_EXPOSE_HEADERS) + set_target_properties(libsimulate PROPERTIES PUBLIC_HEADER "simulate.h;platform_ui_adapter.h;glfw_adapter.h;glfw_dispatch.h") + + install( + TARGETS libsimulate + EXPORT ${PROJECT_NAME} + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT simulate + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/simulate" COMPONENT simulate + ) + endif() + if(NOT MUJOCO_SIMULATE_USE_SYSTEM_GLFW) # We downloaded GLFW. Depending if it is a static or shared LIBRARY we might # need to install it. @@ -260,7 +288,7 @@ if(SIMULATE_BUILD_EXECUTABLE) RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT simulate LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT simulate ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT simulate - PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT simulate + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" COMPONENT simulate ) endif() endif() From 832229a846e10f4ce51d4f377cc8a118dd9f67ba Mon Sep 17 00:00:00 2001 From: vidurvij-apptronik <152456958+vidurvij-apptronik@users.noreply.github.com> Date: Mon, 28 Oct 2024 09:25:38 -0500 Subject: [PATCH 02/12] Update CMakeLists.txt --- simulate/CMakeLists.txt | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/simulate/CMakeLists.txt b/simulate/CMakeLists.txt index b8a3c294..7bd54e36 100644 --- a/simulate/CMakeLists.txt +++ b/simulate/CMakeLists.txt @@ -137,7 +137,8 @@ target_sources( platform_ui_adapter.h glfw_adapter.h glfw_dispatch.h - PRIVATE simulate.cc array_safety.h + array_safety.h + PRIVATE simulate.cc ) target_include_directories(libsimulate PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_compile_options(libsimulate PRIVATE ${MUJOCO_SIMULATE_COMPILE_OPTIONS}) @@ -231,14 +232,6 @@ if(SIMULATE_BUILD_EXECUTABLE) set(_INSTALL_SIMULATE OFF) endif() - target_link_libraries(libsimulate - PUBLIC - lodepng - mujoco::platform_ui_adapter - mujoco::mujoco - PRIVATE - # Add any private dependencies here -) if(_INSTALL_SIMULATE) include(TargetAddRpath) @@ -267,7 +260,7 @@ if(SIMULATE_BUILD_EXECUTABLE) # Specify public headers for libsimulate if(SIMULATE_EXPOSE_HEADERS) - set_target_properties(libsimulate PROPERTIES PUBLIC_HEADER "simulate.h;platform_ui_adapter.h;glfw_adapter.h;glfw_dispatch.h") + set_target_properties(libsimulate PROPERTIES PUBLIC_HEADER "simulate.h;platform_ui_adapter.h;glfw_adapter.h;glfw_dispatch.h;glfw_corevideo.h;array_safety.h") install( TARGETS libsimulate From 9dd05d3b65eb205f36dbc9b28759aa229d38c323 Mon Sep 17 00:00:00 2001 From: vidurvij-apptronik <152456958+vidurvij-apptronik@users.noreply.github.com> Date: Mon, 28 Oct 2024 09:25:54 -0500 Subject: [PATCH 03/12] Update SimulateDependencies.cmake --- simulate/cmake/SimulateDependencies.cmake | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/simulate/cmake/SimulateDependencies.cmake b/simulate/cmake/SimulateDependencies.cmake index 5141406c..9ba1d5e8 100644 --- a/simulate/cmake/SimulateDependencies.cmake +++ b/simulate/cmake/SimulateDependencies.cmake @@ -102,3 +102,23 @@ if(NOT SIMULATE_STANDALONE) target_compile_options(glfw PRIVATE ${MUJOCO_MACOS_COMPILE_OPTIONS}) target_link_options(glfw PRIVATE ${MUJOCO_MACOS_LINK_OPTIONS}) endif() + + +message(STATUS "lolwaGLFW3 Source Directory: ${glfw3_SOURCE_DIR}") + +# Install GLFW headers if not using system GLFW +if(NOT MUJOCO_SIMULATE_USE_SYSTEM_GLFW) + FetchContent_GetProperties(glfw3) + if(NOT glfw3_POPULATED) + message(FATAL_ERROR "GLFW3 not populated") + endif() + + install( + DIRECTORY ${glfw3_SOURCE_DIR}/include/GLFW + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + COMPONENT simulate + FILES_MATCHING PATTERN "*.h" + PATTERN "CMake*" EXCLUDE + PATTERN ".git*" EXCLUDE + ) +endif() From 641d95313a2c2328c087ccb1e7c7e62973bca454 Mon Sep 17 00:00:00 2001 From: Vidur Date: Tue, 1 Jul 2025 16:25:07 -0500 Subject: [PATCH 04/12] Remove installing glfw3 headers --- simulate/CMakeLists.txt | 18 +----------------- simulate/cmake/SimulateDependencies.cmake | 19 ------------------- 2 files changed, 1 insertion(+), 36 deletions(-) diff --git a/simulate/CMakeLists.txt b/simulate/CMakeLists.txt index 96330194..f2a58a08 100644 --- a/simulate/CMakeLists.txt +++ b/simulate/CMakeLists.txt @@ -90,7 +90,7 @@ if(NOT TARGET lodepng) GIT_REPOSITORY https://github.com/lvandeve/lodepng.git GIT_TAG ${MUJOCO_DEP_VERSION_lodepng} ) - + FetchContent_GetProperties(lodepng) if(NOT lodepng_POPULATED) FetchContent_Populate(lodepng) @@ -270,21 +270,5 @@ if(SIMULATE_BUILD_EXECUTABLE) PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/simulate" COMPONENT simulate ) endif() - - if(NOT MUJOCO_SIMULATE_USE_SYSTEM_GLFW) - # We downloaded GLFW. Depending if it is a static or shared LIBRARY we might - # need to install it. - get_target_property(MJ_GLFW_LIBRARY_TYPE glfw TYPE) - if(MJ_GLFW_LIBRARY_TYPE STREQUAL SHARED_LIBRARY) - install( - TARGETS glfw - EXPORT ${PROJECT_NAME} - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT simulate - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT simulate - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT simulate - PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" COMPONENT simulate - ) - endif() - endif() endif() endif() diff --git a/simulate/cmake/SimulateDependencies.cmake b/simulate/cmake/SimulateDependencies.cmake index 9ba1d5e8..6a97802f 100644 --- a/simulate/cmake/SimulateDependencies.cmake +++ b/simulate/cmake/SimulateDependencies.cmake @@ -103,22 +103,3 @@ if(NOT SIMULATE_STANDALONE) target_link_options(glfw PRIVATE ${MUJOCO_MACOS_LINK_OPTIONS}) endif() - -message(STATUS "lolwaGLFW3 Source Directory: ${glfw3_SOURCE_DIR}") - -# Install GLFW headers if not using system GLFW -if(NOT MUJOCO_SIMULATE_USE_SYSTEM_GLFW) - FetchContent_GetProperties(glfw3) - if(NOT glfw3_POPULATED) - message(FATAL_ERROR "GLFW3 not populated") - endif() - - install( - DIRECTORY ${glfw3_SOURCE_DIR}/include/GLFW - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - COMPONENT simulate - FILES_MATCHING PATTERN "*.h" - PATTERN "CMake*" EXCLUDE - PATTERN ".git*" EXCLUDE - ) -endif() From 4c7c68e518fcdbceeca7aaad5581593cdca1d2d3 Mon Sep 17 00:00:00 2001 From: Vidur Date: Tue, 1 Jul 2025 18:17:21 -0500 Subject: [PATCH 05/12] add glfw3 install back to cmake --- simulate/CMakeLists.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/simulate/CMakeLists.txt b/simulate/CMakeLists.txt index 1378b9f4..d184d0f7 100644 --- a/simulate/CMakeLists.txt +++ b/simulate/CMakeLists.txt @@ -273,6 +273,22 @@ if(SIMULATE_BUILD_EXECUTABLE) ) endif() + if(NOT MUJOCO_SIMULATE_USE_SYSTEM_GLFW) + # We downloaded GLFW. Depending if it is a static or shared LIBRARY we might + # need to install it. + get_target_property(MJ_GLFW_LIBRARY_TYPE glfw TYPE) + if(MJ_GLFW_LIBRARY_TYPE STREQUAL SHARED_LIBRARY) + install( + TARGETS glfw + EXPORT ${PROJECT_NAME} + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT simulate + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT simulate + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT simulate + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT simulate + ) + endif() + endif() + install( TARGETS simulate EXPORT ${PROJECT_NAME} From b2300684d84e3d7ff9e41f8dea2778ac03d6afd2 Mon Sep 17 00:00:00 2001 From: Vidur Date: Tue, 1 Jul 2025 18:36:11 -0500 Subject: [PATCH 06/12] Remove unused variable definition --- simulate/CMakeLists.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/simulate/CMakeLists.txt b/simulate/CMakeLists.txt index d184d0f7..99095b56 100644 --- a/simulate/CMakeLists.txt +++ b/simulate/CMakeLists.txt @@ -41,9 +41,6 @@ if(APPLE) enable_language(OBJCXX) endif() -if(NOT DEFINED expose_headers) - -endif() option(SIMULATE_BUILD_EXECUTABLE "Build the simulate executable binary." ON) option(SIMULATE_GLFW_DYNAMIC_SYMBOLS "Whether to resolve GLFW symbols dynamically." OFF) From af87c6d7a06d4194ad4887a150144df4b07c518d Mon Sep 17 00:00:00 2001 From: Vidur Vij Date: Fri, 18 Jul 2025 12:39:07 -0500 Subject: [PATCH 07/12] Pull request changes --- simulate/CMakeLists.txt | 44 +++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/simulate/CMakeLists.txt b/simulate/CMakeLists.txt index 99095b56..4c945e3d 100644 --- a/simulate/CMakeLists.txt +++ b/simulate/CMakeLists.txt @@ -47,7 +47,7 @@ option(SIMULATE_GLFW_DYNAMIC_SYMBOLS "Whether to resolve GLFW symbols dynamicall # Check if we are building as standalone project. set(SIMULATE_STANDALONE OFF) set(_INSTALL_SIMULATE ON) -set(EXPOSE_HEADERS OFF) + if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) set(SIMULATE_STANDALONE ON) # If standalone, do not install the samples. @@ -124,12 +124,14 @@ if(SIMULATE_GLFW_DYNAMIC_SYMBOLS) endif() add_library(mujoco::platform_ui_adapter ALIAS platform_ui_adapter) -add_library(libsimulate STATIC $) -set_target_properties(libsimulate PROPERTIES OUTPUT_NAME simulate) -add_library(mujoco::libsimulate ALIAS libsimulate) +add_library(libmujoco_simulate STATIC $) +set_target_properties(libmujoco_simulate PROPERTIES OUTPUT_NAME simulate) +add_library(mujoco::libmujoco_simulate ALIAS libmujoco_simulate) +set_target_properties(libmujoco_simulate PROPERTIES PUBLIC_HEADER "simulate.h;platform_ui_adapter.h;glfw_adapter.h;glfw_dispatch.h;glfw_corevideo.h;array_safety.h") + target_sources( - libsimulate + libmujoco_simulate PUBLIC simulate.h platform_ui_adapter.h @@ -138,14 +140,14 @@ target_sources( array_safety.h PRIVATE simulate.cc ) -target_include_directories(libsimulate PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) -target_compile_options(libsimulate PRIVATE ${MUJOCO_SIMULATE_COMPILE_OPTIONS}) -target_link_libraries(libsimulate PUBLIC lodepng mujoco::platform_ui_adapter mujoco::mujoco) -target_link_options(libsimulate PRIVATE ${MUJOCO_SIMULATE_LINK_OPTIONS}) +target_include_directories(libmujoco_simulate PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +target_compile_options(libmujoco_simulate PRIVATE ${MUJOCO_SIMULATE_COMPILE_OPTIONS}) +target_link_libraries(libmujoco_simulate PUBLIC lodepng mujoco::platform_ui_adapter mujoco::mujoco) +target_link_options(libmujoco_simulate PRIVATE ${MUJOCO_SIMULATE_LINK_OPTIONS}) if(APPLE) - target_sources(libsimulate PRIVATE macos_gui.mm) - target_link_libraries(libsimulate PUBLIC "-framework Cocoa") + target_sources(libmujoco_simulate PRIVATE macos_gui.mm) + target_link_libraries(libmujoco_simulate PUBLIC "-framework Cocoa") endif() # Build simulate executable @@ -173,7 +175,7 @@ if(SIMULATE_BUILD_EXECUTABLE) target_link_libraries( simulate - libsimulate + libmujoco_simulate mujoco::mujoco glfw Threads::Threads @@ -296,16 +298,16 @@ if(SIMULATE_BUILD_EXECUTABLE) PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" COMPONENT simulate ) - # Specify public headers for libsimulate - if(SIMULATE_EXPOSE_HEADERS) - set_target_properties(libsimulate PROPERTIES PUBLIC_HEADER "simulate.h;platform_ui_adapter.h;glfw_adapter.h;glfw_dispatch.h;glfw_corevideo.h;array_safety.h") + # Specify public headers for libmujoco_simulate - install( - TARGETS libsimulate - EXPORT ${PROJECT_NAME} - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT simulate - PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/simulate" COMPONENT simulate - ) + install( + TARGETS libmujoco_simulate + EXPORT ${PROJECT_NAME} + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT simulate + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT simulate + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT simulate + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/simulate" COMPONENT simulate + ) endif() endif() endif() From d13329ed1d446da9c17e9da56a09c6e0416f7bca Mon Sep 17 00:00:00 2001 From: Vidur Date: Wed, 23 Jul 2025 12:53:38 -0500 Subject: [PATCH 08/12] adding build interfaces to the linked directories --- simulate/CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/simulate/CMakeLists.txt b/simulate/CMakeLists.txt index 4c945e3d..fcad5337 100644 --- a/simulate/CMakeLists.txt +++ b/simulate/CMakeLists.txt @@ -115,7 +115,7 @@ if(APPLE) target_link_libraries(platform_ui_adapter PUBLIC "-framework CoreVideo") endif() target_include_directories( - platform_ui_adapter PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} + platform_ui_adapter PUBLIC $ $ ) target_link_libraries(platform_ui_adapter PUBLIC mujoco::mujoco) @@ -140,7 +140,7 @@ target_sources( array_safety.h PRIVATE simulate.cc ) -target_include_directories(libmujoco_simulate PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories(libmujoco_simulate PUBLIC $) target_compile_options(libmujoco_simulate PRIVATE ${MUJOCO_SIMULATE_COMPILE_OPTIONS}) target_link_libraries(libmujoco_simulate PUBLIC lodepng mujoco::platform_ui_adapter mujoco::mujoco) target_link_options(libmujoco_simulate PRIVATE ${MUJOCO_SIMULATE_LINK_OPTIONS}) @@ -308,6 +308,5 @@ if(SIMULATE_BUILD_EXECUTABLE) ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT simulate PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/simulate" COMPONENT simulate ) - endif() endif() endif() From edb17909a738c6685d98e09a99b21d9a4cd27579 Mon Sep 17 00:00:00 2001 From: Vidur Date: Sat, 9 Aug 2025 13:06:21 -0500 Subject: [PATCH 09/12] Update cmake --- simulate/CMakeLists.txt | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/simulate/CMakeLists.txt b/simulate/CMakeLists.txt index fcad5337..c459be0f 100644 --- a/simulate/CMakeLists.txt +++ b/simulate/CMakeLists.txt @@ -94,7 +94,7 @@ if(NOT TARGET lodepng) # This is not a CMake project. set(LODEPNG_SRCS ${lodepng_SOURCE_DIR}/lodepng.cpp) set(LODEPNG_HEADERS ${lodepng_SOURCE_DIR}/lodepng.h) - add_library(lodepng STATIC ${LODEPNG_HEADERS} ${LODEPNG_SRCS}) + add_library(lodepng OBJECT ${LODEPNG_HEADERS} ${LODEPNG_SRCS}) target_compile_options(lodepng PRIVATE ${MUJOCO_MACOS_COMPILE_OPTIONS}) target_link_options(lodepng PRIVATE ${MUJOCO_MACOS_LINK_OPTIONS}) target_include_directories(lodepng PUBLIC ${lodepng_SOURCE_DIR}) @@ -124,7 +124,7 @@ if(SIMULATE_GLFW_DYNAMIC_SYMBOLS) endif() add_library(mujoco::platform_ui_adapter ALIAS platform_ui_adapter) -add_library(libmujoco_simulate STATIC $) +add_library(libmujoco_simulate STATIC $ $) set_target_properties(libmujoco_simulate PROPERTIES OUTPUT_NAME simulate) add_library(mujoco::libmujoco_simulate ALIAS libmujoco_simulate) set_target_properties(libmujoco_simulate PROPERTIES PUBLIC_HEADER "simulate.h;platform_ui_adapter.h;glfw_adapter.h;glfw_dispatch.h;glfw_corevideo.h;array_safety.h") @@ -132,17 +132,17 @@ set_target_properties(libmujoco_simulate PROPERTIES PUBLIC_HEADER "simulate.h;pl target_sources( libmujoco_simulate - PUBLIC - simulate.h - platform_ui_adapter.h - glfw_adapter.h - glfw_dispatch.h - array_safety.h PRIVATE simulate.cc ) -target_include_directories(libmujoco_simulate PUBLIC $) +target_include_directories(libmujoco_simulate + PUBLIC + $ + $ + PRIVATE + ${lodepng_SOURCE_DIR} +) target_compile_options(libmujoco_simulate PRIVATE ${MUJOCO_SIMULATE_COMPILE_OPTIONS}) -target_link_libraries(libmujoco_simulate PUBLIC lodepng mujoco::platform_ui_adapter mujoco::mujoco) +target_link_libraries(libmujoco_simulate PUBLIC mujoco::mujoco) target_link_options(libmujoco_simulate PRIVATE ${MUJOCO_SIMULATE_LINK_OPTIONS}) if(APPLE) @@ -179,8 +179,11 @@ if(SIMULATE_BUILD_EXECUTABLE) mujoco::mujoco glfw Threads::Threads - lodepng ) + + if(APPLE) + target_link_libraries(simulate "-framework CoreVideo") + endif() if (MUJOCO_WITH_USD) target_link_libraries( @@ -302,7 +305,7 @@ if(SIMULATE_BUILD_EXECUTABLE) install( TARGETS libmujoco_simulate - EXPORT ${PROJECT_NAME} + EXPORT mujoco RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT simulate LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT simulate ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT simulate From b88ec4df738259e424a3f13119b6d1e06369d82f Mon Sep 17 00:00:00 2001 From: vidurvij-apptronik <152456958+vidurvij-apptronik@users.noreply.github.com> Date: Thu, 21 Aug 2025 14:10:44 -0500 Subject: [PATCH 10/12] Fix SimulateDependecies --- simulate/cmake/SimulateDependencies.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simulate/cmake/SimulateDependencies.cmake b/simulate/cmake/SimulateDependencies.cmake index 6a97802f..9a075164 100644 --- a/simulate/cmake/SimulateDependencies.cmake +++ b/simulate/cmake/SimulateDependencies.cmake @@ -98,7 +98,7 @@ if(MUJOCO_EXTRAS_STATIC_GLFW) unset(BUILD_SHARED_LIBS_OLD) endif() -if(NOT SIMULATE_STANDALONE) +if(NOT SIMULATE_STANDALONE AND NOT MUJOCO_SIMULATE_USE_SYSTEM_GLFW) target_compile_options(glfw PRIVATE ${MUJOCO_MACOS_COMPILE_OPTIONS}) target_link_options(glfw PRIVATE ${MUJOCO_MACOS_LINK_OPTIONS}) endif() From df6b5031010a5f9c8acc6e9a8a672c6c7b9aef57 Mon Sep 17 00:00:00 2001 From: vidurvij-apptronik <152456958+vidurvij-apptronik@users.noreply.github.com> Date: Thu, 21 Aug 2025 14:34:12 -0500 Subject: [PATCH 11/12] Update simulate library name in python cmake --- python/mujoco/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/mujoco/CMakeLists.txt b/python/mujoco/CMakeLists.txt index 87441234..47606d12 100644 --- a/python/mujoco/CMakeLists.txt +++ b/python/mujoco/CMakeLists.txt @@ -454,7 +454,7 @@ mujoco_pybind11_module(_simulate simulate.cc) target_link_libraries( _simulate PRIVATE mujoco - mujoco::libsimulate + mujoco::libmujoco_simulate errors_header raw structs_header From 28aa33b6735ec8ab11b1350d11e43ecf0d06a78f Mon Sep 17 00:00:00 2001 From: vidurvij-apptronik <152456958+vidurvij-apptronik@users.noreply.github.com> Date: Wed, 27 Aug 2025 12:00:37 -0500 Subject: [PATCH 12/12] expose glfw --- python/mujoco/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/python/mujoco/CMakeLists.txt b/python/mujoco/CMakeLists.txt index 47606d12..33d9d8e2 100644 --- a/python/mujoco/CMakeLists.txt +++ b/python/mujoco/CMakeLists.txt @@ -455,6 +455,7 @@ target_link_libraries( _simulate PRIVATE mujoco mujoco::libmujoco_simulate + glfw errors_header raw structs_header