cmake 构建目录,Windows VS macOS
这里的典型cmake生产是:
cmake .. -DCMAKE_TOOLCHAIN_FILE=/path/to/vcpkg.cmake
cmake --build .
在Windows和MacOS上都可以使用。
Windows上的howver二进制二进制中的二进制文件放置在build/debug/mylib.dll
下,在MacOS上,它直接放置在build> build/libmylib.dylib
下。我如何也可以在MacOS上的build> build/debug/libmylib.dylib
中进行操作?
Typical cmake produre here was:
cmake .. -DCMAKE_TOOLCHAIN_FILE=/path/to/vcpkg.cmake
cmake --build .
That worked on both Windows and macOS.
Howver on Windows the binary in placed under build/Debug/mylib.dll
while on macOS it is placed directly under build/libmylib.dylib
. How can I make it on build/Debug/libmylib.dylib
on macOS too?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在Mac上手动复制相同的目录结构。
但是,我肯定会确保将
debug
配置放在一个名为debug的目录中,以免您将来混淆自己:You could simply manually reproduce the same directory structure yourself on the Mac.
However, I would definitely make sure to only put a
Debug
configuration in a directory called Debug, lest you confuse yourself in the future: