Commit 649cc5b5 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

cmake: Fix revision generation.

parent d4985d0f
......@@ -170,21 +170,28 @@ target_link_libraries(libvlc-control libvlc)
target_link_libraries(libvlc ${HAVE_ICONV})
# Carbon
find_library(CARBON_FRAMEWORK Carbon)
target_link_libraries(libvlc ${CARBON_FRAMEWORK})
if(APPLE)
find_library(CARBON_FRAMEWORK Carbon)
target_link_libraries(libvlc ${CARBON_FRAMEWORK})
endif(APPLE)
##########################################################
# version.c
# revision.c
set(rev "${CMAKE_CURRENT_SOURCE_DIR}/misc/revision.c")
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/misc/revision.c
COMMAND sh "rm -f misc/revision.c misc/revision.c.tmp &&
echo '/* AUTOGENERATED FILE - DO NOT EDIT */' > misc/revision.c.tmp &&
REVISION=\"$$\(LANG=C svnversion \\\"$\(top_srcdir)\\\" 2>/dev/null || echo exported)\" ; &&
echo \"const char psz_vlc_changeset[] = \\\"$$REVISION\\\";\" >> misc/revision.c.tmp &&
mv -f misc/revision.c.tmp misc/revision.c"
OUTPUT ${rev}
COMMAND echo "${rev}"
COMMAND rm -f ${rev} ${rev}.tmp
COMMAND echo ${rev}
COMMAND echo "/* AUTOGENERATED FILE - DO NOT EDIT */" > ${rev}.tmp
COMMAND printf "const char psz_vlc_changeset[] = \"" >> ${rev}.tmp
COMMAND sh -c "echo `LANG=C\ svnversion\ ${CMAKE_SOURCE_DIR}\ ||\ echo\ exported`"
COMMAND echo "\";" >> ${rev}.tmp
COMMAND mv -f ${rev}.tmp ${rev}
VERBATIM
)
set(rev)
##########################################################
# SET_TARGET_PROPERTIES
......
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