Skip to content

Commit

Permalink
Used variable for setting external libraries in CMakeList.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoferigo committed Apr 11, 2018
1 parent f4e9b6e commit eb64e5f
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions toolbox/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ add_install_rpath_support(BIN_DIRS ${CMAKE_INSTALL_PREFIX}/bin
# This library will be linked to the S-Function for the usage in Simulink, and to
# another implementation for its usage within the code generated by the Simulink Coder.

set(WBTOOLBOX_EXT_LIBRARIES "")

configure_block(
BLOCK_NAME "Base"
LIST_PREFIX WBT
Expand Down Expand Up @@ -154,6 +156,7 @@ configure_block(BLOCK_NAME "Simulator Synchronizer"
SOURCES src/SimulatorSynchronizer.cpp
HEADERS include/SimulatorSynchronizer.h)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/autogenerated)
list(APPEND WBTOOLBOX_EXT_LIBRARIES "ClockServer")

configure_block(BLOCK_NAME "Mass Matrix"
GROUP "Model"
Expand Down Expand Up @@ -197,23 +200,23 @@ configure_block(BLOCK_NAME "Set References"
SOURCES src/SetReferences.cpp
HEADERS include/SetReferences.h)

configure_block(BLOCK_NAME "Set Low-Level PIDs"
GROUP "Actuators"
LIST_PREFIX WBT
SOURCES src/SetLowLevelPID.cpp
HEADERS include/SetLowLevelPID.h)
configure_block(BLOCK_NAME "Set Low-Level PIDs"
GROUP "Actuators"
LIST_PREFIX WBT
SOURCES src/SetLowLevelPID.cpp
HEADERS include/SetLowLevelPID.h)

configure_block(BLOCK_NAME "Get Measurement"
GROUP "State"
LIST_PREFIX WBT
SOURCES src/GetMeasurement.cpp
HEADERS include/GetMeasurement.h)

configure_block(BLOCK_NAME "Get Limits"
GROUP "State"
LIST_PREFIX WBT
SOURCES src/GetLimits.cpp
HEADERS include/GetLimits.h)
configure_block(BLOCK_NAME "Get Limits"
GROUP "State"
LIST_PREFIX WBT
SOURCES src/GetLimits.cpp
HEADERS include/GetLimits.h)

get_property(ALL_HEADERS GLOBAL PROPERTY WBT_HEADERS)
get_property(ALL_SOURCES GLOBAL PROPERTY WBT_SOURCES)
Expand Down Expand Up @@ -254,7 +257,7 @@ set(IDYNTREE_REQUIRED_LIBS
target_link_libraries(WBToolboxLibrary PUBLIC
${YARP_LIBRARIES}
${IDYNTREE_REQUIRED_LIBS}
ClockServer
${WBTOOLBOX_EXT_LIBRARIES}
)

if (WBT_USES_ICUB)
Expand Down

0 comments on commit eb64e5f

Please sign in to comment.