ELSE(SWIG_SOURCES MATCHES ";")
SET(SWIG_SOURCES_FIRST "${SWIG_SOURCES}")
ENDIF(SWIG_SOURCES MATCHES ";")
+ SET(flags)
+ FOREACH(f ${SWIG_FLAGS} ${MY_SWIG_FLAGS})
+ SET(test ON)
+ IF(flags)
+ LIST(FIND flags ${f} index)
+ IF(NOT index EQUAL -1)
+ SET(test OFF)
+ ENDIF(NOT index EQUAL -1)
+ ENDIF(flags)
+ IF(test)
+ SET(flags ${flags} ${f})
+ ENDIF(test)
+ ENDFOREACH(f ${SWIG_FLAGS} ${MY_SWIG_FLAGS})
ADD_CUSTOM_COMMAND(
OUTPUT ${build_srcs}
- COMMAND ${SWIG_EXECUTABLE} ${SWIG_FLAGS} ${MY_SWIG_FLAGS} -o ${build_srcs} ${CMAKE_CURRENT_SOURCE_DIR}/${SWIG_SOURCES_FIRST}
+ COMMAND ${SWIG_EXECUTABLE} ${flags} -o ${build_srcs} ${CMAKE_CURRENT_SOURCE_DIR}/${SWIG_SOURCES_FIRST}
MAIN_DEPENDENCY ${SWIG_SOURCES}
)
''')