From 49c281e3cff426cd819779ac47ecfcad92769952 Mon Sep 17 00:00:00 2001 From: Michel Hidalgo Date: Mon, 14 Oct 2024 13:56:29 -0300 Subject: [PATCH] Restore cli11 dependency Signed-off-by: Michel Hidalgo --- .devcontainer/Dockerfile.amd64 | 1 + cpp/CMakeLists.txt | 13 ++++--------- cpp/cmake/ProjectConfig.cmake.in | 1 + 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.devcontainer/Dockerfile.amd64 b/.devcontainer/Dockerfile.amd64 index 1939010..1e4c0af 100644 --- a/.devcontainer/Dockerfile.amd64 +++ b/.devcontainer/Dockerfile.amd64 @@ -6,6 +6,7 @@ RUN apt-get update --fix-missing \ ca-certificates \ cmake \ git \ + libcli11-dev \ libeigen3-dev \ libgrpc++-dev \ libprotobuf-dev \ diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index f0f8ffa..eea9e12 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -17,9 +17,11 @@ find_package(PkgConfig REQUIRED) pkg_check_modules(GRPC REQUIRED grpc) pkg_check_modules(GRPCPP REQUIRED grpc++) find_program(GRPC_CPP_PLUGIN_LOCATION grpc_cpp_plugin REQUIRED) - +find_package(CLI11 REQUIRED) find_package(Threads REQUIRED) +include_directories(SYSTEM $) + set(CMAKE_EXPORT_COMPILE_COMMANDS true) # Command-line arguments: @@ -195,8 +197,7 @@ include(CMakePackageConfigHelpers) ### EXAMPLE EXECUTABLES ### if(BUILD_EXAMPLES) -find_package(CLI11 REQUIRED) - + link_directories( ${PROTOBUF_LIB_DIR} ) @@ -205,7 +206,6 @@ target_compile_features(arm_grasp_carry_overrides PUBLIC cxx_std_17) target_include_directories(arm_grasp_carry_overrides PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${PROTOBUF_INCLUDE_DIR} - $ ) target_link_libraries(arm_grasp_carry_overrides PUBLIC bosdyn_client_static) install(TARGETS arm_grasp_carry_overrides DESTINATION ${CMAKE_INSTALL_BINDIR}) @@ -223,7 +223,6 @@ target_compile_features(basic_robot_command PUBLIC cxx_std_17) target_include_directories(basic_robot_command PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${PROTOBUF_INCLUDE_DIR} - $ ) target_link_libraries(basic_robot_command PUBLIC bosdyn_client_static) install(TARGETS basic_robot_command DESTINATION ${CMAKE_INSTALL_BINDIR}) @@ -232,7 +231,6 @@ target_compile_features(get_image PUBLIC cxx_std_17) target_include_directories(get_image PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${PROTOBUF_INCLUDE_DIR} - $ ) target_link_libraries(get_image PUBLIC bosdyn_client_static) install(TARGETS get_image DESTINATION ${CMAKE_INSTALL_BINDIR}) @@ -241,7 +239,6 @@ target_compile_features(hello_spot PUBLIC cxx_std_17) target_include_directories(hello_spot PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${PROTOBUF_INCLUDE_DIR} - $ ) target_link_libraries(hello_spot PUBLIC bosdyn_client_static) install(TARGETS hello_spot DESTINATION ${CMAKE_INSTALL_BINDIR}) @@ -250,7 +247,6 @@ target_compile_features(inverse_kinematics_reachability PUBLIC cxx_std_17) target_include_directories(inverse_kinematics_reachability PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${PROTOBUF_INCLUDE_DIR} - $ ) target_link_libraries(inverse_kinematics_reachability PUBLIC bosdyn_client_static) install(TARGETS inverse_kinematics_reachability DESTINATION ${CMAKE_INSTALL_BINDIR}) @@ -259,7 +255,6 @@ target_compile_features(spot_cam PUBLIC cxx_std_17) target_include_directories(spot_cam PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${PROTOBUF_INCLUDE_DIR} - $ ) target_link_libraries(spot_cam PUBLIC bosdyn_client_static) install(TARGETS spot_cam DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/cpp/cmake/ProjectConfig.cmake.in b/cpp/cmake/ProjectConfig.cmake.in index eda0dc9..fc53629 100644 --- a/cpp/cmake/ProjectConfig.cmake.in +++ b/cpp/cmake/ProjectConfig.cmake.in @@ -11,6 +11,7 @@ find_dependency(PkgConfig CONFIG REQUIRED) pkg_check_modules(GRPC REQUIRED grpc) pkg_check_modules(GRPCPP REQUIRED grpc++) find_dependency(Threads REQUIRED) +find_dependency(CLI11 REQUIRED) # Pick up the auto-generated file which knows how to add the library targets # This will mean that we do not have to supply full paths for the libraries set(exports_file "${CMAKE_CURRENT_LIST_DIR}/@EXPORTS_FILE@")