Commit 6b48af12 authored by Francois Keith's avatar Francois Keith
Browse files

Lighten the cmake code

parent b4242ac6
...@@ -8,69 +8,28 @@ IF(CMAKE_BUILD_TYPE STREQUAL "DEBUG") ...@@ -8,69 +8,28 @@ IF(CMAKE_BUILD_TYPE STREQUAL "DEBUG")
ADD_DEFINITIONS(-DDEBUG=2) ADD_DEFINITIONS(-DDEBUG=2)
ENDIF(CMAKE_BUILD_TYPE STREQUAL "DEBUG") ENDIF(CMAKE_BUILD_TYPE STREQUAL "DEBUG")
# provide path to library libdynamicsJRLJapan.so # provide path to libraries
LINK_DIRECTORIES(${DYNAMICSJRLJAPAN_LIBRARY_DIRS}) LINK_DIRECTORIES(${DYNAMICSJRLJAPAN_LIBRARY_DIRS})
# provide path to library libhrp2Dynamics.so
LINK_DIRECTORIES(${HRP2DYNAMICS_LIBRARY_DIRS}) LINK_DIRECTORIES(${HRP2DYNAMICS_LIBRARY_DIRS})
# provide path to library libdynamic-graph.so
LINK_DIRECTORIES(${DYNAMIC_GRAPH_LIBRARY_DIRS}) LINK_DIRECTORIES(${DYNAMIC_GRAPH_LIBRARY_DIRS})
# provide path to library libsot-core.so
LINK_DIRECTORIES(${SOT_CORE_LIBRARY_DIRS}) LINK_DIRECTORIES(${SOT_CORE_LIBRARY_DIRS})
# provide path to library libMatrixAbstractLayer.so
LINK_DIRECTORIES(${MATRIXABSTRACTLAYER_LIBRARY_DIRS}) LINK_DIRECTORIES(${MATRIXABSTRACTLAYER_LIBRARY_DIRS})
# Add dynamicsJRLJapan compilation flags and link to library libdynamicsJRLJapan.so # Add compilation flags
ADD_DEFINITIONS(${DYNAMICSJRLJAPAN_CFLAGS}) ADD_DEFINITIONS(${DYNAMICSJRLJAPAN_CFLAGS})
IF(WIN32)
foreach(dlink ${DYNAMICSJRLJAPAN_LDFLAGS})
SET ( ${PROJECT_NAME}_src_LDFLAGS "${${PROJECT_NAME}_src_LDFLAGS} ${dlink}")
endforeach(dlink)
ENDIF(WIN32)
# Add hrp2Dynamics compilation flags and link to library libhrp2Dynamics.so
ADD_DEFINITIONS(${HRP2DYNAMICS_CFLAGS}) ADD_DEFINITIONS(${HRP2DYNAMICS_CFLAGS})
IF(WIN32)
foreach(dlink ${HRP2DYNAMICS_LDFLAGS})
SET ( ${PROJECT_NAME}_src_LDFLAGS "${${PROJECT_NAME}_src_LDFLAGS} ${dlink}")
endforeach(dlink)
ENDIF(WIN32)
# Add dynamic-graph compilation flags and link to library libdynamic-graph.so
ADD_DEFINITIONS(${DYNAMIC_GRAPH_CFLAGS}) ADD_DEFINITIONS(${DYNAMIC_GRAPH_CFLAGS})
IF(WIN32)
foreach(dlink ${DYNAMIC_GRAPH_LDFLAGS})
SET ( ${PROJECT_NAME}_src_LDFLAGS "${${PROJECT_NAME}_src_LDFLAGS} ${dlink}")
endforeach(dlink)
ENDIF(WIN32)
# Add sot-core compilation flags and link to library libsot-core.so
ADD_DEFINITIONS(${SOT_CORE_CFLAGS}) ADD_DEFINITIONS(${SOT_CORE_CFLAGS})
IF(WIN32)
foreach(dlink ${SOT_CORE_LDFLAGS})
SET ( ${PROJECT_NAME}_src_LDFLAGS "${${PROJECT_NAME}_src_LDFLAGS} ${dlink}")
endforeach(dlink)
ENDIF(WIN32)
# Add MatrixAbstractLayer compilation flags and link to library libMatrixAbstractLayer.so
ADD_DEFINITIONS(${MATRIXABSTRACTLAYER_CFLAGS}) ADD_DEFINITIONS(${MATRIXABSTRACTLAYER_CFLAGS})
IF(WIN32) foreach(dlink ${DYNAMICSJRLJAPAN_LDFLAGS}
foreach(dlink ${MATRIXABSTRACTLAYER_LDFLAGS}) ${HRP2DYNAMICS_LDFLAGS}
${DYNAMIC_GRAPH_LDFLAGS}
${SOT_CORE_LDFLAGS}
${MATRIXABSTRACTLAYER_LDFLAGS}
)
SET ( ${PROJECT_NAME}_src_LDFLAGS "${${PROJECT_NAME}_src_LDFLAGS} ${dlink}") SET ( ${PROJECT_NAME}_src_LDFLAGS "${${PROJECT_NAME}_src_LDFLAGS} ${dlink}")
endforeach(dlink) endforeach(dlink)
ENDIF(WIN32)
SET(libs SET(libs
zmpreffromcom zmpreffromcom
......
...@@ -17,12 +17,10 @@ LINK_DIRECTORIES(${${PROJECT_NAME}_BINARY_DIR}/src) ...@@ -17,12 +17,10 @@ LINK_DIRECTORIES(${${PROJECT_NAME}_BINARY_DIR}/src)
# Add MatrixAbstractLayer compilation flags and link to library libMatrixAbstractLayer.so # Add MatrixAbstractLayer compilation flags and link to library libMatrixAbstractLayer.so
ADD_DEFINITIONS(${MATRIXABSTRACTLAYER_CFLAGS}) ADD_DEFINITIONS(${MATRIXABSTRACTLAYER_CFLAGS})
IF(WIN32)
foreach(dlink ${MATRIXABSTRACTLAYER_LDFLAGS} ${DYNAMICSJRLJAPAN_LDFLAGS} foreach(dlink ${MATRIXABSTRACTLAYER_LDFLAGS} ${DYNAMICSJRLJAPAN_LDFLAGS}
${HRP2DYNAMICS_LDFLAGS} ${DYNAMIC_GRAPH_LDFLAGS} ${SOT_CORE_LDFLAGS}) ${HRP2DYNAMICS_LDFLAGS} ${DYNAMIC_GRAPH_LDFLAGS} ${SOT_CORE_LDFLAGS})
SET ( ${PROJECT_NAME}_src_LDFLAGS "${${PROJECT_NAME}_src_LDFLAGS} ${dlink}") SET ( ${PROJECT_NAME}_src_LDFLAGS "${${PROJECT_NAME}_src_LDFLAGS} ${dlink}")
endforeach(dlink) endforeach(dlink)
ENDIF(WIN32)
SET(tests SET(tests
dummy dummy
......
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