Commit 5740a44b authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Fix CMakeLists (properly handle IDL/GCC dependencies)

parent 385f8331
......@@ -49,10 +49,13 @@ ADD_LIBRARY(${LIBRARY_NAME} SHARED
rbprmbuilder.impl.cc
rbprmbuilder.impl.hh
server.cc
${CMAKE_CURRENT_BINARY_DIR}/hpp/corbaserver/rbprm/rbprmbuilder_idl.py
${CMAKE_CURRENT_BINARY_DIR}/hpp/corbaserver/rbprm/common_idl.py
)
ADD_CUSTOM_TARGET(generate_idl_cpp DEPENDS ${ALL_IDL_CPP_STUBS})
ADD_CUSTOM_TARGET(generate_idl_python DEPENDS ${ALL_IDL_PYTHON_STUBS})
ADD_DEPENDENCIES (${LIBRARY_NAME} generate_idl_cpp)
ADD_DEPENDENCIES (${LIBRARY_NAME} generate_idl_python)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} hpp-rbprm)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} hpp-model-urdf)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} hpp-corbaserver)
......@@ -64,52 +67,6 @@ INSTALL(TARGETS ${LIBRARY_NAME} DESTINATION lib)
# search for python
FINDPYTHON()
# Generate and install python code for each idl file
FOREACH (IDL ${IDL_SOURCES})
ADD_CUSTOM_COMMAND(
OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/hpp/corbaserver/rbprm/${IDL}_idl.py
COMMAND ${OMNIIDL}
ARGS -bpython -Wbpackage="" -I${CMAKE_SOURCE_DIR}/idl
-I${HPP_CORBASERVER_DATAROOTDIR}/idl
${CMAKE_SOURCE_DIR}/idl/hpp/corbaserver/rbprm/${IDL}.idl
MAIN_DEPENDENCY
${CMAKE_SOURCE_DIR}/idl/hpp/corbaserver/rbprm/${IDL}.idl
)
SET_SOURCE_FILES_PROPERTIES(
${CMAKE_CURRENT_BINARY_DIR}/${IDL}_idl.py
GENERATED=ON
)
INSTALL(
FILES
${CMAKE_CURRENT_BINARY_DIR}/${IDL}_idl.py
DESTINATION ${PYTHON_SITELIB}/hpp/corbaserver/rbprm
)
ENDFOREACH()
# Generate and install python code for each dependency idl file
FOREACH (IDL ${HPP_CORBASERVER_IDL_SOURCES})
ADD_CUSTOM_COMMAND(
OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/hpp/corbaserver/rbprm/${IDL}_idl.py
COMMAND ${OMNIIDL}
ARGS -bpython -Wbpackage=""
-I${HPP_CORBASERVER_DATAROOTDIR}/idl
${HPP_CORBASERVER_DATAROOTDIR}/idl/hpp/corbaserver/${IDL}.idl
MAIN_DEPENDENCY
${HPP_CORBASERVER_DATAROOTDIR}/idl/hpp/corbaserver/${IDL}.idl
)
SET_SOURCE_FILES_PROPERTIES(
${CMAKE_CURRENT_BINARY_DIR}/${IDL}_idl.py
GENERATED=ON
)
INSTALL(
FILES
${CMAKE_CURRENT_BINARY_DIR}/${IDL}_idl.py
DESTINATION ${PYTHON_SITELIB}/hpp/corbaserver/rbprm
)
ENDFOREACH()
INSTALL(
FILES
${CMAKE_CURRENT_SOURCE_DIR}/hpp/corbaserver/rbprm/__init__.py
......
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