--- a/CMakeModules/win_bundle.cmake
+++ b/CMakeModules/win_bundle.cmake
@@ -201,12 +201,14 @@
     FIND_FILE(LENSFUN_GLIB2_DLL NAMES glib-2.dll PATHS ${SOURCE_BASE_DIR}/lensfun/bin NO_SYSTEM_ENVIRONMENT_PATH)
     INSTALL(FILES ${LENSFUN_DLL} ${LENSFUN_GLIB2_DLL} DESTINATION ${BINDIR})
 
-    FIND_FILE(FFTW3_DLL 
-      NAMES libfftw-3.3.dll 
-      PATHS ${SOURCE_BASE_DIR}/${SOURCE_BASE_DIR}/fftw-3.3.3/fftw-3.3-libs/x64 
-            ${SOURCE_BASE_DIR}/${SOURCE_BASE_DIR}/fftw-3.3.3/fftw-3.3-libs/
-        NO_SYSTEM_ENVIRONMENT_PATH)
-    INSTALL(FILES ${FFTW3_DLL} DESTINATION ${BINDIR})
+    IF(HAVE_FFTW)
+      FIND_FILE(FFTW3_DLL 
+        NAMES libfftw-3.3.dll 
+        PATHS ${SOURCE_BASE_DIR}/${SOURCE_BASE_DIR}/fftw-3.3.3/fftw-3.3-libs/x64 
+              ${SOURCE_BASE_DIR}/${SOURCE_BASE_DIR}/fftw-3.3.3/fftw-3.3-libs/
+          NO_SYSTEM_ENVIRONMENT_PATH)
+      INSTALL(FILES ${FFTW3_DLL} DESTINATION ${BINDIR})
+    ENDIF()
 
   ENDIF(${HUGIN_SHARED})
 ENDIF(WIN32)