diff --git a/CMakeLists.txt b/CMakeLists.txt index 4d18f1a5613310c84861749efbbb5eae04a1b315..45ac160709c6d90f87e874eac4ecdf16aac79ed6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -102,6 +102,27 @@ SET(headers ) +list(APPEND task-dyn-joint-limits_plugins_dependencies task-dyn-pd) +list(APPEND pseudo-robot-dynamic_plugins_dependencies dynamic-integrator) + +foreach(lib task-inequality task-dyn-pd task-joint-limits task-dyn-joint-limits) + IF(WIN32) + list(APPEND ${lib}_ext_plugins_dependencies + ${DYNAMIC_GRAPH_PLUGINDIR}/task${CMAKE_LINK_LIBRARY_SUFFIX}) + ELSE(WIN32) + list(APPEND ${lib}_ext_plugins_dependencies + ${DYNAMIC_GRAPH_PLUGINDIR}/task${CMAKE_SHARED_LIBRARY_SUFFIX}) + ENDIF(WIN32) +endforeach(lib) + +IF(WIN32) + list(APPEND solver-op-space_ext_plugins_dependencies + ${DYNAMIC_GRAPH_PLUGINDIR}/feature-point6d${CMAKE_LINK_LIBRARY_SUFFIX}) +ELSE(WIN32) + list(APPEND solver-op-space_ext_plugins_dependencies + ${DYNAMIC_GRAPH_PLUGINDIR}/feature-point6d${CMAKE_SHARED_LIBRARY_SUFFIX}) +ENDIF(WIN32) + # Add subdirectories. ADD_SUBDIRECTORY(src) ADD_SUBDIRECTORY(unitTesting) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 78c44dac23e47333f2fdf970419ca2752de40df4..ba5f5313b3b90df434e35222f5eca6e748dc74fa 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -32,6 +32,7 @@ FOREACH(header ${headers}) PERMISSIONS OWNER_READ GROUP_READ WORLD_READ OWNER_WRITE) ENDFOREACH(header) INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/include) +INCLUDE_DIRECTORIES(${${PROJECT_NAME}_SOURCE_DIR}/include) # --- COMPILATION OF PLUGINS FOREACH(lib ${libs}) @@ -46,6 +47,10 @@ FOREACH(lib ${libs}) TARGET_LINK_LIBRARIES(${lib} "${${lib}_plugins_dependencies}") ENDIF(${lib}_plugins_dependencies) + IF(${lib}_ext_plugins_dependencies) + TARGET_LINK_LIBRARIES(${lib} "${${lib}_ext_plugins_dependencies}") + ENDIF(${lib}_ext_plugins_dependencies) + PKG_CONFIG_USE_DEPENDENCY(${lib} sot-core) PKG_CONFIG_USE_DEPENDENCY(${lib} dynamic-graph) PKG_CONFIG_USE_DEPENDENCY(${lib} soth) @@ -53,24 +58,17 @@ FOREACH(lib ${libs}) INSTALL(TARGETS ${lib} DESTINATION lib/plugin) # build python submodule STRING(REPLACE - _ PYTHON_LIBRARY_NAME ${lib}) - ADD_DEPENDENCIES(${lib} MKDIR_${PYTHON_LIBRARY_NAME}) - ADD_CUSTOM_TARGET(MKDIR_${PYTHON_LIBRARY_NAME} - mkdir -p dynamic_graph/sot/dyninv/${PYTHON_LIBRARY_NAME} - ) + FILE(MAKE_DIRECTORY dynamic_graph/sot/dyninv/${PYTHON_LIBRARY_NAME}) DYNAMIC_GRAPH_PYTHON_MODULE("sot/dyninv/${PYTHON_LIBRARY_NAME}" ${lib} - sot/dyninv/${PYTHON_LIBRARY_NAME}/wrap + sot-dyninv-${PYTHON_LIBRARY_NAME}-wrap ) ENDFOREACH(lib) -#EXEC_PROGRAM(${PYTHON_EXECUTABLE} ARGS "-c \"from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='')\"" -# OUTPUT_VARIABLE PYTHON_SITELIB -# ) - # Install empty __init__.py files in intermediate directories. INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dynamic_graph/sot/dyninv/__init__.py DESTINATION ${PYTHON_SITELIB}/dynamic_graph/sot/dyninv ) -MESSAGE(STATUS DESTINATION ${PYTHON_SITELIB} ) \ No newline at end of file +MESSAGE(STATUS DESTINATION ${PYTHON_SITELIB} )