这有效:
pkg-config --libs --cflags glfw3
但
pkg_search_module(GLFW REQUIRED glfw3)
我的CMakeLists.txt中的不起作用。错误讯息:
-- checking for one of the modules 'glfw3'
CMake Error at /usr/share/cmake-3.2/Modules/FindPkgConfig.cmake:548 (message):
None of the required 'glfw3' found
我为Ubuntu 15.04编译了CMake 3.2.3。
答案 0 :(得分:0)
尝试:
pkg_check_modules (GLFW REQUIRED glfw3)
if (NOT GLFW_FOUND)
# put error here
endif ()