使用 cmake 的 pjsip

发布于 2024-10-08 00:33:09 字数 25 浏览 0 评论 0原文

有人用cmake编译过pjsip吗?

Has someone compiled pjsip using cmake?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

森林散布 2024-10-15 00:33:09

该项目还没有使用 CMake 来构建库本身的方法。但是您可以从 CMake 项目链接到 pjproject 库。
这是我的一个片段,它使用 pjproject 作为依赖项:

find_package(PKGCONFIG REQUIRED)
pkg_check_modules(PJSIP libpjproject>=1.14 REQUIRED)
include_directories(${PJSIP_INCLUDE_DIRS})
...
target_link_libraries(your_target ${PJSIP_LIBRARIES})

这也需要 pkg-config ,并且 pjproject.pc 应该位于它的默认搜索路径中,或者在 $PKG_CONFIG_PATH 目录中。

这应该适用于 Linux 和 OS X。

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.

惟欲睡 2024-10-15 00:33:09

我刚刚制作了基于cmake的PJSIP v2.3编译
我目前仅在Windows平台上使用此编译,未在Linux上进行测试。

在 Linux 上,我建议使用 PKG_CONFIG 工具来发现应用程序的 PJSIP。

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.

一杯敬自由 2024-10-15 00:33:09

查看他们的存储库后,该项目是基于自动工具/配置的。您需要自己移植构建系统。根据复杂性,实现起来并不难。我已经将许多项目转换为cmake。也许 pjsip 社区会欢迎升级他们的构建系统,因为我看到他们通过 Visual Studio 支持多个平台,例如 iPhone 和 Windows。

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.

冬天旳寂寞 2024-10-15 00:33:09

如果您使用 Clion IDE,那么它可以自动为 pjproject 生成 cmake 文件。只需导入它,它就会打开一个向导。您需要指定源的位置,然后选择项目文件和包含目录。 Clion 能够从现有项目创建 cmake 文件。如需更多帮助,请参阅此链接 Clion 文档

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文