Skip to content
Browse files

Make pjsip podspec use submodules. Add iOS framework dependencies.

  • Loading branch information...
1 parent e26dafc commit 4add8c106f97ed8d8cd25bd0fa7b51814a77606a @chebur chebur committed Mar 26, 2013
Showing with 61 additions and 9 deletions.
  1. +61 −9 pjsip/2.1.0/pjsip.podspec
View
70 pjsip/2.1.0/pjsip.podspec
@@ -6,7 +6,6 @@ Pod::Spec.new do |s|
s.author = 'www.pjsip.org'
s.source = { :git => "https://github.com/chebur/pjsip.git", :tag => "#{s.version}" }
s.platform = :ios, '5.0'
-
s.description = <<-DESC
PJSIP is a free and open source multimedia communication library written in C language implementing standard based protocols such as SIP, SDP, RTP, STUN, TURN, and ICE. It combines signaling protocol (SIP) with rich multimedia framework and NAT traversal functionality into high level API that is portable and suitable for almost any type of systems ranging from desktops, embedded systems, to mobile handsets.
@@ -24,17 +23,70 @@ Alternatively, if you are unable to release your application as Open Source Soft
PJSIP may include third party software in its source code distribution. Third Party Software does not comprise part of "The Software". Please make sure that you comply with the licensing term of each software.
LICENSE
}
+
+ s.subspec 'pjsip' do |pjsip|
+ pjsip.public_header_files = 'pjproject-2.1.0/pjsip/include/**'
+ pjsip.preserve_paths = 'pjproject-2.1.0/pjsip/include/**/*.h', 'pjproject-2.1.0/pjsip/lib/*.a'
+ pjsip.libraries = 'pjsua-arm-apple-darwin9', 'pjsip-arm-apple-darwin9', 'pjsip-simple-arm-apple-darwin9', 'pjsip-ua-arm-apple-darwin9'
+ pjsip.xcconfig = {
+ 'HEADER_SEARCH_PATHS' => '$(PODS_ROOT)/pjsip/pjproject-2.1.0/pjsip/include',
+ 'LIBRARY_SEARCH_PATHS' => '$(PODS_ROOT)/pjsip/pjproject-2.1.0/pjsip/lib'
+ }
+ end
- s.public_header_files = 'pjproject-2.1.0/pjsip/include/**', 'pjproject-2.1.0/pjlib/include/**', 'pjproject-2.1.0/pjlib-util/include/**', 'pjproject-2.1.0/pjnath/include/**', 'pjproject-2.1.0/pjmedia/include/**'
+ s.subspec 'pjlib' do |pjlib|
+ pjlib.public_header_files = 'pjproject-2.1.0/pjlib/include/**'
+ pjlib.preserve_paths = 'pjproject-2.1.0/pjlib/include/**/*.h', 'pjproject-2.1.0/pjlib/lib/*.a'
+ pjlib.libraries = 'pj-arm-apple-darwin9'
+ pjlib.xcconfig = {
+ 'HEADER_SEARCH_PATHS' => '$(PODS_ROOT)/pjsip/pjproject-2.1.0/pjlib/include',
+ 'LIBRARY_SEARCH_PATHS' => '$(PODS_ROOT)/pjsip/pjproject-2.1.0/pjlib/lib'
+ }
+ pjlib.frameworks = 'CFNetwork'
+ end
- s.preserve_paths = "**/lib/**/*.a", 'pjproject-2.1.0/pjsip/include/**/*.h', 'pjproject-2.1.0/pjlib/include/**/*.h', 'pjproject-2.1.0/pjlib-util/include/**/*.h', 'pjproject-2.1.0/pjnath/include/**/*.h', 'pjproject-2.1.0/pjmedia/include/**/*.h'
+ s.subspec 'pjlib_util' do |pjlib_util|
+ pjlib_util.public_header_files = 'pjproject-2.1.0/pjlib-util/include/**'
+ pjlib_util.preserve_paths = 'pjproject-2.1.0/pjlib-util/include/**/*.h', 'pjproject-2.1.0/pjlib-util/lib/*.a'
+ pjlib_util.libraries = 'pjlib-util-arm-apple-darwin9'
+ pjlib_util.xcconfig = {
+ 'HEADER_SEARCH_PATHS' => '$(PODS_ROOT)/pjsip/pjproject-2.1.0/pjlib-util/include',
+ 'LIBRARY_SEARCH_PATHS' => '$(PODS_ROOT)/pjsip/pjproject-2.1.0/pjlib-util/lib'
+ }
+ end
- s.header_mappings_dir = 'pjproject-2.1.0'
+ s.subspec 'pjnath' do |pjnath|
+ pjnath.public_header_files = 'pjproject-2.1.0/pjnath/include/**'
+ pjnath.preserve_paths = 'pjproject-2.1.0/pjnath/include/**/*.h', 'pjproject-2.1.0/pjnath/lib/*.a'
+ pjnath.libraries = 'pjnath-arm-apple-darwin9'
+ pjnath.xcconfig = {
+ 'HEADER_SEARCH_PATHS' => '$(PODS_ROOT)/pjsip/pjproject-2.1.0/pjnath/include',
+ 'LIBRARY_SEARCH_PATHS' => '$(PODS_ROOT)/pjsip/pjproject-2.1.0/pjnath/lib'
+ }
+ end
+
+ s.subspec 'pjmedia' do |pjmedia|
+ pjmedia.public_header_files = 'pjproject-2.1.0/pjmedia/include/**'
+ pjmedia.preserve_paths = 'pjproject-2.1.0/pjmedia/include/**/*.h', 'pjproject-2.1.0/pjmedia/lib/*.a'
+ pjmedia.libraries = 'pjmedia-arm-apple-darwin9', 'pjmedia-audiodev-arm-apple-darwin9', 'pjmedia-codec-arm-apple-darwin9', 'pjsdp-arm-apple-darwin9'
+ pjmedia.xcconfig = {
+ 'HEADER_SEARCH_PATHS' => '$(PODS_ROOT)/pjsip/pjproject-2.1.0/pjmedia/include',
+ 'LIBRARY_SEARCH_PATHS' => '$(PODS_ROOT)/pjsip/pjproject-2.1.0/pjmedia/lib'
+ }
+ pjmedia.frameworks = 'AudioToolbox'
+ end
- s.libraries = 'g7221codec-arm-apple-darwin9', 'ilbccodec-arm-apple-darwin9', 'milenage-arm-apple-darwin9', 'pjsdp-arm-apple-darwin9', 'speex-arm-apple-darwin9', 'srtp-arm-apple-darwin9', 'gsmcodec-arm-apple-darwin9', 'pj-arm-apple-darwin9', 'pjlib-util-arm-apple-darwin9', 'pjmedia-arm-apple-darwin9', 'pjmedia-audiodev-arm-apple-darwin9', 'pjmedia-codec-arm-apple-darwin9', 'pjnath-arm-apple-darwin9', 'pjsip-arm-apple-darwin9', 'pjsip-simple-arm-apple-darwin9', 'pjsip-ua-arm-apple-darwin9', 'pjsua-arm-apple-darwin9', 'resample-arm-apple-darwin9'
+ s.subspec 'third_party' do |third_party|
+ third_party.preserve_paths = 'pjproject-2.1.0/third_party/lib/*.a'
+ third_party.libraries = 'g7221codec-arm-apple-darwin9', 'ilbccodec-arm-apple-darwin9', 'milenage-arm-apple-darwin9', 'speex-arm-apple-darwin9', 'srtp-arm-apple-darwin9', 'gsmcodec-arm-apple-darwin9', 'resample-arm-apple-darwin9'
+ third_party.xcconfig = {
+ 'LIBRARY_SEARCH_PATHS' => '$(PODS_ROOT)/pjsip/pjproject-2.1.0/third_party/lib'
+ }
+ end
- s.xcconfig = {
- 'HEADER_SEARCH_PATHS' => '$(PODS_ROOT)/pjsip/pjproject-2.1.0/pjsip/include $(PODS_ROOT)/pjsip/pjproject-2.1.0/pjlib/include $(PODS_ROOT)/pjsip/pjproject-2.1.0/pjlib-util/include $(PODS_ROOT)/pjsip/pjproject-2.1.0/pjnath/include $(PODS_ROOT)/pjsip/pjproject-2.1.0/pjmedia/include',
- 'LIBRARY_SEARCH_PATHS' => '$(PODS_ROOT)/pjsip/pjproject-2.1.0/pjsip/lib $(PODS_ROOT)/pjsip/pjproject-2.1.0/pjlib/lib $(PODS_ROOT)/pjsip/pjproject-2.1.0/pjlib-util/lib $(PODS_ROOT)/pjsip/pjproject-2.1.0/pjnath/lib $(PODS_ROOT)/pjsip/pjproject-2.1.0/pjmedia/lib $(PODS_ROOT)/pjsip/pjproject-2.1.0/third_party/lib',
- 'GCC_PREPROCESSOR_DEFINITIONS' => 'PJ_AUTOCONF=1' }
+ s.header_mappings_dir = 'pjproject-2.1.0'
+
+ s.xcconfig = {'GCC_PREPROCESSOR_DEFINITIONS' => 'PJ_AUTOCONF=1' }
+
end
+

0 comments on commit 4add8c1

Please sign in to comment.
Something went wrong with that request. Please try again.