(Chromium build) How can I generate Ninja project files for the third_party/webrtc/examples? - webrtc

I'm doing this on windows but I'm not sure it matters. It appears that the command to generate the Ninja project files for the Chromium source tree:
gn gen out\Default
Only builds projects files for some of the code in third_party\webrtc. I need to build project files for third_party\webrtc\examples. I've been trying to make changes to the BUILD.gn files but so far I haven't had any luck in getting gn to make me some project files for the examples.
Is there any switch or other flag I could set to build the examples?
Thank you for any suggestions.

You probably need to checkout webrtc and build run gn gen from there. The chromium build does not necessarily build all of the targets in webrtc.
See the webrtc docs for info on how to build.

Related

Adding .jar Files in Visual Studio Code

First and foremost, I really appreciate your help. I am trying to build an application by using an external library Apachi Poi. I know I need to add jar files to the project; however, I don't know how I should do that plus I have been searching on the Internet for a solution, but I could not find one even I checked this. My OS is Linux and I am running 1.33.1 version of VSCode.
[UPDATE]: I have fixed my problem. What I basically did was to install maven command to my
Linux machine and now I am using mvn command along with pom.xml to add my .jar files to
the project.

Build configuration error using Android NDK

There is a build configuration error (Gradle sync failed) starting a new simple Android project using IntelliJ IDEA and the installed Android SDK (API 28) to include C++ support.
If I can remember, it worked when first installed, but now any attempt to compile and build the project using the IntelliJ GUI fail. LLDB, CMake and NDK are all installed correctly in the correct folders and the local.properties file references the location of the SDK and NDK.
All attempts to refresh linked C++ projects or clear caches (invalidate caches/restart) make no difference.
CMake_server_log.txt suggests:
CMAKE SERVER: CMake Error: CMake was unable to find a build program
corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You
probably need to select a different build tool.
Build output (edited to remove path):
Cause: executing external native build for cmake CMakeLists.txt
There appears to be a lack of configuration to complete the build or missing PATH or ENVIRONMENT variable. Should I manually try to change this or add some extra code to the build.gradle or CMakeLists.txt? There is the ninja application in the cmake bin directory.
Even importing other NDK sample projects fail (after downloading any required dependencies e.g. Gradle version).
Reinstalling LLDB, CMake and the NDK via SDK Tools do not solve the issue either.
I get the impression that I need to completely uninstall IntelliJ IDEA on Windows and remove any remaining folders/files associated with it, before reinstalling it. That would be a shame as IntelliJ IDEA works for other type of Android projects not requiring native C++ support.

CMake: run install step of ExternalProject_add target before build step of another target

My CMake build process brings in and builds another CMake-based project through ExternalProject_add. I need to run the INSTALL step for this target before the main project will build. However, I can't seem to specify the INSTALL step of my external project as a dependency for the build step of my main project. What would this target be called? Do INSTALL targets have names?
I fixed this on OSX and Linux with ExternalProject_Add_StepTargets(MYPROJECT install), although it doesn't seem to work on Windows. Will investigate further when I get a chance, but for now that's the answer I'm sticking with :S

Compiled MuPDF library integration in android project

I have compiled mupdf library but when I integrate it in my existing android project to render the PDF it give me the following error :
java.lang.ExceptionInInitializerError
I have followed the following steps for integration :
Steps are explained here :
http://pastebin.com/YzHUhzE7
When i change the package name in mupdf test project then the native code get modified and the above expiation arises . So if any one knows how to integrate MuPDF compiled in my project .
finally I have integrated compiled mupdf library into my project .
Following steps I have followed :
after importing library into my project run the ndk-build on the jni. It will build the library.
Now the ExpetionInitializationError is solved.
Now the application is running on the device.
You can find the answer in this link http://www.chinabtp.com/android-pdf-viewer-library-or-mupdf-library-tutorials/
Here is the instruction:
Building a MuPDF lib on windows with Cygwin and android-ndk
Download MuPDF 1.3 Source from https://code.google.com/p/mupdf/downloads/list unzip to folder c:/mupdf-1.3-source
Install Cygwin: Download and run Run setup-x86.exe from http://cygwin.com/install.html when installing cygwin, make sure you selected make packages and C++ compilers
Make generate. open cygwin terminal, run
cd /cygdrive/
cd c/mupdf-1.3-source
make generate
Install android-ndk: download android-ndk-r9d-windows-x86.zip and unzip it to
c:/android-ndk-r9d
Build mupdf lib: on windows cmd console:
preparation:
cd c:/mupdf-1.3-source/platform/android
copy local.properties.sample local.properties
edit local.properties, uncomment
#sdk.dir=C:\\Program Files (x86)\\Android\\android-sdk
and change to
sdk.dir=REAL andforid-sdk Folder
build: while still on c:/mupdf-1.3-source/platform/android, run:
/android-ndk-r9d/ndk-build
Upon the completion of the build, a folder named libs will be created under
c:/mupdf-1.3-source/platform/android
Create android apk. Open eclipse, create a new android project from existing code, browse to c:/mupdf-1.3-source/platform/android, now you can create a mupdf apk.

pjsip using cmake

Has someone compiled pjsip using cmake?
The project does not have a way of using CMake to build the library itself (yet). But you can link to pjproject libs from your CMake project.
Here's a snippet from one of mine that uses pjproject as a dependency:
find_package(PKGCONFIG REQUIRED)
pkg_check_modules(PJSIP libpjproject>=1.14 REQUIRED)
include_directories(${PJSIP_INCLUDE_DIRS})
...
target_link_libraries(your_target ${PJSIP_LIBRARIES})
This requires pkg-config as well, and that pjproject.pc should be in it's default search path, or in directory in $PKG_CONFIG_PATH.
This should work on Linux and OS X.
I just made cmake-based compilation of PJSIP v2.3.
I use this compilation only on Windows platform for now, not tested on linux.
On Linux I recommend use PKG_CONFIG tool to discover PJSIP for your app.
Having peeked at their repository, the project is auto-tools/configure based. You would need to port the build system yourself. Depending on complexity, it is not that hard to accomplish. I have converted many projects to cmake. Maybe the pjsip comunity would welcome an upgrade to their build system, as I see they support multiple platforms like iphone, and windows through visual studio.
If you are using Clion IDE then it can automatically generate cmake file for pjproject. Just import it and it will open a wizard. You’ll need to specify the location of the sources, then select project files and include directories. Clion has the ability to make the cmake file from existing projects. for more help please see this link Clion Documentation