From: johanengelen Date: Sat, 5 Apr 2008 18:24:58 +0000 (+0000) Subject: cmake: fix file names in marshal generation X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=bf13f246f15b23f45859638f670a9ec320cc25a3;p=inkscape.git cmake: fix file names in marshal generation --- diff --git a/CMakeScripts/UseGlibMarshal.cmake b/CMakeScripts/UseGlibMarshal.cmake index 6a6167bed..18c0a3234 100644 --- a/CMakeScripts/UseGlibMarshal.cmake +++ b/CMakeScripts/UseGlibMarshal.cmake @@ -4,25 +4,24 @@ # # And it defines the following variables: # GLIB_MARSHAL_PREFIX - The name of the files -# GLIB_MARSHAL_LIST - File to Generate from +# GLIB_MARSHAL_FILE - File to Generate from (.list) and to generate to (.h and .cpp) # GLIB_MARSHAL_OUTPUT_HEADER - Result of Generation # GLIB_MARSHAL_OUTPUT_CPP - Result of Generation # GLIB_MARSHAL_OUTPUT_LOCATION - Where we are putting the Output FIND_PROGRAM(GLIB_MARSHAL_EXECUTABLE NAMES glib-genmarshal PATHS /usr/local/bin ) -MACRO(GLIB_MARSHAL GLIB_MARSHAL_PREFIX GLIB_MARSHAL_LIST GLIB_MARSHAL_OUTPUT_LOCATION) +MACRO(GLIB_MARSHAL GLIB_MARSHAL_PREFIX GLIB_MARSHAL_FILE GLIB_MARSHAL_OUTPUT_LOCATION) IF(GLIB_MARSHAL_EXECUTABLE) - SET(GLIB_MARSHAL_OUTPUT_TEMP) - SET(GLIB_MARSHAL_OUTPUT_EXTRA_LINE "#include \"${GLIB_MARSHAL_PREFIX}.h\" \n" ) + SET(GLIB_MARSHAL_OUTPUT_EXTRA_LINE "#include \"${GLIB_MARSHAL_FILE}.h\" \n" ) - EXECUTE_PROCESS(COMMAND "${GLIB_MARSHAL_EXECUTABLE} --prefix=${GLIB_MARSHAL_PREFIX} --header ${CMAKE_CURRENT_SOURCE_DIR}/${GLIB_MARSHAL_LIST}" + EXECUTE_PROCESS(COMMAND "${GLIB_MARSHAL_EXECUTABLE} --prefix=${GLIB_MARSHAL_PREFIX} --header ${CMAKE_CURRENT_SOURCE_DIR}/${GLIB_MARSHAL_FILE}.list" RESULT_VARIABLE GLIB_MARSHAL_OUTPUT_HEADER ) - EXECUTE_PROCESS(COMMAND "${GLIB_MARSHAL_EXECUTABLE} --prefix=${GLIB_MARSHAL_PREFIX} --body ${CMAKE_CURRENT_SOURCE_DIR}/${GLIB_MARSHAL_LIST}" + EXECUTE_PROCESS(COMMAND "${GLIB_MARSHAL_EXECUTABLE} --prefix=${GLIB_MARSHAL_PREFIX} --body ${CMAKE_CURRENT_SOURCE_DIR}/${GLIB_MARSHAL_FILE}.list" RESULT_VARIABLE GLIB_MARSHAL_OUTPUT_CPP ) -# SET(GLIB_MARSHAL_OUTPUT_CPP "${GLIB_MARSHAL_OUTPUT_EXTRA_LINE}${GLIB_MARSHAL_OUTPUT_TEMP}") - FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${GLIB_MARSHAL_PREFIX}.h "${GLIB_MARSHAL_OUTPUT_HEADER}") - FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${GLIB_MARSHAL_PREFIX}.cpp "${GLIB_MARSHAL_OUTPUT_EXTRA_LINE}") - FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/${GLIB_MARSHAL_PREFIX}.cpp "${GLIB_MARSHAL_OUTPUT_CPP}") + + FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${GLIB_MARSHAL_FILE}.h "${GLIB_MARSHAL_OUTPUT_HEADER}") + FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${GLIB_MARSHAL_FILE}.cpp "${GLIB_MARSHAL_OUTPUT_EXTRA_LINE}") + FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/${GLIB_MARSHAL_FILE}.cpp "${GLIB_MARSHAL_OUTPUT_CPP}") ENDIF(GLIB_MARSHAL_EXECUTABLE) ENDMACRO(GLIB_MARSHAL) diff --git a/src/helper/CMakeLists.txt b/src/helper/CMakeLists.txt index 4f4883bd3..0b704b289 100644 --- a/src/helper/CMakeLists.txt +++ b/src/helper/CMakeLists.txt @@ -1,7 +1,7 @@ include(UseGlibMarshal) SET(Marshal -sp-marshal.list +sp-marshal ) GLIB_MARSHAL(sp_marshal ${Marshal} ${CMAKE_CURRENT_BINARY_DIR})