medit/moo/glade2c.cmake.in
Yevgen Muntyan 51544d922b win32, msvc
2009-11-14 11:57:35 -08:00

17 lines
511 B
CMake

INCLUDE(@MOO_SOURCE_DIR@/cmake/modules/FindMooCmakeUtils.cmake)
STRING(REGEX REPLACE "(.*)/[^/]*" "\\1" subdir "${INPUT}")
IF(subdir)
FILE(MAKE_DIRECTORY ${subdir})
ENDIF(subdir)
MOO_EXEC_OR_DIE("@PYTHON_EXECUTABLE@ @MOO_SOURCE_DIR@/moo/glade2c.py ${SRCDIR}/${INPUT}"
COMMAND "@PYTHON_EXECUTABLE@" @MOO_SOURCE_DIR@/moo/glade2c.py ${SRCDIR}/${INPUT}
OUTPUT_FILE ${OUTPUT}.tmp
)
MOO_COPY_IF_CHANGED(${OUTPUT}.tmp ${OUTPUT})
FILE(WRITE ${OUTPUT}.stamp "stamp")
FILE(REMOVE ${OUTPUT}.tmp)