30 lines
766 B
CMake
30 lines
766 B
CMake
cmake_minimum_required(VERSION 3.10)
|
|
project(h1_inspire_service VERSION 0.1.0)
|
|
|
|
if(NOT CMAKE_BUILD_TYPE)
|
|
set(CMAKE_BUILD_TYPE Debug)
|
|
endif()
|
|
|
|
if (CMAKE_BUILD_TYPE MATCHES "Debug")
|
|
message("Debug mode")
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -g -O0 -fPIC")
|
|
else()
|
|
message("Release mode")
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O3 -DNDEBUG -fPIC")
|
|
endif()
|
|
|
|
find_package(Boost COMPONENTS program_options REQUIRED)
|
|
|
|
include_directories(
|
|
/usr/local/include/ddscxx
|
|
/usr/local/include/iceoryx/v2.0.2
|
|
include
|
|
)
|
|
|
|
link_libraries(unitree_sdk2 ddsc ddscxx rt pthread)
|
|
link_libraries(unitree_idl libboost_program_options.a)
|
|
|
|
add_executable(inspire_hand inspire_ctrl.cpp)
|
|
|
|
# example
|
|
add_executable(h1_hand_example example/inspire_hand.cpp) |