Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Q
quadruped-reactive-walking
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gepetto
quadruped-reactive-walking
Commits
ed4d17ab
Commit
ed4d17ab
authored
2 years ago
by
Guilhem Saurel
Committed by
Pierre-Alexandre Leziart
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[CMake] make MQTT optinal
parent
d1aa1337
No related branches found
No related tags found
1 merge request
!32
Draft: Reverse-merge casadi-walking into new WBC devel branch
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeLists.txt
+13
-7
13 additions, 7 deletions
CMakeLists.txt
with
13 additions
and
7 deletions
CMakeLists.txt
+
13
−
7
View file @
ed4d17ab
...
...
@@ -10,6 +10,7 @@ set(PROJECT_URL https://gitlab.laas.fr/${PROJECT_NAMESPACE}/${PROJECT_NAME})
option
(
BUILD_PYTHON_INTERFACE
"Build the python binding"
ON
)
option
(
INSTALL_PYTHON_INTERFACE_ONLY
"Install *ONLY* the python bindings"
OFF
)
option
(
SUFFIX_SO_VERSION
"Suffix library name with its version"
ON
)
option
(
BUILD_WITH_MQTT_SUPPORT
"Add support for MQTT interface"
OFF
)
# Project configuration
if
(
NOT INSTALL_PYTHON_INTERFACE_ONLY
)
...
...
@@ -100,15 +101,20 @@ target_compile_options(${PROJECT_NAME} PUBLIC -DNDEBUG -O3)
target_compile_definitions
(
${
PROJECT_NAME
}
PUBLIC CONFIG_SOLO12_YAML=
"
${
PROJECT_SOURCE_DIR
}
/config/config_solo12.yaml"
)
target_compile_definitions
(
${
PROJECT_NAME
}
PUBLIC WALK_PARAMETERS_YAML=
"
${
PROJECT_SOURCE_DIR
}
/config/walk_parameters.yaml"
)
# MQTT Interface
add_subdirectory
(
paho.mqtt.c
)
add_library
(
mqtt-interface SHARED include/qrw/mqtt-interface.hpp src/mqtt-interface.cpp
)
target_link_libraries
(
mqtt-interface PRIVATE paho-mqtt3c paho-mqtt3a
)
target_include_directories
(
mqtt-interface PUBLIC $<BUILD_INTERFACE:
${
CMAKE_SOURCE_DIR
}
/include>
)
# Main Executable
add_executable
(
${
PROJECT_NAMESPACE
}
-
${
PROJECT_NAME
}
src/control_solo12.cpp
)
target_link_libraries
(
${
PROJECT_NAMESPACE
}
-
${
PROJECT_NAME
}
${
PROJECT_NAME
}
mqtt-interface
)
target_link_libraries
(
${
PROJECT_NAMESPACE
}
-
${
PROJECT_NAME
}
${
PROJECT_NAME
}
)
# MQTT Interface
if
(
BUILD_WITH_MQTT_SUPPORT
)
add_subdirectory
(
paho.mqtt.c
)
add_library
(
mqtt-interface SHARED include/qrw/mqtt-interface.hpp src/mqtt-interface.cpp
)
target_link_libraries
(
mqtt-interface PRIVATE paho-mqtt3c paho-mqtt3a
)
target_include_directories
(
mqtt-interface PUBLIC $<BUILD_INTERFACE:
${
CMAKE_SOURCE_DIR
}
/include>
)
target_link_libraries
(
${
PROJECT_NAMESPACE
}
-
${
PROJECT_NAME
}
mqtt-interface
)
target_compile_definitions
(
${
PROJECT_NAMESPACE
}
-
${
PROJECT_NAME
}
PRIVATE -DQRW_WITH_MQTT
)
endif
()
# Python Bindings
if
(
BUILD_PYTHON_INTERFACE
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment