diff --git a/SuperBuild/Packaging/CMakeLists.txt b/SuperBuild/Packaging/CMakeLists.txt
index 603321304dc9b4caeefe415ce4ea6baad470cb80..704363ecdfa7997c89c0a71e7c1a2e0be1df00fc 100644
--- a/SuperBuild/Packaging/CMakeLists.txt
+++ b/SuperBuild/Packaging/CMakeLists.txt
@@ -24,6 +24,16 @@ if(NOT GENERATE_PACKAGE AND NOT GENERATE_XDK)
   return()
 endif()
 
+if(WIN32 OR CMAKE_CROSSCOMPILING)
+  if(NOT MXE_TARGET_DIR)
+    message(FATAL_ERROR "you must set MXE_TARGET_DIR")
+  endif()
+
+  if(NOT OTB_SOURCE_DIR)
+    message(FATAL_ERROR "you must set OTB_SOURCE_DIR")
+  endif()
+endif()
+
 include(${CMAKE_CURRENT_SOURCE_DIR}/PMacros.cmake)
 
 if(OUT_OF_SOURCE_BUILD)
@@ -61,7 +71,7 @@ if(WIN32 OR CMAKE_CROSSCOMPILING)
       MONTEVERDI_INSTALL_DIR
       )
     if(NOT DEFINED ${req} OR "${${req}}" STREQUAL "")
-      message(FATAL_ERROR "you must set ${req} before calling this method")
+      message(FATAL_ERROR "you must set ${req}")
     endif()
     set(vars "${vars}  ${req}=[${${req}}]\n")
   endforeach(req)
@@ -73,7 +83,7 @@ else() #Unix like
       OTB_SOURCE_DIR
       )
     if(NOT DEFINED ${req} OR "${${req}}" STREQUAL "")
-      message(FATAL_ERROR "you must set ${req} before calling this method")
+      message(FATAL_ERROR "you must set ${req}")
     endif()
     set(vars "${vars}  ${req}=[${${req}}]\n")
   endforeach(req)