在Cocoapods库中的编译中不包括源文件
Excluding source files from compilation in a CocoaPods library
我正在将库(unrar4ios)转换为使用可可录,但我遇到了汇编问题。大多数源文件是C 文件,其中一些文件未直接添加到项目"编译源"列表中,但是确实通过#include
汇编了。当其中一个自行编译时,它会失败,因为它取决于 #include
s it的文件(有点奇怪,我知道)。
简而言之,我需要将文件下载到PODS目录中,但随后不包括在库的目标中。据我所知,source_files
PODSPEC同时控制。有没有一种方法可以纯粹在图书馆侧实现这一目标,而无需求助于客户端项目的podfile中的某些钩子?
我必须列出需要在source_files
属性中明确编译的每个文件,并列出在preserve_paths
属性中隐含构建所需的文件。喜欢:
Pod::Spec.new do |s|
s.name = "UnrarKit"
...
s.source_files = "Classes/*.{mm,m,h}",
"Libraries/unrar/*.hpp",
"Libraries/unrar/archive.cpp",
"Libraries/unrar/arcread.cpp",
"Libraries/unrar/cmddata.cpp",
...
# These files are built implicitly as dependencies
s.preserve_paths = "Libraries/unrar/arccmt.cpp",
"Libraries/unrar/coder.cpp",
"Libraries/unrar/log.cpp",
...
相关文章:
- 为什么 cmake 许可证<>样式不包括?
- 计算平均值,不包括上次得分
- 将值从另一个数组写入数组,不包括不需要的值 C++
- 如果语句不包括文本行?
- 找到 x^n 的所有组合,并检查它们的总和是否等于一个不包括相同数字的数字
- 重建 exe 时如何自动链接新的静态库而不更改源文件?
- 如何保证不包括 iostream?
- 创建一个循环,该循环将输出大于零且小于 60(不包括 60)的所有 5 的倍数
- C/C++ 经过的流程周期,不包括断点处
- CMake 看不到源文件,找不到 #includes
- 回文,不包括特殊字符和空格
- 查找 n 个数字的公因数数(不包括"1"作为公因数)
- Eclipse GDB 找不到源文件
- 在 C++ 中的 SetClipboardData() 之后粘贴不包括记事本的换行符
- cmake 错误 当文件由EXEC_PROGRAM生成时找不到源文件
- C++11 exit() 和 abs() 不包括 <cstdlib>?
- 生成生成 makefile 时不包括 cmake C++11 标志
- 寻找一种单一的定时方法来测试各种算法,不包括它们的输入
- CMake 找不到源文件,即使它位于正确的位置
- 在Cocoapods库中的编译中不包括源文件