cmake: Correctly generate builtin.h.
[vlc.git] / extras / buildsystem / cmake / CMakeLists / src_CMakeLists.txt
index 258dee5..dda1b6e 100644 (file)
@@ -94,6 +94,7 @@ set( SOURCES_libvlc_common
        misc/rand.c
        misc/mtime.c
        misc/block.c
+       modules/builtin.h
        modules/modules.h
        modules/modules.c
        modules/cache.c
@@ -177,12 +178,11 @@ endif(APPLE)
 
 ##########################################################
 # revision.c
+
 set(rev "${CMAKE_CURRENT_SOURCE_DIR}/misc/revision.c")
 add_custom_command(
 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`"
@@ -191,6 +191,20 @@ COMMAND    mv -f ${rev}.tmp ${rev}
 VERBATIM
 )
 
+##########################################################
+# builtin.h
+# No real use for this one, we just used to need it.
+# We should really remove that.
+set(builtin "${CMAKE_CURRENT_SOURCE_DIR}/modules/builtin.h")
+
+add_custom_command(
+OUTPUT ${builtin}
+COMMAND        echo "/* Auto generated by ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt */" > ${builtin}
+COMMAND        echo "int vlc_entry__main( module_t* );" >> ${builtin}
+COMMAND        echo "#define ALLOCATE_ALL_BUILTINS() do {} while(0)" >> ${builtin}
+VERBATIM
+)
+
 set(rev)
 ##########################################################
 # SET_TARGET_PROPERTIES