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