From 299b5f7b511c140be81717e246db31155ab54884 Mon Sep 17 00:00:00 2001 From: adam Date: Mon, 21 Sep 2009 12:44:12 +0000 Subject: [PATCH] yacs swig compatibility --- salome_adm/cmake_files/am2cmake.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/salome_adm/cmake_files/am2cmake.py b/salome_adm/cmake_files/am2cmake.py index 4cc506a0a..875baadd2 100644 --- a/salome_adm/cmake_files/am2cmake.py +++ b/salome_adm/cmake_files/am2cmake.py @@ -997,6 +997,24 @@ class CMakeFile(object): ''') pass + # -- + # -- + if self.__thedict__.has_key("BUILT_SOURCES"): + newlines.append(''' + FOREACH(f ${BUILT_SOURCES}) + IF(f MATCHES "WRAP.cxx$") + # STRING(REGEX REPLACE "WRAP.cxx" "WRAP.h" inc ${f}) + STRING(REGEX REPLACE "WRAP.cxx" ".i" input ${f}) + ADD_CUSTOM_COMMAND( + OUTPUT ${f} # ${inc} + COMMAND ${SWIG_EXECUTABLE} ${SWIG_FLAGS} ${SWIG_PYTHON_INCLUDES} ${MYSWIG_FLAGS} -o ${f} ${CMAKE_CURRENT_SOURCE_DIR}/${input} + MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/${input} + ) + ENDIF(f MATCHES "WRAP.cxx$") + ENDFOREACH(f ${BUILT_SOURCES}) + ''') + pass + # -- # -- key = "MOC_FILES" -- 2.39.2