Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,13 @@ add_subdirectory(src/engine)
add_subdirectory(src/user)
add_subdirectory(src/xml)
add_subdirectory(src/xml/mjz)
if(NOT EMSCRIPTEN AND NOT MUJOCO_USE_FILAMENT_MJR_COMPAT)
if(NOT EMSCRIPTEN
AND NOT MUJOCO_USE_FILAMENT_MJR_COMPAT
AND NOT CMAKE_SYSTEM_NAME STREQUAL "QNX")
add_subdirectory(src/render/classic)
add_subdirectory(src/ui)
endif()

add_subdirectory(src/render/noop)

if(MUJOCO_USE_FILAMENT)
Expand Down
23 changes: 16 additions & 7 deletions cmake/MujocoDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,12 @@ if(CMAKE_POLICY_VERSION_MINIMUM_LOCALLY_DEFINED)
unset(CMAKE_POLICY_VERSION_MINIMUM_LOCALLY_DEFINED)
endif()

set(ENABLE_DOUBLE_PRECISION ON)
# build ccd in single precision when MuJoCo is built with mjUSESINGLE
if(CMAKE_C_FLAGS MATCHES "mjUSESINGLE")
set(ENABLE_DOUBLE_PRECISION OFF)
else()
set(ENABLE_DOUBLE_PRECISION ON)
endif()
set(CCD_HIDE_ALL_SYMBOLS ON)

# Patch changes in https://github.com/danfis/libccd/pull/83.patch
Expand Down Expand Up @@ -254,12 +259,16 @@ else()
set(_BUILD_TESTS_WAS_DEFINED FALSE)
endif()
set(BUILD_TESTS OFF)
fetchpackage(
PACKAGE_NAME miniz
GIT_REPO https://github.com/richgel999/miniz.git
GIT_TAG ${MUJOCO_DEP_VERSION_miniz}
TARGETS miniz
)
if(CMAKE_SYSTEM_NAME STREQUAL "QNX")
find_package(miniz CONFIG REQUIRED)
else()
fetchpackage(
PACKAGE_NAME miniz
GIT_REPO https://github.com/richgel999/miniz.git
GIT_TAG ${MUJOCO_DEP_VERSION_miniz}
TARGETS miniz
)
endif()
if(_BUILD_TESTS_WAS_DEFINED)
set(BUILD_TESTS "${_OLD_BUILD_TESTS}")
else()
Expand Down
2 changes: 1 addition & 1 deletion src/engine/engine_util_errmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ static void mju_localTimeStr(char* buf, int buf_sz) {
struct tm timeinfo;
time(&rawtime);

#if defined(_POSIX_C_SOURCE) || defined(__APPLE__) || defined(__STDC_VERSION_TIME_H__) || defined(__EMSCRIPTEN__)
#if defined(_POSIX_C_SOURCE) || defined(__APPLE__) || defined(__STDC_VERSION_TIME_H__) || defined(__EMSCRIPTEN__) || defined(__QNXNTO__)
localtime_r(&rawtime, &timeinfo);
#elif defined(_WIN32)
localtime_s(&timeinfo, &rawtime);
Expand Down
2 changes: 1 addition & 1 deletion src/xml/mjz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ set(MUJOCO_MJZ_SRCS
)

target_sources(mujoco PRIVATE ${MUJOCO_MJZ_SRCS})
target_link_libraries(mujoco PRIVATE miniz)
target_link_libraries(mujoco PRIVATE miniz::miniz)
Loading