|
1 | | -cmake_minimum_required(VERSION 3.5) |
| 1 | +cmake_minimum_required(VERSION 3.24) |
2 | 2 |
|
3 | 3 | project( |
4 | 4 | rcs_panda |
@@ -31,14 +31,11 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) |
31 | 31 |
|
32 | 32 | set(BUILD_SHARED_LIBS OFF) |
33 | 33 | set(CMAKE_POSITION_INDEPENDENT_CODE ON) |
| 34 | +# set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE) |
34 | 35 |
|
35 | 36 | # turn off libfranka tests |
36 | 37 | set(BUILD_TESTS OFF) |
37 | 38 | 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) |
42 | 39 | set(BUILD_PYTHON_INTERFACE OFF) |
43 | 40 | set(BUILD_DOCUMENTATION OFF) |
44 | 41 |
|
@@ -66,9 +63,48 @@ FetchContent_Declare(Eigen3 |
66 | 63 | GIT_TAG 3.4.1 |
67 | 64 | GIT_PROGRESS TRUE |
68 | 65 | 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! |
69 | 104 | ) |
70 | 105 |
|
71 | | -FetchContent_MakeAvailable(libfranka pybind11 Eigen3) |
| 106 | +FetchContent_MakeAvailable(pybind11 Eigen3 tinyxml2 console_bridge Poco) |
| 107 | +FetchContent_MakeAvailable(libfranka) |
72 | 108 | set_target_properties(franka PROPERTIES CXX_STANDARD 17) |
73 | 109 |
|
74 | 110 | add_subdirectory(src_fr3) |
0 commit comments