Skip to content

Instantly share code, notes, and snippets.

@dinhvh
Created July 12, 2013 06:27
Show Gist options
  • Save dinhvh/5982348 to your computer and use it in GitHub Desktop.
Save dinhvh/5982348 to your computer and use it in GitHub Desktop.
Pod::Spec.new do |s|
s.name = 'ctemplate'
s.version = '0.1'
s.summary = 'HTML template for C++.'
s.source = { :git => 'https://github.com/MailCore/mailcore2'}
s.source_files = 'Externals/ctemplate-ios/include/**/*.h'
s.preserve_path = 'Externals/ctemplate-ios', 'scripts'
s.xcconfig = { 'LIBRARY_SEARCH_PATHS' => '"${PODS_ROOT}/ctemplate/Externals/ctemplate-ios/lib/"',
# Use GNU C++ standard
'CLANG_CXX_LANGUAGE_STANDARD' => 'gnu++0x',
'CLANG_CXX_LIBRARY' => 'libstdc++',
# Required because MailCore include C++ code
'OTHER_LDFLAGS' => '-lctemplate-ios -lstdc++ -stdlib=libstdc++'
}
s.header_dir = 'ctemplate'
def s.pre_install (pod, lib)
# Retrieve all prebuilt dependencies
Dir.chdir(pod.root + 'scripts') do
`sh prepare-ctemplate-ios.sh`
raise "[!] Failed pre install hook" unless $?.to_i == 0
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment