mirror of
https://github.com/UltraCoderRU/libwebrtc.git
synced 2026-01-28 03:15:11 +00:00
OSX: Fix sample and library definition
This commit is contained in:
parent
49ddc448d1
commit
1eda115a37
6 changed files with 26 additions and 12 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,3 +1,4 @@
|
|||
.DS_Store
|
||||
/out/
|
||||
/.idea/
|
||||
*.gclient
|
||||
|
|
|
|||
|
|
@ -4,9 +4,17 @@ set(THREADS_PREFER_PTHREAD_FLAG ON)
|
|||
find_package(Threads REQUIRED)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
find_package(X11 REQUIRED)
|
||||
find_package(X11 REQUIRED)
|
||||
endif(UNIX AND NOT APPLE)
|
||||
|
||||
if(APPLE)
|
||||
find_library(AUDIOTOOLBOX_LIBRARY AudioToolbox)
|
||||
find_library(COREAUDIO_LIBRARY CoreAudio)
|
||||
find_library(COREFOUNDATION_LIBRARY CoreFoundation)
|
||||
find_library(COREGRAPHICS_LIBRARY CoreGraphics)
|
||||
find_library(FOUNDATION_LIBRARY Foundation)
|
||||
endif(APPLE)
|
||||
|
||||
set(PEERCONNECTION_SOURCE_FILES
|
||||
main.cpp
|
||||
Core.cpp
|
||||
|
|
@ -54,8 +62,14 @@ elseif(UNIX AND NOT APPLE)
|
|||
set(PEERCONNECTION_LIBRARIES ${PEERCONNECTION_LIBRARIES}
|
||||
${X11_LIBRARIES}
|
||||
${CMAKE_DL_LIBS})
|
||||
elseif(APPLE)
|
||||
set(PEERCONNECTION_LIBRARIES ${PEERCONNECTION_LIBRARIES}
|
||||
${AUDIOTOOLBOX_LIBRARY} ${COREAUDIO_LIBRARY} ${COREFOUNDATION_LIBRARY}
|
||||
${COREGRAPHICS_LIBRARY} ${FOUNDATION_LIBRARY})
|
||||
endif(WIN32)
|
||||
|
||||
target_link_libraries(PeerConnection ${PEERCONNECTION_LIBRARIES})
|
||||
add_library(webrtc STATIC IMPORTED)
|
||||
set_property(TARGET webrtc PROPERTY IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/libwebrtc/${LIBWEBRTC_LIBRARY_NAME}")
|
||||
|
||||
add_dependencies(PeerConnection libwebrtc_merge)
|
||||
target_link_libraries(PeerConnection ${PEERCONNECTION_LIBRARIES})
|
||||
add_dependencies(PeerConnection libwebrtc)
|
||||
|
|
@ -18,7 +18,7 @@ void HandleSDP(Json::Value object) {
|
|||
webrtc::CreateSessionDescription(type, sdp, &error));
|
||||
|
||||
if (!desc) {
|
||||
Console::Print("Can't parse the SDP: %s", error.description);
|
||||
Console::Print("Can't parse the SDP: %s", error.description.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -38,7 +38,7 @@ void HandleICECandidate(Json::Value object) {
|
|||
webrtc::CreateIceCandidate(sdp_mid, sdp_mlineindex, sdp, &error));
|
||||
|
||||
if (!candidate.get()) {
|
||||
Console::Print("Can't parse the ICE candidate: %s", error.description);
|
||||
Console::Print("Can't parse the ICE candidate: %s", error.description.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ set(GCLIENT_SYNC_COMMAND
|
|||
|
||||
set(SETUP_LINKS_COMMAND ${PYTHON_EXECUTABLE} src/setup_links.py)
|
||||
|
||||
ExternalProject_Add(webrtc
|
||||
ExternalProject_Add(webrtc-src
|
||||
DEPENDS chromium
|
||||
|
||||
PREFIX ${CMAKE_BINARY_DIR}
|
||||
|
|
@ -72,7 +72,7 @@ add_libwebrtc_command(webrtc-generate
|
|||
"${LIBWEBRTC_GEN_CMD}"
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
"Generating build files"
|
||||
webrtc)
|
||||
webrtc-src)
|
||||
|
||||
#
|
||||
# Update clang
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ if (WIN32)
|
|||
elseif (UNIX AND NOT APPLE)
|
||||
set(LIBWEBRTC_OBJ_EXT o)
|
||||
elseif (APPLE)
|
||||
set(LIBWEBRTC_OBJ_EXT a)
|
||||
endif (WIN32)
|
||||
set(LIBWEBRTC_OBJ_EXT o)
|
||||
endif ()
|
||||
|
||||
file(GLOB_RECURSE LIBWEBRTC_OBJ_FILES
|
||||
${LIBWEBRTC_OUTPUT_DIR}/obj/*.${LIBWEBRTC_OBJ_EXT})
|
||||
|
|
@ -41,7 +41,6 @@ set_target_properties(webrtc PROPERTIES
|
|||
LINKER_LANGUAGE C
|
||||
LIBRARY_OUTPUT_DIRECTORY ${LIBWEBRTC_OUTPUT_DIR})
|
||||
|
||||
|
||||
#
|
||||
# Install headers
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue