Skip to content

Commit 9957619

Browse files
committed
test(franka): libxml, poco and bridge console in cmake
1 parent 64ac60e commit 9957619

4 files changed

Lines changed: 80 additions & 14 deletions

File tree

‎debian_deps.txt‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
build-essential
22
gcc
3-
libpoco-dev
4-
libglfw3-dev
5-
libconsole-bridge-dev
6-
libtinyxml2-dev
3+
libglfw3-dev

‎extensions/rcs_fr3/CMakeLists.txt‎

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.19)
1+
cmake_minimum_required(VERSION 3.24)
22

33
project(
44
rcs_fr3
@@ -17,6 +17,7 @@ set(CMAKE_POLICY_DEFAULT_CMP0063 NEW)
1717
cmake_policy(SET CMP0072 NEW) # Use GLVND instead of legacy libGL.so
1818
cmake_policy(SET CMP0135 NEW) # Use timestamp of file extraction not download
1919
cmake_policy(SET CMP0140 NEW) # Check return arguments
20+
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE)
2021

2122
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
2223
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
@@ -67,8 +68,42 @@ FetchContent_Declare(Eigen3
6768
GIT_PROGRESS TRUE
6869
EXCLUDE_FROM_ALL
6970
)
71+
# --- tinyxml2 ---
72+
FetchContent_Declare(
73+
tinyxml2
74+
GIT_REPOSITORY https://github.com/leethomason/tinyxml2.git
75+
GIT_TAG 10.0.0 # Or the specific version you need
76+
GIT_PROGRESS TRUE
77+
EXCLUDE_FROM_ALL
78+
)
79+
80+
# --- console_bridge ---
81+
FetchContent_Declare(
82+
console_bridge
83+
GIT_REPOSITORY https://github.com/ros/console_bridge.git
84+
GIT_TAG 1.0.2 # Standard version used in ROS 2 Humble
85+
GIT_PROGRESS TRUE
86+
EXCLUDE_FROM_ALL
87+
)
88+
89+
# --- POCO C++ Libraries ---
90+
# POCO is a massive framework. Building the whole thing takes a long time.
91+
# We disable tests, examples, and heavy components you likely don't need for a robot control stack.
92+
set(ENABLE_TESTS OFF CACHE BOOL "Disable POCO tests" FORCE)
93+
set(ENABLE_DATA_MYSQL OFF CACHE BOOL "Disable POCO MySQL" FORCE)
94+
set(ENABLE_DATA_ODBC OFF CACHE BOOL "Disable POCO ODBC" FORCE)
95+
set(ENABLE_PAGECOMPILER OFF CACHE BOOL "Disable POCO PageCompiler" FORCE)
96+
set(ENABLE_PAGECOMPILER_FILE2PAGE OFF CACHE BOOL "" FORCE)
97+
98+
FetchContent_Declare(
99+
Poco
100+
GIT_REPOSITORY https://github.com/pocoproject/poco.git
101+
GIT_TAG poco-1.13.3-release
102+
GIT_PROGRESS TRUE
103+
EXCLUDE_FROM_ALL
104+
)
70105

71-
FetchContent_MakeAvailable(Eigen3)
72-
FetchContent_MakeAvailable(libfranka pybind11)
106+
FetchContent_MakeAvailable(pybind11 Eigen3 tinyxml2 console_bridge Poco)
107+
FetchContent_MakeAvailable(libfranka)
73108

74109
add_subdirectory(src)

‎extensions/rcs_panda/CMakeLists.txt‎

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.5)
1+
cmake_minimum_required(VERSION 3.24)
22

33
project(
44
rcs_panda
@@ -31,14 +31,11 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
3131

3232
set(BUILD_SHARED_LIBS OFF)
3333
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
34+
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE)
3435

3536
# turn off libfranka tests
3637
set(BUILD_TESTS OFF)
3738
set(BUILD_EXAMPLES OFF)
38-
set(RL_BUILD_DEMOS OFF)
39-
set(RL_BUILD_RL_SG OFF)
40-
set(RL_BUILD_TESTS OFF)
41-
set(RL_BUILD_EXTRAS OFF)
4239
set(BUILD_PYTHON_INTERFACE OFF)
4340
set(BUILD_DOCUMENTATION OFF)
4441

@@ -67,8 +64,43 @@ FetchContent_Declare(Eigen3
6764
GIT_PROGRESS TRUE
6865
EXCLUDE_FROM_ALL
6966
)
67+
# --- tinyxml2 ---
68+
FetchContent_Declare(
69+
tinyxml2
70+
GIT_REPOSITORY https://github.com/leethomason/tinyxml2.git
71+
GIT_TAG 10.0.0 # Or the specific version you need
72+
GIT_PROGRESS TRUE
73+
EXCLUDE_FROM_ALL
74+
)
75+
76+
# --- console_bridge ---
77+
FetchContent_Declare(
78+
console_bridge
79+
GIT_REPOSITORY https://github.com/ros/console_bridge.git
80+
GIT_TAG 1.0.2 # Standard version used in ROS 2 Humble
81+
GIT_PROGRESS TRUE
82+
EXCLUDE_FROM_ALL
83+
)
84+
85+
# --- POCO C++ Libraries ---
86+
# POCO is a massive framework. Building the whole thing takes a long time.
87+
# We disable tests, examples, and heavy components you likely don't need for a robot control stack.
88+
set(ENABLE_TESTS OFF CACHE BOOL "Disable POCO tests" FORCE)
89+
set(ENABLE_DATA_MYSQL OFF CACHE BOOL "Disable POCO MySQL" FORCE)
90+
set(ENABLE_DATA_ODBC OFF CACHE BOOL "Disable POCO ODBC" FORCE)
91+
set(ENABLE_PAGECOMPILER OFF CACHE BOOL "Disable POCO PageCompiler" FORCE)
92+
set(ENABLE_PAGECOMPILER_FILE2PAGE OFF CACHE BOOL "" FORCE)
93+
94+
FetchContent_Declare(
95+
Poco
96+
GIT_REPOSITORY https://github.com/pocoproject/poco.git
97+
GIT_TAG poco-1.13.3-release
98+
GIT_PROGRESS TRUE
99+
EXCLUDE_FROM_ALL
100+
)
70101

71-
FetchContent_MakeAvailable(libfranka pybind11 Eigen3)
102+
FetchContent_MakeAvailable(pybind11 Eigen3 tinyxml2 console_bridge Poco)
103+
FetchContent_MakeAvailable(libfranka)
72104
set_target_properties(franka PROPERTIES CXX_STANDARD 17)
73105

74106
add_subdirectory(src_fr3)

‎extensions/rcs_robotics_library/CMakeLists.txt‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
3131

3232
set(BUILD_SHARED_LIBS OFF)
3333
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
34+
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE)
3435

3536
set(RL_BUILD_DEMOS OFF)
3637
set(RL_BUILD_RL_SG OFF)
@@ -64,6 +65,7 @@ FetchContent_Declare(Eigen3
6465
EXCLUDE_FROM_ALL
6566
)
6667

67-
FetchContent_MakeAvailable(rl pybind11 Eigen3)
68+
FetchContent_MakeAvailable(pybind11 Eigen3)
69+
FetchContent_MakeAvailable(rl)
6870

6971
add_subdirectory(src)

0 commit comments

Comments
 (0)