2015-06-23 68 views
0

這工作:CMake的PkgConfig不起作用

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 

我編譯的CMake 3.2.3 Ubuntu 15.04。

回答

0

嘗試:

pkg_check_modules (GLFW REQUIRED glfw3) 
if (NOT GLFW_FOUND) 
# put error here 
endif()