Skip to content

Commit fba5ef1

Browse files
committed
build(franka): libxml, poco and console bridge in cmake
to avoid installation of system libraries and to avoid dependence on their versions this adds the following fetchcontent declares: - fr3: tinyxml2, console_bridge, poco and eigen - panda: console_bridge, poco and eigen - remove eigen from robotics library because of export usage
1 parent 64ac60e commit fba5ef1

File tree

5 files changed

+89
-21
lines changed

5 files changed

+89
-21
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: 48 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
@@ -66,9 +66,54 @@ FetchContent_Declare(Eigen3
6666
GIT_TAG 3.4.1
6767
GIT_PROGRESS TRUE
6868
EXCLUDE_FROM_ALL
69+
OVERRIDE_FIND_PACKAGE
70+
)
71+
# --- tinyxml2 ---
72+
FetchContent_Declare(
73+
tinyxml2
74+
GIT_REPOSITORY https://github.com/leethomason/tinyxml2.git
75+
GIT_TAG 10.0.0
76+
GIT_PROGRESS TRUE
77+
EXCLUDE_FROM_ALL
78+
OVERRIDE_FIND_PACKAGE
79+
)
80+
81+
# --- console_bridge ---
82+
FetchContent_Declare(
83+
console_bridge
84+
GIT_REPOSITORY https://github.com/ros/console_bridge.git
85+
GIT_TAG 1.0.2
86+
GIT_PROGRESS TRUE
87+
EXCLUDE_FROM_ALL
88+
OVERRIDE_FIND_PACKAGE
89+
)
90+
91+
# --- POCO C++ Libraries ---
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+
OVERRIDE_FIND_PACKAGE
69105
)
70106

71-
FetchContent_MakeAvailable(Eigen3)
72-
FetchContent_MakeAvailable(libfranka pybind11)
107+
FetchContent_MakeAvailable(pybind11 Eigen3 tinyxml2 console_bridge Poco)
108+
if(NOT TARGET Eigen3::Eigen3)
109+
add_library(Eigen3::Eigen3 ALIAS eigen)
110+
endif()
111+
if(NOT TARGET TinyXML2::TinyXML2)
112+
add_library(TinyXML2::TinyXML2 ALIAS tinyxml2)
113+
endif()
114+
if(NOT TARGET console_bridge::console_bridge)
115+
add_library(console_bridge::console_bridge ALIAS console_bridge)
116+
endif()
117+
FetchContent_MakeAvailable(libfranka)
73118

74119
add_subdirectory(src)

extensions/rcs_panda/CMakeLists.txt

Lines changed: 36 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
@@ -35,10 +35,6 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
3535
# turn off libfranka tests
3636
set(BUILD_TESTS OFF)
3737
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)
4238
set(BUILD_PYTHON_INTERFACE OFF)
4339
set(BUILD_DOCUMENTATION OFF)
4440

@@ -66,9 +62,43 @@ FetchContent_Declare(Eigen3
6662
GIT_TAG 3.4.1
6763
GIT_PROGRESS TRUE
6864
EXCLUDE_FROM_ALL
65+
OVERRIDE_FIND_PACKAGE
6966
)
7067

71-
FetchContent_MakeAvailable(libfranka pybind11 Eigen3)
68+
# --- console_bridge ---
69+
FetchContent_Declare(
70+
console_bridge
71+
GIT_REPOSITORY https://github.com/ros/console_bridge.git
72+
GIT_TAG 1.0.2
73+
GIT_PROGRESS TRUE
74+
EXCLUDE_FROM_ALL
75+
OVERRIDE_FIND_PACKAGE
76+
)
77+
78+
# --- POCO C++ Libraries ---
79+
set(ENABLE_TESTS OFF CACHE BOOL "Disable POCO tests" FORCE)
80+
set(ENABLE_DATA_MYSQL OFF CACHE BOOL "Disable POCO MySQL" FORCE)
81+
set(ENABLE_DATA_ODBC OFF CACHE BOOL "Disable POCO ODBC" FORCE)
82+
set(ENABLE_PAGECOMPILER OFF CACHE BOOL "Disable POCO PageCompiler" FORCE)
83+
set(ENABLE_PAGECOMPILER_FILE2PAGE OFF CACHE BOOL "" FORCE)
84+
85+
FetchContent_Declare(
86+
Poco
87+
GIT_REPOSITORY https://github.com/pocoproject/poco.git
88+
GIT_TAG poco-1.13.3-release
89+
GIT_PROGRESS TRUE
90+
EXCLUDE_FROM_ALL
91+
OVERRIDE_FIND_PACKAGE
92+
)
93+
94+
FetchContent_MakeAvailable(pybind11 Eigen3 console_bridge Poco)
95+
if(NOT TARGET Eigen3::Eigen3)
96+
add_library(Eigen3::Eigen3 ALIAS eigen)
97+
endif()
98+
if(NOT TARGET console_bridge::console_bridge)
99+
add_library(console_bridge::console_bridge ALIAS console_bridge)
100+
endif()
101+
FetchContent_MakeAvailable(libfranka)
72102
set_target_properties(franka PROPERTIES CXX_STANDARD 17)
73103

74104
add_subdirectory(src_fr3)

extensions/rcs_robotics_library/CMakeLists.txt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ set(BUILD_DOCUMENTATION OFF)
4141

4242
include(FetchContent)
4343

44+
find_package(Eigen3 REQUIRED)
4445
find_package(Python3 COMPONENTS Interpreter Development.Module REQUIRED)
4546
find_package(pinocchio REQUIRED)
4647
find_package(rcs REQUIRED)
@@ -57,13 +58,7 @@ FetchContent_Declare(pybind11
5758
GIT_PROGRESS TRUE
5859
EXCLUDE_FROM_ALL
5960
)
60-
FetchContent_Declare(Eigen3
61-
GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
62-
GIT_TAG 3.4.1
63-
GIT_PROGRESS TRUE
64-
EXCLUDE_FROM_ALL
65-
)
6661

67-
FetchContent_MakeAvailable(rl pybind11 Eigen3)
62+
FetchContent_MakeAvailable(rl pybind11)
6863

6964
add_subdirectory(src)

extensions/rcs_robotics_library/debian_deps.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ libccd-dev
44
libboost-all-dev
55
liblzma-dev
66
libxml2-dev
7-
libxslt1-dev
7+
libxslt1-dev
8+
libeigen3-dev

0 commit comments

Comments
 (0)