Pkgconfig找不到包

时间:2013-07-02 13:41:39

标签: cmake pkg-config

我在cmake中使用pkgconfig链接到外部库。即使存在一个exteral_package.pc文件(显然信息正确),cmake也会给我一个错误。

CMakeLists文件如下所示:

project(juicer)
set(VERSION 1.0)
# Find packages
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
find_package(Tracter REQUIRED)

FindTracter文件如下所示:

find_package(PkgConfig)
pkg_check_modules(TRACTER REQUIRED tracter)

错误:

-- checking for module 'tracter'
--   package 'tracter' not found
CMake Error at /usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:279 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:333 (_pkg_check_modules_internal)
  cmake/FindTracter.cmake:10 (pkg_check_modules)
  CMakeLists.txt:22 (find_package)

我是使用CMake的新手,非常感谢您的帮助。 谢谢 Akshat

0 个答案:

没有答案