diff options
author | manuroe <manu@matrix.org> | 2016-09-27 11:57:29 +0200 |
---|---|---|
committer | manuroe <manu@matrix.org> | 2016-09-27 14:07:30 +0200 |
commit | 6f113dd7b3b4de918c4efb81d38a1ffe1d391b5b (patch) | |
tree | 19311a94dc999d776b36535d28f2c751cb7d629f /OLMKit.podspec | |
parent | 1d06f2a4d9565c332081bc685edd8fd61d6507ef (diff) |
OLMKit: Make the project build
Make OLMKit CocoaPods expose the obj-c wrapper of libolm
Diffstat (limited to 'OLMKit.podspec')
-rw-r--r-- | OLMKit.podspec | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/OLMKit.podspec b/OLMKit.podspec new file mode 100644 index 0000000..a27d0f7 --- /dev/null +++ b/OLMKit.podspec @@ -0,0 +1,55 @@ +Pod::Spec.new do |s| + + # The libolm version + MAJOR = 1 + MINOR = 3 + PATCH = 0 + + s.name = "OLMKit" + s.version = "#{MAJOR}.#{MINOR}.#{PATCH}" + s.summary = "An Objective-C wrapper of olm (http://matrix.org/git/olm)" + + s.description = <<-DESC + olm is an implementation of the Double Ratchet cryptographic ratchet in C++ + DESC + + s.homepage = "http://matrix.org/git/olm" + + s.license = { :type => "Apache License, Version 2.0", :file => "LICENSE" } + + s.authors = { "Chris Ballinger" => "chrisballinger@gmail.com", + "matrix.org" => "support@matrix.org" } + + s.platform = :ios, "5.0" + + # Expose the Objective-C wrapper API of libolm + s.public_header_files = "xcode/OLMKit/*.h" + + s.source = { + :git => "https://matrix.org/git/olm.git", + :tag => s.version.to_s + } + + s.source_files = "xcode/OLMKit/*.{h,m}", "include/**/*.{h,hh}", "src/*.{c,cpp}", "lib/ed25519/**/*.{h,c}", "lib/crypto-algorithms/sha256.c", "lib/crypto-algorithms/aes.c", "lib/curve25519-donna/curve25519-donna.c" + + s.library = "c++" + + + # Use the same compiler options for C and C++ as olm/Makefile + + s.compiler_flags = "-g -O3 -DOLMLIB_VERSION_MAJOR=#{MAJOR} -DOLMLIB_VERSION_MINOR=#{MINOR} -DOLMLIB_VERSION_PATCH=#{PATCH}" + s.xcconfig = { + 'USER_HEADER_SEARCH_PATHS' =>"#{File.join(File.dirname(__FILE__), 'include')} #{File.join(File.dirname(__FILE__), 'lib')}" + } + + s.subspec 'olmc' do |olmc| + olmc.source_files = "src/*.{c}", "lib/ed25519/**/*.{h,c}", "lib/crypto-algorithms/sha256.c", "lib/crypto-algorithms/aes.c", "lib/curve25519-donna/curve25519-donna.c" + olmc.compiler_flags = ' -std=c99 -fPIC' + end + + s.subspec 'olmcpp' do |olmcpp| + olmcpp.source_files = "src/*.{cpp}" + olmcpp.compiler_flags = ' -std=c++11 -fPIC' + end + +end |