Commit 536594c3 authored by Pierre Gergondet's avatar Pierre Gergondet
Browse files

Use PKG_CONFIG_USE_DEPENDENCY for jrl-mal, hrp2-dynamics and sot-core

parent 34e77e59
......@@ -19,26 +19,6 @@ IF(CMAKE_BUILD_TYPE STREQUAL "DEBUG")
ADD_DEFINITIONS(-DDEBUG=2)
ENDIF(CMAKE_BUILD_TYPE STREQUAL "DEBUG")
# provide path to libraries
LINK_DIRECTORIES(${HRP2_DYNAMICS_LIBRARY_DIRS})
LINK_DIRECTORIES(${DYNAMIC_GRAPH_LIBRARY_DIRS})
LINK_DIRECTORIES(${SOT_CORE_LIBRARY_DIRS})
LINK_DIRECTORIES(${JRL_MAL_LIBRARY_DIRS})
# Add compilation flags
ADD_DEFINITIONS(${HRP2_DYNAMICS_CFLAGS})
ADD_DEFINITIONS(${DYNAMIC_GRAPH_CFLAGS})
ADD_DEFINITIONS(${SOT_CORE_CFLAGS})
ADD_DEFINITIONS(${JRL_MAL_CFLAGS})
foreach(dlink ${HRP2_DYNAMICS_LDFLAGS}
${DYNAMIC_GRAPH_LDFLAGS}
${SOT_CORE_LDFLAGS}
${JRL_MAL_LDFLAGS}
)
SET ( ${PROJECT_NAME}_src_LDFLAGS "${${PROJECT_NAME}_src_LDFLAGS} ${dlink}")
endforeach(dlink)
SET(libs
zmpreffromcom
force-compensation
......@@ -95,11 +75,6 @@ FOREACH(lib ${libs})
INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib/plugin)
IF (UNIX)
TARGET_LINK_LIBRARIES(${lib} ${DYNAMIC_GRAPH_LIBRARIES})
#MESSAGE(FATAL_ERROR X ${DYNAMIC_GRAPH_LIBRARIES})
TARGET_LINK_LIBRARIES(${lib} ${SOT_CORE_LIBRARIES})
TARGET_LINK_LIBRARIES(${lib} ${JRL_MAL_LIBRARIES})
TARGET_LINK_LIBRARIES(${lib} ${HRP2_DYNAMICS_LIBRARIES})
TARGET_LINK_LIBRARIES(${lib} "${${lib}_additional_libs}")
ENDIF(UNIX)
......@@ -118,6 +93,11 @@ FOREACH(lib ${libs})
ENDIF(${lib}_plugins_dependencies)
PKG_CONFIG_USE_DEPENDENCY(${lib} jrl-dynamics)
PKG_CONFIG_USE_DEPENDENCY(${lib} hrp2-dynamics)
PKG_CONFIG_USE_DEPENDENCY(${lib} sot-core)
PKG_CONFIG_USE_DEPENDENCY(${lib} dynamic-graph)
PKG_CONFIG_USE_DEPENDENCY(${lib} jrl-mal)
INSTALL(TARGETS ${lib}
DESTINATION lib/plugin)
......
......@@ -15,26 +15,6 @@
ADD_DEFINITIONS(-DDEBUG=2)
# provide path to library libdynamic-graph.so
LINK_DIRECTORIES(${DYNAMIC_GRAPH_LIBRARY_DIRS})
# provide path to library libsot-core.so
LINK_DIRECTORIES(${SOT_CORE_LIBRARY_DIRS})
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
LINK_DIRECTORIES(${${PROJECT_NAME}_BINARY_DIR}/src)
# Add MatrixAbstractLayer compilation flags and link to library libMatrixAbstractLayer.so
ADD_DEFINITIONS(${JRL_MAL_CFLAGS})
IF(WIN32)
foreach(dlink ${JRL_MAL_LDFLAGS}
${DYNAMIC_GRAPH_LDFLAGS} ${SOT_CORE_LDFLAGS})
SET ( ${PROJECT_NAME}_src_LDFLAGS "${${PROJECT_NAME}_src_LDFLAGS} ${dlink}")
endforeach(dlink)
ENDIF(WIN32)
SET(tests
dummy
test_djj
......@@ -59,21 +39,11 @@ FOREACH(test ${tests})
waist-attitude-from-sensor
)
IF (UNIX)
TARGET_LINK_LIBRARIES(${EXECUTABLE_NAME} ${DYNAMIC_GRAPH_LIBRARIES})
TARGET_LINK_LIBRARIES(${EXECUTABLE_NAME} ${SOT_CORE_LIBRARIES})
TARGET_LINK_LIBRARIES(${EXECUTABLE_NAME} ${JRL_MAL_LIBRARIES})
ENDIF(UNIX)
PKG_CONFIG_USE_DEPENDENCY(${EXECUTABLE_NAME} jrl-dynamics)
PKG_CONFIG_USE_DEPENDENCY(${EXECUTABLE_NAME} hrp2-dynamics)
IF(WIN32)
SET_TARGET_PROPERTIES(${EXECUTABLE_NAME}
PROPERTIES
LINK_FLAGS "${${PROJECT_NAME}_src_LDFLAGS}"
)
ENDIF(WIN32)
PKG_CONFIG_USE_DEPENDENCY(${EXECUTABLE_NAME} jrl-dynamics)
PKG_CONFIG_USE_DEPENDENCY(${EXECUTABLE_NAME} hrp2-dynamics)
PKG_CONFIG_USE_DEPENDENCY(${EXECUTABLE_NAME} sot-core)
PKG_CONFIG_USE_DEPENDENCY(${EXECUTABLE_NAME} dynamic-graph)
PKG_CONFIG_USE_DEPENDENCY(${EXECUTABLE_NAME} jrl-mal)
IF(${test}_plugins_dependencies)
ADD_DEPENDENCIES(${EXECUTABLE_NAME} "${${test}_plugins_dependencies}")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment