diff --git a/CMakeLists.txt b/CMakeLists.txt index 83b17e6..5291d57 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,14 +9,8 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(PkgConfig REQUIRED) find_package(Threads REQUIRED) -# Find unitree_sdk2 -set(UNITREE_SDK2_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../unitree_sdk2") -if(NOT EXISTS ${UNITREE_SDK2_PATH}) - message(FATAL_ERROR "unitree_sdk2 not found at ${UNITREE_SDK2_PATH}") -endif() - -# Add unitree_sdk2 as subdirectory -add_subdirectory(${UNITREE_SDK2_PATH} unitree_sdk2) +# Find installed unitree_sdk2 +find_package(unitree_sdk2 REQUIRED) # Find MQTT library (Eclipse Paho) pkg_check_modules(PAHO_MQTT REQUIRED libpaho-mqtt3c) @@ -28,7 +22,6 @@ find_package(nlohmann_json REQUIRED) # Include directories include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/include - ${UNITREE_SDK2_PATH}/include ) # Source files @@ -69,7 +62,3 @@ install(TARGETS main RUNTIME DESTINATION bin ) -# Copy config files -install(FILES config/robot_config.json - DESTINATION etc/${PROJECT_NAME} -)