From 52c7440eef20ede154b1754e56ef7f687455e92e Mon Sep 17 00:00:00 2001
From: Florent Lamiraux <florent@laas.fr>
Date: Fri, 8 Jul 2011 22:32:34 +0200
Subject: [PATCH] Revert "Correct the Python_module handling"

    This reverts commits 33671f54b993aac75887647d4c519856137be632 and
    52fdc8e546d57375058ef0a3e6a6797ee4755c24.

    These commits introduce a bug in the generation of python modules:
    shared objects wrap.so have been renamed but __init__.py files still try
    to import them with the old name.
---
 src/CMakeLists.txt | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 83fd054..8d6f0e3 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -58,10 +58,13 @@ 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/dynamics/${PYTHON_LIBRARY_NAME}
+    )
   DYNAMIC_GRAPH_PYTHON_MODULE("sot/dynamics/${PYTHON_LIBRARY_NAME}"
     ${lib}
-    sot-dynamics-${PYTHON_LIBRARY_NAME}-wrap
+    sot/dynamics/${PYTHON_LIBRARY_NAME}/wrap
     )
 ENDFOREACH(lib)
 
-- 
GitLab