From 38bc4324ee320f6ad2b9a2d3a380149ff8dba708 Mon Sep 17 00:00:00 2001
From: Felix Schwitzer <felix.schwitzer@gmx.at>
Date: Thu, 26 Mar 2015 21:03:20 +0100
Subject: [PATCH] UseSWIG: fix warning about CMP0057

Add the swig_source_file_fullname as a dependency instead of MAIN_DEPENDENCY for
the custom command to generate the swig-generated wrapper file.
---
 Modules/UseSWIG.cmake | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake
index 7939b1f..7423418 100644
--- a/Modules/UseSWIG.cmake
+++ b/Modules/UseSWIG.cmake
@@ -204,8 +204,7 @@ macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
     ${swig_include_dirs}
     -o "${swig_generated_file_fullname}"
     "${swig_source_file_fullname}"
-    MAIN_DEPENDENCY "${swig_source_file_fullname}"
-    DEPENDS ${SWIG_MODULE_${name}_EXTRA_DEPS}
+    DEPENDS "${swig_source_file_fullname}" ${SWIG_MODULE_${name}_EXTRA_DEPS}
     COMMENT "Swig source")
   set_source_files_properties("${swig_generated_file_fullname}" ${swig_extra_generated_files}
     PROPERTIES GENERATED 1)
-- 
2.1.0

