Commit 0e2eb38d authored by Faustino Osuna's avatar Faustino Osuna

cmake: Command substitution work around for VERBATIM flag.

parent a31d2608
......@@ -194,10 +194,12 @@ endif(APPLE)
# revision.c
set(rev "${CMAKE_BINARY_DIR}/src/misc/revision.c")
exec_program(dirname ARGS ${rev} OUTPUT_VARIABLE rev_dir)
add_custom_command(
OUTPUT ${rev}
COMMAND rm -f ${rev} ${rev}.tmp
COMMAND mkdir -p `dirname ${rev}`
COMMAND mkdir -p ${rev_dir}
COMMAND echo "/* AUTOGENERATED FILE - DO NOT EDIT */" > ${rev}.tmp
COMMAND printf "const char psz_vlc_changeset[] = \"" >> ${rev}.tmp
COMMAND sh -c "printf `LANG=C svnversion ${CMAKE_SOURCE_DIR} || printf \"exported\"`" >> ${rev}.tmp
......@@ -212,10 +214,11 @@ set(rev)
# No real use for this one, we just used to need it.
# We should really remove that.
set(builtin "${CMAKE_BINARY_DIR}/src/modules/builtin.h")
exec_program(dirname ARGS ${builtin} OUTPUT_VARIABLE builtin_dir)
add_custom_command(
OUTPUT ${builtin}
COMMAND mkdir -p `dirname ${builtin}`
COMMAND mkdir -p ${builtin_dir}
COMMAND echo "/* Auto generated by ${CMAKE_CURRENT_BUILD_DIR}/CMakeLists.txt */" > ${builtin}
COMMAND echo "int vlc_entry__main( module_t* );" >> ${builtin}
COMMAND echo "#define ALLOCATE_ALL_BUILTINS() do {} while(0)" >> ${builtin}
......@@ -226,11 +229,12 @@ set(should)
##########################################################
# vlc_about.h
set(about "${CMAKE_BINARY_DIR}/include/vlc_about.h")
exec_program(dirname ARGS ${about} OUTPUT_VARIABLE about_dir)
add_custom_command(
OUTPUT ${about}
COMMAND rm -f "${about}.tmp"
COMMAND mkdir -p `dirname ${about}`
COMMAND mkdir -p ${about_dir}
COMMAND echo "/* Automatically generated file - DO NOT EDIT */" > "${about}.tmp"
COMMAND echo "static const char psz_license[] =" >> "${about}.tmp"
COMMAND cat ${CMAKE_SOURCE_DIR}/COPYING | sed s/\"/''/g | awk "{ print \"\\\"\"$0\"\\\\n\\\"\" }" >> "${about}.tmp"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment