Salome HOME
Copyright update 2022
[modules/homard.git] / src / FrontTrack_SWIG / CMakeLists.txt
old mode 100755 (executable)
new mode 100644 (file)
index 735bdcf..914cb87
@@ -1,3 +1,21 @@
+# Copyright (C) 2017-2022  CEA/DEN, EDF R&D
+#
+# 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, 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
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
 
 INCLUDE(${SWIG_USE_FILE})
 
@@ -13,7 +31,12 @@ INCLUDE_DIRECTORIES(
   ${CMAKE_CURRENT_SOURCE_DIR}/../FrontTrack
   )
 
-SWIG_ADD_MODULE(FrontTrack python FrontTrack.i)
+IF(${CMAKE_VERSION} VERSION_LESS "3.8.0")
+  SWIG_ADD_MODULE(FrontTrack python FrontTrack.i)
+ELSE()
+  SWIG_ADD_LIBRARY(FrontTrack LANGUAGE python SOURCES FrontTrack.i)
+ENDIF()
+
 SWIG_LINK_LIBRARIES(FrontTrack ${PYTHON_LIBRARIES} ${PLATFORM_LIBS} FrontTrack)
 
 IF(WIN32)
@@ -21,4 +44,4 @@ IF(WIN32)
 ENDIF(WIN32)
 INSTALL(TARGETS ${SWIG_MODULE_FrontTrack_REAL_NAME} DESTINATION ${SALOME_INSTALL_PYTHON})
 
-SALOME_INSTALL_SCRIPTS(${CMAKE_CURRENT_BINARY_DIR}/FrontTrack.py ${SALOME_INSTALL_PYTHON})
+SALOME_INSTALL_SCRIPTS(${CMAKE_CURRENT_BINARY_DIR}/FrontTrack.py ${SALOME_INSTALL_PYTHON} EXTRA_DPYS "${SWIG_MODULE_FrontTrack_REAL_NAME}")