From 883ed8d4257b88cb9a866e50999574967a278fca Mon Sep 17 00:00:00 2001 From: Pierre d'Herbemont Date: Fri, 8 Feb 2008 22:08:02 +0000 Subject: [PATCH] cmake: Add -read_only_relocs warning on ffmpeg for Pre-10.5. --- extras/buildsystem/cmake/include/config.cmake | 3 +++ extras/buildsystem/cmake/include/vlc_module_funcs.cmake | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/extras/buildsystem/cmake/include/config.cmake b/extras/buildsystem/cmake/include/config.cmake index 57acb370ac..e874859dd6 100644 --- a/extras/buildsystem/cmake/include/config.cmake +++ b/extras/buildsystem/cmake/include/config.cmake @@ -216,6 +216,9 @@ if(APPLE) add_definitions(-std=gnu99) # Hack for obj-c files to be compiled with gnu99 vlc_enable_modules(macosx minimal_macosx access_eyetv quartztext) + # On Pre-10.5 + vlc_module_add_link_flags (ffmpeg "-read_only_relocs warning") + vlc_check_include_files (ApplicationServices/ApplicationServices.h) vlc_check_include_files (Carbon/Carbon.h) vlc_check_include_files (CoreAudio/CoreAudio.h) diff --git a/extras/buildsystem/cmake/include/vlc_module_funcs.cmake b/extras/buildsystem/cmake/include/vlc_module_funcs.cmake index 3ea7846e1a..b3933dbe6b 100644 --- a/extras/buildsystem/cmake/include/vlc_module_funcs.cmake +++ b/extras/buildsystem/cmake/include/vlc_module_funcs.cmake @@ -8,6 +8,7 @@ MACRO(vlc_add_module module_name) endif( NOT ${ENABLE_NO_SYMBOL_CHECK} ) set_target_properties( ${module_name}_plugin PROPERTIES COMPILE_FLAGS "-D__PLUGIN__ -DMODULE_NAME=${module_name} -DMODULE_NAME_IS_${module_name} -I${CMAKE_CURRENT_SOURCE_DIR} ${VLC_${module_name}_COMPILE_FLAG}" ) + set_target_properties( ${module_name}_plugin PROPERTIES LINK_FLAGS "${VLC_${module_name}_LINK_FLAGS}" ) if (VLC_${module_name}_LINK_LIBRARIES) target_link_libraries( ${module_name}_plugin ${VLC_${module_name}_LINK_LIBRARIES}) endif (VLC_${module_name}_LINK_LIBRARIES) @@ -42,6 +43,10 @@ MACRO(vlc_set_module_properties module_name) set_target_properties(${module_name}_plugin ${ARGN}) ENDMACRO(vlc_set_module_properties) +MACRO(vlc_module_add_link_flags module_name) + set(VLC_${module_name}_LINK_FLAGS ${VLC_${module_name}_LINK_FLAGS} ${ARGN}) +ENDMACRO(vlc_module_add_link_flags) + MACRO(vlc_module_add_link_libraries module_name) set(VLC_${module_name}_LINK_LIBRARIES ${VLC_${module_name}_LINK_LIBRARIES} ${ARGN}) ENDMACRO(vlc_module_add_link_libraries) -- GitLab