Commit 5065a3dc authored by Ghislain MARY's avatar Ghislain MARY

Fix build of pcap_player when using CMake.

parent 49940c15
......@@ -125,6 +125,7 @@ test_big_endian(WORDS_BIGENDIAN)
find_package(ORTP REQUIRED)
find_package(PolarSSL)
find_package(PCAP)
if(ENABLE_UNIT_TESTS)
find_package(CUnit)
......@@ -265,6 +266,9 @@ include_directories(
${ORTP_INCLUDE_DIRS}
)
if(PCAP_FOUND)
include_directories(${PCAP_INCLUDE_DIRS})
endif()
if(SRTP_FOUND)
include_directories(${SRTP_INCLUDE_DIRS})
endif()
......@@ -330,6 +334,9 @@ endif()
if(ENABLE_NON_FREE_CODECS)
set(HAVE_NON_FREE_CODECS 1)
endif()
if(PCAP_FOUND)
set(HAVE_PCAP 1)
endif()
if(SRTP_FOUND)
set(HAVE_SRTP 1)
endif()
......
......@@ -27,7 +27,6 @@
# PCAP_LIBRARIES - The libraries needed to use pcap
set(_PCAP_ROOT_PATHS
${WITH_PCAP}
${CMAKE_INSTALL_PREFIX}
)
......
......@@ -66,3 +66,4 @@
#cmakedefine HAVE_LINUX_VIDEODEV_H 1
#cmakedefine HAVE_LINUX_VIDEODEV2_H 1
#cmakedefine HAVE_POLARSSL_SSL_H 1
#cmakedefine HAVE_PCAP 1
......@@ -338,6 +338,9 @@ endif()
if(HAVE_DLOPEN)
list(APPEND VOIP_LIBS dl)
endif()
if(PCAP_FOUND)
list(APPEND VOIP_LIBS ${PCAP_LIBRARIES})
endif()
if(BZRTP_FOUND)
list(APPEND VOIP_LIBS ${BZRTP_LIBRARIES})
endif()
......
......@@ -29,7 +29,6 @@ foreach (simple_executable ${simple_executables})
target_link_libraries(${simple_executable} mediastreamer_voip mediastreamer_base)
endforeach()
find_package(PCAP QUIET)
if (PCAP_FOUND)
add_executable(pcap_playback pcap_playback.c common.c)
target_link_libraries(pcap_playback mediastreamer_voip mediastreamer_base)
......
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