Add new simulate to CI.
PiperOrigin-RevId: 468670988 Change-Id: I2c6c7ac4763402f2a3e8df734746477e54a8ed8e
This commit is contained in:
committed by
Copybara-Service
parent
833dc74074
commit
d466e390fc
@@ -22,6 +22,11 @@ set(CMAKE_POLICY_DEFAULT_CMP0072 NEW)
|
||||
# This line has to appear before 'PROJECT' in order to be able to disable incremental linking
|
||||
set(MSVC_INCREMENTAL_DEFAULT ON)
|
||||
|
||||
set(MUJOCO_DEP_VERSION_lodepng
|
||||
b4ed2cd7ecf61d29076169b49199371456d4f90b
|
||||
CACHE STRING "Version of `lodepng` to be fetched."
|
||||
)
|
||||
|
||||
project(
|
||||
mujoco_simulate
|
||||
VERSION 2.2.1
|
||||
@@ -71,6 +76,27 @@ if(MUJOCO_HARDEN)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Fetch lodepng dependency.
|
||||
if(NOT TARGET lodepng)
|
||||
FetchContent_Declare(
|
||||
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)
|
||||
# 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})
|
||||
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})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# mjsimulate library
|
||||
add_library(mjsimulate STATIC)
|
||||
target_sources(
|
||||
|
||||
Reference in New Issue
Block a user