From: Pierre d'Herbemont Date: Sat, 9 Feb 2008 12:21:00 +0000 (+0000) Subject: cmake: Find live555. X-Git-Tag: 0.9.0-test0~2766 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=c9dcc35ade2406858ab836cc9550e505bc32ffc5;p=vlc cmake: Find live555. --- diff --git a/extras/buildsystem/cmake/include/FindLive555.cmake b/extras/buildsystem/cmake/include/FindLive555.cmake new file mode 100644 index 0000000000..9e72baf1d6 --- /dev/null +++ b/extras/buildsystem/cmake/include/FindLive555.cmake @@ -0,0 +1,46 @@ +# - Find library containing Live555() +# The following variables are set if Live555 is found. If Live555 is not +# found, Live555_FOUND is set to false. +# Live555_FOUND - System has Live555. +# Live555_LIBRARIES - Link these to use Live555. +# Live555_CFLAGS - Link these to use Live555. + + +if (NOT Live555_SEARCHED) + include(CheckLibraryExists) + + set(Live555_SEARCHED TRUE CACHE INTERNAL "") + set(Live555_FOUND FALSE CACHE INTERNAL "") + + pkg_check_modules(Live555 libLive555) + + if (NOT Live555_FOUND) + set(Live555_LIBRARIES "") + foreach (library livemedia livemedia_pic) + find_library( ${library}_LIBRARY ${library} ) + if (${library}_LIBRARY) + set(Live555_LIBRARIES "${library};${Live555_LIBRARIES}") + set(Live555_FOUND TRUE CACHE INTERNAL "") + endif (${library}_LIBRARY) + endforeach (library) + foreach (library groupsock_pic groupsock BasicUsageEnvironment_pic BasicUsageEnvironment UsageEnvironment_pic UsageEnvironment) + find_library( ${library}_LIBRARY ${library} ) + if (${library}_LIBRARY) + set(Live555_LIBRARIES "${library};${Live555_LIBRARIES}") + endif (${library}_LIBRARY) + endforeach (library) + set(Live555_LIBRARIES "${Live555_LIBRARIES}" CACHE INTERNAL STRING) + endif (NOT Live555_FOUND) + + if (Live555_FOUND) + if (NOT Live555_FIND_QUIETLY) + message(STATUS "Found Live555 in: ${Live555_LIBRARIES}") + endif (NOT Live555_FIND_QUIETLY) + else (Live555_FOUND) + if (Live555_FIND_REQUIRED) + message(FATAL_ERROR "Could not find the library containing Live555") + endif (Live555_FIND_REQUIRED) + endif (Live555_FOUND) + + mark_as_advanced(Live555_LIBRARIES) +endif(NOT Live555_SEARCHED) diff --git a/extras/buildsystem/cmake/include/config.cmake b/extras/buildsystem/cmake/include/config.cmake index 9ed60fe3ff..9e4d6882b0 100644 --- a/extras/buildsystem/cmake/include/config.cmake +++ b/extras/buildsystem/cmake/include/config.cmake @@ -460,6 +460,13 @@ if(Matroska_FOUND) vlc_module_add_link_libraries(mkv ${Matroska_LIBRARIES}) endif(Matroska_FOUND) +find_package(Live555 0.7.7) +if(Live555_FOUND) + vlc_enable_modules(live555) + vlc_add_module_compile_flag(live555 ${Live555_CFLAGS}) + vlc_module_add_link_libraries(live555 ${Live555_LIBRARIES}) +endif(Live555_FOUND) + set(CMAKE_REQUIRED_INCLUDES) ###########################################################