MDEV-22864: cmake/libutils account for cmake-2.8.12.1

That doesn't support STRING(APPEND ..)
This commit is contained in:
Daniel Black 2020-06-11 14:47:34 +10:00 committed by Marko Mäkelä
parent ade0f40ff1
commit d6af055c55

View file

@ -207,10 +207,9 @@ MACRO(MERGE_STATIC_LIBS TARGET OUTPUT_NAME LIBS_TO_MERGE)
SET(SCRIPT_CONTENTS "CREATE $<TARGET_FILE:${TARGET}>\n")
FOREACH(LIB ${STATIC_LIBS})
STRING(APPEND SCRIPT_CONTENTS "ADDLIB ${LIB}\n")
SET(SCRIPT_CONTENTS "${SCRIPT_CONTENTS}\nADDLIB ${LIB}\n")
ENDFOREACH()
STRING(APPEND SCRIPT_CONTENTS "SAVE\nEND\n")
FILE(WRITE ${MRI_SCRIPT_TPL} "${SCRIPT_CONTENTS}")
FILE(WRITE ${MRI_SCRIPT_TPL} "${SCRIPT_CONTENTS}\nSAVE\nEND\n")
FILE(GENERATE OUTPUT ${MRI_SCRIPT} INPUT ${MRI_SCRIPT_TPL})
ADD_CUSTOM_COMMAND(TARGET ${TARGET} POST_BUILD