John Qualis
John Qualis

Reputation: 1743

pjsip using cmake

Has someone compiled pjsip using cmake?

Upvotes: 1

Views: 2010

Answers (4)

Alex Morrison
Alex Morrison

Reputation: 405

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

Upvotes: 0

hal
hal

Reputation: 1757

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.

Upvotes: 2

zehrizzatti
zehrizzatti

Reputation: 36

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.

Upvotes: 2

David
David

Reputation: 9965

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.

Upvotes: 0

Related Questions