unitree_mujoco/simulate/CMakeLists.txt

35 lines
814 B
CMake
Raw Normal View History

2024-04-29 15:02:43 +08:00
cmake_minimum_required(VERSION 3.16)
project(unitree_mujoco)
enable_language(C)
enable_language(CXX)
set(CMAKE_CXX_STANDARD 17)
2024-09-03 21:08:21 +08:00
set(CMAKE_CXX_STANDARD_REQUIRED ON)
2024-04-29 15:02:43 +08:00
2024-09-03 21:08:21 +08:00
list(APPEND CMAKE_PREFIX_PATH "/opt/unitree_robotics/lib/cmake")
2024-04-29 15:02:43 +08:00
find_package(mujoco REQUIRED)
2024-09-03 21:08:21 +08:00
find_package(unitree_sdk2 REQUIRED)
2024-04-29 15:02:43 +08:00
FILE (GLOB SIM_SRC
2024-05-23 11:30:21 +08:00
src/joystick/joystick.cc
2024-04-29 15:02:43 +08:00
src/mujoco/*.cc
src/unitree_sdk2_bridge/*.cc)
set(SIM_DEPENDENCIES
pthread
mujoco::mujoco
glfw
2024-09-03 21:08:21 +08:00
yaml-cpp
unitree_sdk2)
2024-04-29 15:02:43 +08:00
add_executable(unitree_mujoco ${SIM_SRC} src/main.cc)
target_link_libraries(unitree_mujoco ${SIM_DEPENDENCIES})
add_executable(test test/test_unitree_sdk2.cpp)
2024-09-03 21:08:21 +08:00
target_link_libraries(test unitree_sdk2)
2024-05-23 11:30:21 +08:00
add_executable(jstest src/joystick/jstest.cc src/joystick/joystick.cc)
2024-04-29 15:02:43 +08:00
SET(CMAKE_BUILD_TYPE Release)