Skip to content

Commit f00fd92

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

File tree

4 files changed

+96
-15
lines changed

4 files changed

+96
-15
lines changed

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: 45 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)
@@ -66,9 +67,50 @@ FetchContent_Declare(Eigen3
6667
GIT_TAG 3.4.1
6768
GIT_PROGRESS TRUE
6869
EXCLUDE_FROM_ALL
70+
OVERRIDE_FIND_PACKAGE # <- This is the magic bullet!
71+
)
72+
# --- tinyxml2 ---
73+
FetchContent_Declare(
74+
tinyxml2
75+
GIT_REPOSITORY https://github.com/leethomason/tinyxml2.git
76+
GIT_TAG 10.0.0 # Or the specific version you need
77+
GIT_PROGRESS TRUE
78+
EXCLUDE_FROM_ALL
79+
OVERRIDE_FIND_PACKAGE # <- This is the magic bullet!
80+
)
81+
82+
# --- console_bridge ---
83+
FetchContent_Declare(
84+
console_bridge
85+
GIT_REPOSITORY https://github.com/ros/console_bridge.git
86+
GIT_TAG 1.0.2 # Standard version used in ROS 2 Humble
87+
GIT_PROGRESS TRUE
88+
EXCLUDE_FROM_ALL
89+
OVERRIDE_FIND_PACKAGE # <- This is the magic bullet!
90+
)
91+
92+
# --- POCO C++ Libraries ---
93+
# POCO is a massive framework. Building the whole thing takes a long time.
94+
# We disable tests, examples, and heavy components you likely don't need for a robot control stack.
95+
set(ENABLE_TESTS OFF CACHE BOOL "Disable POCO tests" FORCE)
96+
set(ENABLE_DATA_MYSQL OFF CACHE BOOL "Disable POCO MySQL" FORCE)
97+
set(ENABLE_DATA_ODBC OFF CACHE BOOL "Disable POCO ODBC" FORCE)
98+
set(ENABLE_PAGECOMPILER OFF CACHE BOOL "Disable POCO PageCompiler" FORCE)
99+
set(ENABLE_PAGECOMPILER_FILE2PAGE OFF CACHE BOOL "" FORCE)
100+
101+
FetchContent_Declare(
102+
Poco
103+
GIT_REPOSITORY https://github.com/pocoproject/poco.git
104+
GIT_TAG poco-1.13.3-release
105+
GIT_PROGRESS TRUE
106+
EXCLUDE_FROM_ALL
107+
OVERRIDE_FIND_PACKAGE # <- This is the magic bullet!
69108
)
70109

71-
FetchContent_MakeAvailable(Eigen3)
72-
FetchContent_MakeAvailable(libfranka pybind11)
110+
FetchContent_MakeAvailable(pybind11 Eigen3 tinyxml2 console_bridge Poco)
111+
add_library(Eigen3::Eigen3 ALIAS eigen)
112+
add_library(tinyxml2::tinyxml2 ALIAS tinyxml2)
113+
add_library(console_bridge::console_bridge ALIAS console_bridge)
114+
FetchContent_MakeAvailable(libfranka)
73115

74116
add_subdirectory(src)

extensions/rcs_panda/CMakeLists.txt

Lines changed: 45 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

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

71-
FetchContent_MakeAvailable(libfranka pybind11 Eigen3)
106+
FetchContent_MakeAvailable(pybind11 Eigen3 tinyxml2 console_bridge Poco)
107+
add_library(Eigen3::Eigen3 ALIAS eigen)
108+
add_library(tinyxml2::tinyxml2 ALIAS tinyxml2)
109+
add_library(console_bridge::console_bridge ALIAS console_bridge)
110+
FetchContent_MakeAvailable(libfranka)
72111
set_target_properties(franka PROPERTIES CXX_STANDARD 17)
73112

74113
add_subdirectory(src_fr3)

extensions/rcs_robotics_library/CMakeLists.txt

Lines changed: 5 additions & 2 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
@@ -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)
@@ -62,8 +63,10 @@ FetchContent_Declare(Eigen3
6263
GIT_TAG 3.4.1
6364
GIT_PROGRESS TRUE
6465
EXCLUDE_FROM_ALL
66+
OVERRIDE_FIND_PACKAGE # <- This is the magic bullet!
6567
)
6668

67-
FetchContent_MakeAvailable(rl pybind11 Eigen3)
69+
FetchContent_MakeAvailable(pybind11 Eigen3)
70+
FetchContent_MakeAvailable(rl)
6871

6972
add_subdirectory(src)

0 commit comments

Comments
 (0)