diff --git a/cmake/GtsamCythonWrap.cmake b/cmake/GtsamCythonWrap.cmake index c155cbbd8..2f5582513 100644 --- a/cmake/GtsamCythonWrap.cmake +++ b/cmake/GtsamCythonWrap.cmake @@ -137,6 +137,8 @@ function(cythonize target pyx_file output_lib_we output_dir include_dirs libs in target_link_libraries(${target} "${libs}") endif() add_dependencies(${target} ${target}_pyx2cpp) + + add_dependencies(${python_install_target} ${target}) endfunction() # Internal function that wraps a library and compiles the wrapper @@ -169,8 +171,6 @@ function(wrap_library_cython interface_header generated_files_path extra_imports cythonize(cythonize_${module_name} ${generated_pyx} ${module_name} ${generated_files_path} "${include_dirs}" "${libs}" ${interface_header} cython_wrap_${module_name}_pyx) - add_dependencies(${python_install_target} cython_wrap_${module_name}_pyx) - # distclean add_custom_target(wrap_${module_name}_cython_distclean COMMAND cmake -E remove_directory ${generated_files_path})