Salome HOME
Build SALOME with the Macrosoft Visual Studio 2010.
[modules/kernel.git] / salome_adm / cmake_files / FindSalomeSWIG.cmake
index 86549f63a8e4c9c7562bcf351a0e767c7abb1324..868798330766aa456b1a70e2b087df238458f864 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2013-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 # License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 #
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+# Author: Adrien Bruneton
+#
 
-# Swig detection for Salome
+# SWIG detection for SALOME
+#
+#  !! Please read the generic detection procedure in SalomeMacros.cmake !!
+#
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(SWIG SWIG_EXECUTABLE 2)
+MARK_AS_ADVANCED(SWIG_EXECUTABLE SWIG_VERSION)
 
-set(SWIG_ROOT_DIR $ENV{SWIG_ROOT_DIR} CACHE PATH "Path to Swig directory")
-if(EXISTS ${SWIG_ROOT_DIR})
-  set(CMAKE_INCLUDE_PATH ${SWIG_ROOT_DIR}/include)
-  set(CMAKE_LIBRARY_PATH ${SWIG_ROOT_DIR}/lib)
-  set(CMAKE_PROGRAM_PATH ${SWIG_ROOT_DIR}/bin)
-endif(EXISTS ${SWIG_ROOT_DIR})
-find_package(SWIG REQUIRED)
+IF(SWIG_FOUND) 
+  SALOME_ACCUMULATE_ENVIRONMENT(PATH ${SWIG_EXECUTABLE})
+ENDIF()