CMake的sdl-config [英] CMake sdl-config
本文介绍了CMake的sdl-config的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以在CMake中使用sdl-config?
Is there a way to use sdl-config in CMake?
推荐答案
是。只需使用 find_program()
查找它,并使用 execute_process()
运行它并捕获其输出。如果您确实想测试SDL并将其用于项目中,则CMake随附 FindSDL.cmake
,因此您只需将 find_package(SDL)
在您的 CMakeLists.txt
中,然后直接访问 SDL_CFLAGS
等。
Yes. Just use find_program()
to find it and execute_process()
to run it and capture its output. If you actually want to test for SDL and use it in your project, CMake comes with FindSDL.cmake
, so you could just put find_package(SDL)
in your CMakeLists.txt
and then just access SDL_CFLAGS
and so on directly.
这篇关于CMake的sdl-config的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文