检查库是否存在¶
检查函数是否存在。
- CHECK_LIBRARY_EXISTS¶
CHECK_LIBRARY_EXISTS(LIBRARY FUNCTION LOCATION VARIABLE)
LIBRARY - the name of the library you are looking for FUNCTION - the name of the function LOCATION - location where the library should be found VARIABLE - variable to store the result Will be created as an internal cache variable.
在调用此宏以修改检查运行方式之前,可以设置以下变量:
CMAKE_REQUIRED_FLAGS编译命令行标志的字符串。
CMAKE_REQUIRED_DEFINITIONS要定义的宏列表 (-DFOO=bar)。
CMAKE_REQUIRED_LINK_OPTIONS在 3.14 版本加入: 传递给链接命令的选项列表。
CMAKE_REQUIRED_LIBRARIES要链接的库列表。
CMAKE_REQUIRED_QUIET在 3.1 版本加入: 在没有消息的情况下安静地执行。