2022-07-20 11:20:01 +08:00
|
|
|
cmake_minimum_required(VERSION 3.0)
|
|
|
|
project(z1_sdk)
|
2022-11-11 18:17:07 +08:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O3 -pthread")
|
2022-07-20 11:20:01 +08:00
|
|
|
|
2022-11-11 18:17:07 +08:00
|
|
|
set(EIGEN_PATH /usr/include/eigen3)
|
2022-07-20 11:20:01 +08:00
|
|
|
include_directories(
|
2022-11-11 18:17:07 +08:00
|
|
|
include/unitree_arm_sdk
|
|
|
|
${EIGEN_PATH}
|
2022-07-20 11:20:01 +08:00
|
|
|
)
|
|
|
|
|
2022-11-11 18:17:07 +08:00
|
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/../lib)
|
2022-07-20 11:20:01 +08:00
|
|
|
|
2022-11-11 18:17:07 +08:00
|
|
|
file(GLOB_RECURSE ADD_SRC_LIST
|
|
|
|
src/*/*.cpp
|
|
|
|
)
|
2022-09-19 17:08:57 +08:00
|
|
|
add_library(Z1_SDK_Linux64 SHARED ${ADD_SRC_LIST})
|
2022-07-20 11:20:01 +08:00
|
|
|
|
2022-11-11 18:17:07 +08:00
|
|
|
link_directories(lib)
|
2022-07-20 11:20:01 +08:00
|
|
|
|
2022-11-11 18:17:07 +08:00
|
|
|
add_executable(bigDemo examples/bigDemo.cpp )
|
2022-09-13 19:52:44 +08:00
|
|
|
target_link_libraries(bigDemo Z1_SDK_Linux64)
|
2022-11-11 18:17:07 +08:00
|
|
|
add_executable(example_lowCmd_send examples/example_lowCmd_send.cpp )
|
|
|
|
target_link_libraries(example_lowCmd_send Z1_SDK_Linux64)
|