From: adam Date: Mon, 21 Sep 2009 12:44:12 +0000 (+0000) Subject: yacs swig compatibility X-Git-Tag: V5_1_3rc1~37 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=299b5f7b511c140be81717e246db31155ab54884;p=modules%2Fkernel.git yacs swig compatibility --- 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"