我想在我的项目中包含SFML源代码.我的目录布局如下:
main
SFML (subtree synced with the official git repo)
src
<various modules>
General (here lies the binary)
Run Code Online (Sandbox Code Playgroud)
从主要级别我首先添加SFML子目录然后再添加src.正如我看到构建日志,这产生了库:
sfml?system
sfml?window
sfml?network
sfml?graphics
sfml?audio
sfml?main
Run Code Online (Sandbox Code Playgroud)
现在我想将它们链接到General目录中的二进制文件,如下所示:
add_executable(main ${main_SRCS})
target_link_libraries (main
sfml?system
sfml?window
sfml?network
sfml?graphics
sfml?audio
sfml?main
# Other stuff here
)
Run Code Online (Sandbox Code Playgroud)
但我得到:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lsfml?system
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lsfml?window
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lsfml?network
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lsfml?graphics
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lsfml?audio
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lsfml?main
Run Code Online (Sandbox Code Playgroud)
为什么CMake尝试使用系统库而不是刚刚构建的系统库,如何解决这个问题呢?
是否有任何工具可以使用Django应用程序的目录,扫描模板并绘制/打印/列出模板之间的继承层次结构?
在这样的工具中,查看在每个级别覆盖哪些块将是一个特别有用的功能.