Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## Version 1.1

*TBD*

[View Issues][v1.1-issues]

**Features:**

- Added `BUILD_TESTS` CMake configuration variable

## Version 1.0

*March 27, 2017*
Expand Down Expand Up @@ -39,4 +49,5 @@
- Removed BUILD_TESTS flag for now
- Fixed static linking

[v1.1-issues]:https://github.com/aisouard/libwebrtc/milestone/1
[v1.0-issues]:https://github.com/aisouard/libwebrtc/milestone/1
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ set(_WEBRTC_CMAKE_ARGS
-DTARGET_OS=${TARGET_OS}
-DWEBRTC_PARENT_DIR:PATH=${CMAKE_BINARY_DIR}/webrtc)

if (BUILD_TESTS)
set(_WEBRTC_CMAKE_ARGS ${_WEBRTC_CMAKE_ARGS} -DBUILD_TESTS=${BUILD_TESTS})
endif (BUILD_TESTS)

if (WEBRTC_BRANCH_HEAD)
set(_WEBRTC_CMAKE_ARGS ${_WEBRTC_CMAKE_ARGS} -DWEBRTC_BRANCH_HEAD=${WEBRTC_BRANCH_HEAD})
endif (WEBRTC_BRANCH_HEAD)
Expand Down Expand Up @@ -112,7 +116,7 @@ ExternalProject_Add(
-DINSTALL_CMAKE_DIR:PATH=${CMAKE_BINARY_DIR}/lib/cmake/LibWebRTC
-DTARGET_OS:STRING=${TARGET_OS}
-DWEBRTC_OUTPUT_DIR:PATH=${CMAKE_BINARY_DIR}/webrtc/src/out/${_CONFIG}
-DWEBRTC_SOURCE_DIR:PATH=${CMAKE_BINARY_DIR}/webrtc/src/webrtc
-DWEBRTC_SOURCE_DIR:PATH=${CMAKE_BINARY_DIR}/webrtc/src
)

if (BUILD_SAMPLE)
Expand Down
2 changes: 2 additions & 0 deletions CMakeModules/Package.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ if (UNIX AND NOT APPLE)
set(CPACK_DEBIAN_PACKAGE_SECTION "libs")
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://axel.isouard.fr/libwebrtc")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS TRUE)
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "${_PACKAGE_ARCH}")
set(CPACK_GENERATOR "${CPACK_GENERATOR};DEB")
endif (BUILD_DEB_PACKAGE)

Expand All @@ -64,6 +65,7 @@ if (UNIX AND NOT APPLE)
set(CPACK_RPM_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
set(CPACK_RPM_PACKAGE_URL "https://axel.isouard.fr/libwebrtc")
set(CPACK_RPM_PACKAGE_LICENSE "Apache-2.0")
set(CPACK_RPM_PACKAGE_ARCHITECTURE "${_PACKAGE_ARCH}")
set(CPACK_GENERATOR "${CPACK_GENERATOR};RPM")
endif (BUILD_RPM_PACKAGE)

Expand Down
2 changes: 1 addition & 1 deletion CMakeModules/Templates/LibWebRTCConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ set(LIBWEBRTC_TARGET_OS "@TARGET_OS@")
set(LIBWEBRTC_TARGET_CPU "@TARGET_CPU@")

# Include directory
set(LIBWEBRTC_INCLUDE_DIRS "@INSTALL_INCLUDE_DIR@")
set(LIBWEBRTC_INCLUDE_DIRS "@INSTALL_INCLUDE_DIR@" "@INSTALL_INCLUDE_DIR@/webrtc")

# Libraries directory
set(LIBWEBRTC_LIBRARY_DIRS "@INSTALL_LIB_DIR@")
Expand Down
2 changes: 1 addition & 1 deletion CMakeModules/Version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ set(LIBWEBRTC_API_VERSION
set(LIBWEBRTC_VERSION
${LIBWEBRTC_API_VERSION}${LIBWEBRTC_BUILD_VERSION})

set(LIBWEBRTC_WEBRTC_HEAD refs/branch-heads/57)
set(LIBWEBRTC_WEBRTC_HEAD refs/branch-heads/63)
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ perform cross-compiling.

Generate Red Hat package, defaults to OFF, available under Linux only.

- **BUILD_TESTS**

Build WebRTC unit tests and mocked classes such as `FakeAudioCaptureModule`.

- **BUILD_SAMPLE**

Build an executable located inside the `sample` folder.
Expand Down
7 changes: 4 additions & 3 deletions libwebrtc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ project(libwebrtc)
set(_OBJ_EXT ${CMAKE_CXX_OUTPUT_EXTENSION})

file(GLOB_RECURSE _OBJ_FILES
${WEBRTC_OUTPUT_DIR}/obj/*${_OBJ_EXT})
${WEBRTC_OUTPUT_DIR}/obj/*${_OBJ_EXT}
${WEBRTC_OUTPUT_DIR}/clang_x64/obj/*${_OBJ_EXT})

if (NOT _OBJ_EXT STREQUAL ".o")
file(GLOB_RECURSE _OBJ_FILES_ASM
Expand Down Expand Up @@ -40,8 +41,8 @@ set_target_properties(webrtc PROPERTIES

#
# Install headers
install(DIRECTORY ${WEBRTC_SOURCE_DIR}
DESTINATION "include"
install(DIRECTORY "${WEBRTC_SOURCE_DIR}/"
DESTINATION "include/webrtc"
FILES_MATCHING PATTERN "*.h")

#
Expand Down
3 changes: 2 additions & 1 deletion sample/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
int main(int argc, char **argv) {
#ifdef WIN32
rtc::EnsureWinsockInit();
rtc::Win32Thread w32_thread;
rtc::Win32SocketServer w32_ss;
rtc::Win32Thread w32_thread(&w32_ss);
rtc::ThreadManager::Instance()->SetCurrentThread(&w32_thread);
#endif

Expand Down
17 changes: 15 additions & 2 deletions webrtc/CMakeLists.txt.in
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,17 @@ libwebrtc_command(
set(_DEPENDENCIES webrtc-clang)

if (UNIX AND NOT APPLE)
set(SYSROOT_ARCH ${TARGET_CPU})

if (SYSROOT_ARCH STREQUAL "x64")
set(SYSROOT_ARCH "amd64")
elseif (SYSROOT_ARCH STREQUAL "x86")
set(SYSROOT_ARCH "i386")
endif (SYSROOT_ARCH STREQUAL "x64")

libwebrtc_command(
NAME webrtc-toolchain
COMMAND ${PYTHON_EXECUTABLE} ${WEBRTC_PARENT_DIR}/src/build/linux/sysroot_scripts/install-sysroot.py --running-as-hook
COMMAND ${PYTHON_EXECUTABLE} ${WEBRTC_PARENT_DIR}/src/build/linux/sysroot_scripts/install-sysroot.py --arch=${SYSROOT_ARCH} --running-as-hook
WORKING_DIRECTORY "${WEBRTC_PARENT_DIR}"
COMMENT "Retrieving sysroot"
DEPENDS webrtc-sync
Expand Down Expand Up @@ -136,7 +144,12 @@ libwebrtc_command(
DEPENDS ${_DEPENDENCIES}
)

set(_NINJA_COMMAND ninja ${NINJA_ARGS} -C ${_NINJA_BUILD_DIR} webrtc system_wrappers_default libjingle_peerconnection)
set(_NINJA_COMMAND ninja ${NINJA_ARGS} -C ${_NINJA_BUILD_DIR} webrtc system_wrappers_default)

if (BUILD_TESTS)
set(_NINJA_COMMAND ${_NINJA_COMMAND} webrtc_tests)
endif (BUILD_TESTS)

libwebrtc_command(
NAME webrtc-build
COMMAND ${_NINJA_COMMAND}
Expand Down