diff --git a/cmake/GtsamCythonWrap.cmake b/cmake/GtsamCythonWrap.cmake index a8793a4a9..7f98356d3 100644 --- a/cmake/GtsamCythonWrap.cmake +++ b/cmake/GtsamCythonWrap.cmake @@ -127,7 +127,9 @@ function(wrap_library_cython interface_header generated_files_path extra_imports VERBATIM WORKING_DIRECTORY ${generated_files_path}/../) add_custom_target(cython_wrap_${module_name}_pyx ALL DEPENDS ${generated_pyx}) - add_dependencies(cython_wrap_${module_name}_pyx ${dependencies}) + if(NOT ${dependencies} STREQUAL "") + add_dependencies(cython_wrap_${module_name}_pyx ${dependencies}) + endif() message(STATUS "Cythonize and build ${module_name}.pyx") get_property(include_dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES)