--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -32,14 +32,19 @@
 add_subdirectory(tools)
 add_subdirectory(matchpoint)
 add_subdirectory(deghosting)
-add_subdirectory(lens_calibrate)
-
 
 # build vips stuff, only if vips was found
 # not ready for the general public yet
 IF(VIPS_FOUND)
 #  add_subdirectory(vips)
 ENDIF(VIPS_FOUND)
+
+# hsi contains the Python interface. This add_ should be conditional,
+# depending on availability of SWIG and Python.
+# this have to come before hugin1 directory
+IF(BUILD_HSI)
+add_subdirectory(hugin_script_interface)
+ENDIF()
 
 # build gui only if wxWidgets was found
 IF(wxWidgets_FOUND)